Load trigger samples
load_trigger_samplesFetch recent sample events for a workflow trigger from the connected account, so later steps can be written against real field paths. It reads real records through the connection (for a form's new-submission trigger, its latest submissions); nothing is changed in that account and no credits are spent. Confirm with the user before calling this.
Returns the samples as the trigger would emit them: { status, data: { items: [{ label, value }] }, descriptions? }. One can stand in for the trigger's event as run_workflow's payload. Pass workflow and node (the trigger's #id) to store one on that trigger of the draft as its example, as the editor's "Choose an example" does: the first item, or the one sample picks (0-based); when the account has none (a brand-new form, say), the trigger's example as the editor builds it, else its static one. The answer's example also carries checks: warnings on paths other steps read from this trigger that the stored example does not offer. The trigger must run this app, trigger and connection; that is checked before anything is fetched. The answer then carries example: { stored, note, workflow_version? }, and the draft's version changes, so fetch #source again (or pass workflow_version as edit_source's expected) before the next edit. edit_source and create already load a sample for a trigger they add or change, so call this to pick another item, or when that load found none.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"app": "<app>",
"trigger": "<trigger>",
"connection": "<connection>"
},
"name": "load_trigger_samples"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | The app id, exactly as list({ type: "app" }) returned it. | |
| node | No | With workflow: the #id of the trigger or step in the workflow's draft the example is for. | |
| input | No | The parameter values chosen so far, key → value (plain values, not the source forms). Later parameters often depend on earlier ones. | |
| sample | No | With workflow and node: the 0-based index of the item to store. Defaults to 0, the first. | |
| trigger | Yes | A trigger key, from fetch on the app. | |
| workflow | No | Optional: a workflow id, as list or fetch returned it, to store a sample on one of its steps as that step's example. Needs node too, and write access to the workflow. | |
| connection | Yes | A connection id for this app, from list({ type: "connection" }) or fetch on the app. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| example | No |