{"record":{"id":"fb7e5ce06ea0254d","repo":"n8n-io/n8n","slug":"workflow-formatworkflow-dbworkflow-has-no-node","errorCode":null,"errorMessage":"Workflow ${formatWorkflow(dbWorkflow)} has no node to start the workflow - at least one active trigger, poll trigger, webhook trigger, or schedule trigger node is required","messagePattern":"Workflow (.+?) has no node to start the workflow - at least one active trigger, poll trigger, webhook trigger, or schedule trigger node is required","errorType":"exception","errorClass":"WorkflowActivationError","httpStatus":null,"severity":"warning","filePath":"packages/cli/src/active-workflow-manager.ts","lineNumber":604,"sourceCode":"\t\t\tworkflow = new Workflow({\n\t\t\t\tid: dbWorkflow.id,\n\t\t\t\tname: dbWorkflow.name,\n\t\t\t\tnodes,\n\t\t\t\tconnections,\n\t\t\t\tactive: true,\n\t\t\t\tnodeTypes: this.nodeTypes,\n\t\t\t\tstaticData: dbWorkflow.staticData,\n\t\t\t\tsettings: dbWorkflow.settings,\n\t\t\t});\n\n\t\t\tconst validation = validateWorkflowHasTriggerLikeNode(\n\t\t\t\tworkflow.nodes,\n\t\t\t\tthis.nodeTypes,\n\t\t\t\tSTARTING_NODES,\n\t\t\t);\n\n\t\t\tif (!validation.isValid) {\n\t\t\t\tthrow new WorkflowActivationError(\n\t\t\t\t\t`Workflow ${formatWorkflow(dbWorkflow)} has no node to start the workflow - at least one active trigger, poll trigger, webhook trigger, or schedule trigger node is required`,\n\t\t\t\t\t{ level: 'warning' },\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst additionalData = await WorkflowExecuteAdditionalData.getBase({\n\t\t\t\tworkflowId: workflow.id,\n\t\t\t\tworkflowSettings: dbWorkflow.settings,\n\t\t\t});\n\n\t\t\tlet triggerCount = 0;\n\t\t\tawait workflow.expression.acquireIsolate();\n\t\t\ttry {\n\t\t\t\tif (shouldAddWebhooks) {\n\t\t\t\t\tadded.webhooks = await this.addWebhooks(\n\t\t\t\t\t\tworkflow,\n\t\t\t\t\t\tadditionalData,\n\t\t\t\t\t\t'trigger',","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/cli/src/active-workflow-manager.ts#L586-L622","documentation":"Before activating a workflow, ActiveWorkflowManager runs validateWorkflowHasTriggerLikeNode against the workflow's nodes to ensure at least one node can start an execution (a trigger, poll trigger, webhook trigger, or schedule trigger). If no such starting node is present, the workflow would never run on its own, so activation is refused with a WorkflowActivationError at 'warning' level. Manual/exec-once execution is unaffected.","triggerScenarios":"Activating a workflow whose only nodes are regular processing nodes (Set, HTTP Request, etc.) with no trigger; a workflow whose trigger node is disabled; a workflow built from a template that omitted the trigger; a workflow where the trigger node type is not in the STARTING_NODES set.","commonSituations":"Building a workflow and forgetting to add a trigger; disabling the only trigger then activating; importing a workflow that lost its trigger node; custom node types not registered as triggers.","solutions":["Add at least one trigger node (Schedule Trigger, Webhook, Polling Trigger, etc.) to the workflow before activating.","Ensure the trigger node is enabled (not disabled) and its type is recognized as a trigger by n8n.","If you only want manual execution, do not activate the workflow — run it via the Execute button or API instead."],"exampleFix":"// before: no trigger\nworkflow.add(node({ type: 'Set' })).to(node({ type: 'Http' }));\n// activation throws\n\n// after\nworkflow.add(trigger({ type: 'Schedule Trigger' })).to(node({ type: 'Set' }));","handlingStrategy":"validation","validationCode":"import { validateWorkflowHasTriggerLikeNode, STARTING_NODES } from 'n8n-workflow';\n\nconst result = validateWorkflowHasTriggerLikeNode(workflow.nodes, nodeTypes, STARTING_NODES);\nif (!result.isValid) {\n  throw new Error('Add a trigger node (Schedule/Webhook/Poll) before activating');\n}","typeGuard":"function hasTriggerNode(nodes: { type: string; disabled?: boolean }[]): boolean {\n  return nodes.some(n => isTriggerNodeType(n.type) && !n.disabled);\n}","tryCatchPattern":"try {\n  await activeWorkflowManager.add(workflowId, 'activate');\n} catch (e) {\n  if (e instanceof WorkflowActivationError && /no node to start/.test(e.message)) {\n    // prompt user to add a trigger\n    return { status: 400, message: 'Add a trigger node before activating' };\n  }\n  throw e;\n}","preventionTips":["Add at least one trigger node before activating a workflow.","Keep the trigger node enabled; a disabled trigger does not count.","Use manual execution (Execute button / API) if you do not want automatic triggering."],"tags":["activation","trigger","validation","workflow"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}