skill(iter-1): fix CLI getRecords flag + docs from eval feedback
Ran 4 end-to-end evals (skill-creator flow): all 23 assertions passed (100%). The evals exposed 3 issues, now fixed: 1. CLI bug: getRecords/createRecord/updateRecord --target-table flag was read as opts['target-table'] but commander stores it camelCase (opts.targetTable). Added a pick() helper accepting both forms. 2. trigger-types.md: buttonClick output said record.fields.* implying all fields; actually record.fields only contains the button field's count. Documented the back-channel API fetch pattern for other fields. 3. automation-guide.md: documented that 'workflow test' uses mock input with empty fields, so upstream outputs are absent in test mode — use real fire for data-dependent validation. Also: corrected button field options (workflow.id object, not workflowId).
This commit is contained in:
@@ -147,6 +147,19 @@ inkreach-teable runs get wflXXX <executionId>
|
||||
inkreach-teable runs rerun wflXXX <executionId>
|
||||
```
|
||||
|
||||
### `workflow test` vs real fire
|
||||
|
||||
`workflow test <id>` runs actions synchronously with **mock input** (a fake
|
||||
`{record:{id:'rec_test',fields:{}}, user:{...}}`). It does NOT fire the
|
||||
trigger or use the queue. Two caveats:
|
||||
|
||||
- **Upstream outputs are absent in test mode** — if a script reads
|
||||
`triggerInput.record.fields.<X>`, it gets `{}` because the mock record has
|
||||
no fields. Test only validates that the script *runs without throwing*, not
|
||||
that it produces correct data.
|
||||
- For data-dependent validation, do a **real fire** (button-click / webhook)
|
||||
or perform the real triggering action, then check `runs list`.
|
||||
|
||||
## Variable References (cross-node data)
|
||||
|
||||
An action can reference upstream nodes' output in string fields via `{{nodeIndex.path}}`:
|
||||
|
||||
Reference in New Issue
Block a user