mirror of
https://github.com/n8n-io/n8n
synced 2026-04-21 15:47:20 +00:00
fix(core): Make it possible to run workflows with event based triggers on instance AI (no-changelog) (#28398)
This commit is contained in:
parent
5f3dc64cb6
commit
3033d9e0eb
4 changed files with 8 additions and 6 deletions
|
|
@ -210,7 +210,7 @@ Always pass \`conversationContext\` when spawning background agents (\`build-wor
|
|||
|
||||
- **Check before creating** — list existing workflows/credentials first.
|
||||
- **Test credentials** before referencing them in workflows.
|
||||
- **Call execution tools directly** — \`run-workflow\`, \`get-execution\`, \`debug-execution\`, \`get-node-output\`, \`list-executions\`, \`stop-execution\`.
|
||||
- **Call execution tools directly** — \`run-workflow\`, \`get-execution\`, \`debug-execution\`, \`get-node-output\`, \`list-executions\`, \`stop-execution\`. To test workflows with event-based triggers (Linear, GitHub, Slack, etc.), use \`run-workflow\` with \`inputData\` matching the trigger's output shape — do NOT rebuild the workflow with a Manual Trigger.
|
||||
- **Prefer tool calls over advice** — if you can do it, do it.
|
||||
- **Always include entity names** — when a tool accepts an optional name parameter (e.g. \`workflowName\`, \`folderName\`, \`credentialName\`), always pass it. The name is shown to the user in confirmation dialogs.
|
||||
- **Data tables**: read directly (\`list-data-tables\`, \`get-data-table-schema\`, \`query-data-table-rows\`); for creates/updates/deletes, use \`plan\` or \`create-tasks\` with \`manage-data-tables\` tasks. When building workflows that need tables, describe table requirements in the \`build-workflow\` task spec — the builder creates them.
|
||||
|
|
|
|||
|
|
@ -14,10 +14,11 @@ export const runWorkflowInputSchema = z.object({
|
|||
.record(z.unknown())
|
||||
.optional()
|
||||
.describe(
|
||||
'Input data passed to the workflow trigger. ' +
|
||||
'For webhook-triggered workflows, inputData IS the request body — ' +
|
||||
'do NOT wrap it in { body: ... }. ' +
|
||||
'Example: to send { title: "Hello" } as POST body, pass inputData: { title: "Hello" }.',
|
||||
'Input data passed to the workflow trigger. Works for ANY trigger type — ' +
|
||||
'the system injects inputData as the trigger node output, bypassing the need for a real event. ' +
|
||||
'For webhook triggers, inputData is the request body (do NOT wrap in { body: ... }). ' +
|
||||
'For event-based triggers (e.g. Linear, GitHub, Slack), pass inputData matching ' +
|
||||
'the shape the trigger would emit (e.g. { action: "create", data: { ... } }).',
|
||||
),
|
||||
timeout: z
|
||||
.number()
|
||||
|
|
|
|||
|
|
@ -677,6 +677,7 @@ Supported input types: \`string\`, \`number\`, \`boolean\`, \`array\`, \`object\
|
|||
- Sub-workflows with \`executeWorkflowTrigger\` can be tested immediately via \`run-workflow\` without publishing. However, they must be **published** via \`publish-workflow\` before the parent workflow can call them in production (trigger-based) executions.
|
||||
2. Run the chunk: \`run-workflow\` with \`inputData\` matching the trigger schema.
|
||||
- **Webhook workflows**: \`inputData\` IS the request body — do NOT wrap it in \`{ body: ... }\`. The system automatically places \`inputData\` into \`{ headers, query, body: inputData }\`. So to test a webhook expecting \`{ title: "Hello" }\`, pass \`inputData: { title: "Hello" }\`. Inside the workflow, the data arrives at \`$json.body.title\`.
|
||||
- **Event-based triggers** (e.g. Linear Trigger, GitHub Trigger, Slack Trigger): pass \`inputData\` matching what the trigger would normally emit. The system injects it as the trigger node's output — e.g. \`inputData: { action: "create", data: { id: "123", title: "Test issue" } }\` for a Linear Trigger. No need to rebuild the workflow with a Manual Trigger.
|
||||
3. If it fails, use \`debug-execution\` to investigate, fix, and re-submit.
|
||||
|
||||
### Step 3: Compose chunks in the main workflow
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ The system tracks file hashes. If you edit the code and then call run-workflow o
|
|||
### Verification
|
||||
|
||||
- If submit-workflow returned mocked credentials, call verify-built-workflow with the workItemId
|
||||
- Otherwise call run-workflow to test (skip for trigger-only workflows)
|
||||
- Otherwise call run-workflow to test (skip for trigger-only workflows). For event-based triggers (Linear, GitHub, Slack, etc.), pass \`inputData\` with sample data matching the trigger's expected output shape — the system injects it as the trigger node's output.
|
||||
- If verification fails, call debug-execution, fix the code, re-submit, and retry once
|
||||
- If the same failure signature repeats, stop and explain the block
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue