Concept map
Setup
1
Create an account
Go to Trigger.dev Cloud, create an account, and create a project.
2
Install the CLI and initialize
trigger/ directory for your tasks.3
Run the local dev server
Common patterns
Webhook trigger
In n8n you use a Webhook trigger node, which registers a URL that starts the workflow. In Trigger.dev, your existing route handler receives the webhook and triggers the task:Chaining steps (Sub-workflows)
In n8n you use the Execute Sub-workflow node to call another workflow and wait for the result. In Trigger.dev you usetriggerAndWait():
trigger/process-batch.ts
Error handling
In n8n you use Continue On Fail on individual nodes and a separate Error Workflow for workflow-level failures. In Trigger.dev:- Use
try/catchfor recoverable errors at a specific step - Use the
onFailurehook for workflow-level failure handling - Configure
retryfor automatic retries with backoff
trigger/import-data.ts
Waiting and delays
In n8n you use the Wait node to pause a workflow for a fixed time or until a webhook is called. In Trigger.dev:trigger/send-followup.ts
wait.createToken() to generate a URL, send that URL to the external system, then pause with wait.forToken() until the external system POSTs to that URL to resume the run.
trigger/approval-flow.ts
Full example: customer onboarding workflow
Here’s how a typical back office onboarding workflow translates from n8n to Trigger.dev. The n8n setup: Webhook Trigger → HTTP Request (provision account) → HTTP Request (send welcome email) → HTTP Request (notify Slack) → Wait node (3 days) → HTTP Request (check activation) → IF node → HTTP Request (send follow-up). In Trigger.dev, the same workflow is plain TypeScript:trigger/onboard-customer.ts

