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:
@@ -125,7 +125,7 @@ These differ from official teable and from the (stale) `docs/automation/triggers
|
||||
1. **Use `inkreach-teable` CLI, never `teable` CLI for automations** — official CLI uses incompatible contract (filter/watchFieldIds/recordMatchesConditions) and will 404 or corrupt config.
|
||||
2. **Read [trigger-types.md](api-reference/trigger-types.md) before configuring a trigger** — contains exact config keys per trigger; guessing leads to silent misfires.
|
||||
3. **Build the full chain then activate** — `workflow create` → `trigger set` → `action add` → `activate`. Editing nodes after activation requires re-`activate` to snapshot.
|
||||
4. **For `buttonClick`, ensure the field is a Button field bound to this workflow** — create via `field create --type button` with `options.workflowId`, or it won't render/click. Verify `workflow.isActive` (the field options capture a stale `isActive` snapshot at creation).
|
||||
4. **For `buttonClick`, ensure the field is a Button field bound to this workflow** — create via `field create --type button` with `options.workflow.id` (the `workflow` value is an **object** `{id, name?}`, NOT a bare `workflowId` string — matching the DB shape), or the field won't render/click. Note: field `options` captures a stale `isActive` snapshot at creation; the API validates the DB `isActive` at click time instead, so a deactivated workflow returns 400.
|
||||
5. **Read [action-types.md](api-reference/action-types.md) before writing scripts** — covers sandbox globals, variable references `{{nodeIndex.path}}`, and the `_accessToken`/`_apiBaseUrl` back-channel.
|
||||
|
||||
## 5. Common Errors & Recovery
|
||||
|
||||
Reference in New Issue
Block a user