Skip to content
n8n logo

n8n

Visit n8n

Workflow automation with AI steps you can self-host or run in cloud.

ProductivityAgents

How it works / How to use

Workflow automation with AI steps you can self-host or run in cloud. You build workflows from triggers, app nodes, logic, and optional AI steps—then n8n runs the whole workflow as one execution. Community Edition is free to self-host; n8n Cloud is managed hosting with plan limits. You pay per full workflow execution, not per step. Workflows can be started via webhooks, schedules, APIs, and CLI; AI Assistant (preview) on Cloud helps draft workflows and uses monthly plan credits.

  1. Choose self-hosted Community Edition or n8n Cloud, then create a workflow in the visual editor.
  2. Add a trigger (webhook, schedule, app event, or manual) and the nodes that fetch, transform, and send data.
  3. Map fields between steps, add IF/Switch branches for errors or variants, and test with sample payloads.
  4. Activate the workflow and monitor executions; adjust retries, credentials, and rate limits from run history.

Webhook-driven automations

Start with a Webhook trigger, document the expected payload shape, then chain nodes that validate, transform, and route data.

What to provide

  • The event that should start the workflow (form submit, payment, CRM update)
  • Sample JSON payload from the source system
  • Downstream actions (create record, send message, update sheet)

Details that improve the result

  • Store a real sample payload for test runs
  • Validate required fields before calling external APIs
  • Return a clear HTTP response from the webhook when callers need one

Example prompt

When POST /new-lead fires with { name, email, company }, normalize fields, dedupe against HubSpot, create a contact if missing, post a Slack summary to #sales, respond 200 with { ok: true }.

If the first output is not good

  • “Add a guard if email is missing; respond 400 instead of calling HubSpot.”
  • “Log the raw payload on failure only.”
  • “Route enterprise domains to a different Slack channel.”

Common mistakes

  • Activating before testing with a realistic payload
  • No error branch when the downstream API fails
  • Hard-coding secrets in node fields instead of credentials

Scheduled reporting and sync jobs

Use Schedule Trigger → fetch nodes → aggregate/transform → deliver. Keep idempotent writes so reruns do not duplicate records.

What to provide

  • Schedule (cron or interval) and timezone
  • Data sources to read each run
  • Report format and destination (email, Slack, database, sheet)

Details that improve the result

  • Say what “empty result” should do (skip send vs alert)
  • Prefer incremental sync keys (updated_at) over full table pulls
  • Cap runtime with batching on large datasets

Example prompt

Every weekday at 08:00 Europe/London, pull yesterday’s Stripe charges, summarize revenue by product, append one row to Google Sheets, and post the total to Slack. If zero charges, still post ‘No sales yesterday’.

If the first output is not good

  • “Add a second tab for refunds only.”
  • “Skip Slack on weekends.”
  • “Retry Google Sheets once, then alert #ops.”

Common mistakes

  • Full-table syncs on a short interval
  • No dedupe key when writing to destinations
  • Forgetting timezone on cron expressions

Multi-app integration pipelines

Draw the path trigger → source → map → destination. Add a Set or Code node when field names or formats do not line up.

What to provide

  • Systems involved and direction of data flow
  • Field mapping between each app
  • Conflict rules (source of truth, skip vs update)

Details that improve the result

  • One workflow per clear business outcome
  • Use item lists consciously—some nodes run once per item
  • Document which app owns each field

Example prompt

When a Notion ‘Deal won’ status changes, fetch the page, map company and amount to Pipedrive deal fields, update or create the deal, then tag the Notion page with the Pipedrive ID.

If the first output is not good

  • “Update only if amount changed.”
  • “Stop if company name is empty.”
  • “Add a wait node before Pipedrive to respect rate limits.”

Common mistakes

  • Mixing unrelated integrations in one long workflow
  • Assuming 1:1 field names across apps
  • No branch when the record already exists

AI steps inside workflows (LLM nodes)

Fetch context with regular nodes first, then pass a bounded prompt to an AI node. Parse or validate the model output before downstream writes.

What to provide

  • Model credentials and allowed provider
  • Input text or structured fields from prior nodes
  • Required output shape (summary, JSON, classification label)

Details that improve the result

  • Keep prompts short and deterministic when routing depends on them
  • Ask for JSON only when you add a parse/validate step
  • Never let an LLM node send email or purchase without a human or rule gate

Example prompt

After a support ticket arrives, attach the last 3 messages, ask the LLM node: ‘Return JSON { priority: low|medium|high, summary: string }’. Route high to on-call Slack; medium/low to queue table.

If the first output is not good

  • “Treat missing priority as medium.”
  • “Truncate body to 2,000 characters before the LLM step.”
  • “Add a fallback template if JSON parse fails.”

Common mistakes

  • Letting the model call external systems directly without validation
  • Huge unbounded prompts on every item in a large batch
  • No fallback when the response is not valid JSON

Error handling, retries, and alerts

Use Error Trigger workflows or branch on error outputs. Separate ‘business logic failed’ from ‘infrastructure failed’ in alerts.

What to provide

  • Which nodes are allowed to fail vs must halt the run
  • Retry policy and backoff
  • Alert channel and payload for operators

Details that improve the result

  • Include execution URL and node name in alerts
  • Retry idempotent steps only
  • Store last-good payload for manual replay

Example prompt

Main workflow posts invoices to accounting. On node failure, trigger an error workflow that sends Slack with workflow name, execution ID, failed node, and input snapshot; retry HTTP POST up to 2 times with 30s wait.

If the first output is not good

  • “Do not retry 4xx responses.”
  • “Page on-call only after two failures in 10 minutes.”
  • “Write failed items to a dead-letter sheet.”

Common mistakes

  • Silent failures with no notification
  • Retrying non-idempotent creates/updates indefinitely
  • Alerts without enough context to replay the run

Self-hosted Community Edition

Community Edition is free to self-host on your infrastructure. You manage uptime, updates, and credentials; executions are limited by your server, not n8n Cloud plan quotas.

What to provide

  • Host environment, backups, and upgrade path
  • Credential storage and secrets management
  • Expected execution volume

Details that improve the result

  • Open-source Community Edition is available on GitHub at no license fee
  • You pay per full workflow execution on Cloud; self-hosting shifts cost to compute you operate
  • Use environment variables and credential stores—not hard-coded keys

Example prompt

Self-host n8n on an internal VM, connect Postgres for persistence, back up the database nightly, and run webhooks only on an internal reverse proxy with TLS.

If the first output is not good

  • “Document the upgrade procedure before version jumps.”
  • “Move OAuth credentials to the vault rotation schedule.”
  • “Add health checks and disk alerts.”

Common mistakes

  • No backups before upgrading
  • Exposing the editor to the public internet without auth
  • Assuming Cloud plan credits apply on self-hosted installs

API, CLI, and external orchestration

Treat n8n as the automation engine: external apps start runs via webhook or API, then n8n owns the steps. Document the contract at the trigger node.

What to provide

  • Workflow ID or name to trigger
  • Authentication method for your n8n instance
  • Input JSON expected by the workflow

Details that improve the result

  • Workflows can be triggered and controlled via API, webhooks, and CLI
  • Version workflows before changing live triggers
  • Return structured responses from webhook workflows when callers poll status

Example prompt

Backend calls POST /webhook/generate-report with { accountId, month }. Workflow builds the report, uploads to S3, responds { status: 'ok', url }. Backend stores url against the job ID.

If the first output is not good

  • “Add auth header validation on the webhook.”
  • “Respond 202 immediately and notify via callback URL when done.”
  • “Include execution ID in the response body.”

Common mistakes

  • Breaking webhook payload shape without versioning
  • Long-running work blocking the HTTP response
  • No authentication on public webhook URLs

Using AI Assistant to draft workflows (Cloud preview)

AI Assistant (preview) on n8n Cloud helps draft workflows and consumes monthly plan credits. Review every suggested node, credential, and branch before activation—it accelerates setup; you still own testing and hardening.

What to provide

  • Plain-language description of the automation outcome
  • Apps involved and sample data
  • Constraints (no deletes, human approval before send)

Details that improve the result

  • Describe triggers, apps, and success criteria—not open-ended chat goals
  • Replace placeholder credentials before testing
  • Compare assistant output against your sample payload

Example prompt

Draft a workflow: when a Typeform submission arrives, enrich email with Clearbit, if company size > 50 route to Salesforce lead else add to Mailchimp list ‘SMB’, notify #leads in Slack. No deletes. Human must approve Salesforce create over $10k ARR hint.

If the first output is not good

  • “Split Mailchimp and Salesforce into parallel branches after enrichment.”
  • “Add dedupe on email before any write.”
  • “Remove any node that posts publicly without confirmation.”

Common mistakes

  • Activating assistant-generated workflows without a test execution
  • Treating AI Assistant as a chatbot instead of a workflow draft helper
  • Forgetting it uses Cloud plan credits and is preview functionality

How to prompt

n8n is a workflow builder, not a conversational assistant. Describe automations as trigger → steps → outcome: systems, field mappings, branches, error handling, and what must never happen without approval. Use AI Assistant on Cloud only to draft graphs you will review, test, and activate.

Trigger: Stripe checkout.session.completed.
Steps: fetch customer, create row in Postgres, post summary to Slack #finance.
Rules: idempotent on session ID; retry HTTP once; alert #ops on failure.
Never: issue refunds or email customers automatically.

State the trigger and payload first

Every workflow starts with an event. Name the trigger type and show sample JSON so nodes map reliably.

Example

Webhook POST body: { "orderId": "123", "total": 49.99, "email": "a@b.com" }. Validate orderId and email before any API call.

Write field mappings explicitly

Apps rarely share field names. List source → destination pairs instead of assuming auto-mapping.

Example

Map payload.email → HubSpot contact.email, payload.company → contact.company, static lifecyclestage = 'lead'.

Branch on failures and edge cases

Good workflows specify IF/Switch paths for missing data, duplicates, and API errors.

Example

If email missing → stop and respond 400. If HubSpot 409 duplicate → update existing contact instead of create.

Keep LLM steps bounded

When using AI nodes, define the output schema and validate before writes or notifications.

Example

LLM input: ticket subject + body (max 1500 chars). Output JSON { category, urgency }. If parse fails → route to manual queue.

Document non-negotiable constraints

Automation specs should include hard stops—especially for sends, purchases, deletes, and public posts.

Example

Constraints: never delete CRM records; Slack posts are internal only; Salesforce create requires company size present.

Best output tips

Think in executions, not messages

n8n runs whole workflows per execution. Spec each automation as a graph with a trigger, data flow, branches, and a finished outcome—not an open-ended conversation.

Choose hosting deliberately

Community Edition is free to self-host on your infrastructure. n8n Cloud is managed hosting with plan limits. Billing is per full workflow execution on Cloud; self-hosting shifts cost to compute you operate.

Start from a sample payload

Webhook and app triggers behave differently with missing fields. Pin a realistic JSON example and replay it in the editor until every node receives the shape you expect.

One workflow, one business outcome

Split unrelated jobs into separate workflows. Shorter graphs are easier to test, monitor, and roll back when an API changes.

Make field mapping explicit

Document source → destination fields at each hop. Assumptions about matching column names cause silent bad writes.

Handle errors where they happen

Use error workflows or branches, include execution ID and node name in alerts, and retry only idempotent steps with a sensible cap.

Use AI nodes as structured steps

Pass bounded text from prior nodes, request a defined output (label, summary, JSON), validate, then route. Do not let model output trigger irreversible actions without rules.

Treat AI Assistant as a draft helper

On n8n Cloud, AI Assistant (preview) helps generate workflow drafts and consumes monthly plan credits. Review credentials, branches, and test executions yourself before activation.

Expose clear webhook contracts

When other services call n8n, document required headers, body fields, and response codes at the trigger node. Version breaking changes.

Secure the editor and credentials

Protect self-hosted instances with auth and network controls. Rotate OAuth and API credentials on the same schedule as your other production secrets.

  • Spec automations as trigger → steps → outcome; n8n is workflow automation, not a chatbot.
  • Test with real sample payloads before activating webhooks or schedules.
  • You pay per full workflow execution, not per step—design efficient graphs, but prefer clarity over micro-workflows unless limits require split.
  • Community Edition is free to self-host; n8n Cloud is managed hosting with plan quotas.
  • Map fields explicitly between apps; use Set or Code nodes when shapes differ.
  • Add error branches, retries for idempotent steps, and operator alerts with execution context.
  • Keep AI nodes bounded: small inputs, defined output shape, validation before downstream writes.
  • Use credentials and environment variables—never hard-code secrets in node parameters.
  • AI Assistant (preview) on Cloud drafts workflows and uses plan credits; review and test before production.
  • Trigger and control workflows via webhooks, API, and CLI when external systems need to start runs.

Try this AI

Try n8n

Product Details

Pricing, features, limits and latest updates

n8n

Workflow automation with AI steps you can self-host or run in cloud.

Free / Paid · Free

Pricing Plans

Community Edition

Free

Starter

€240/ Yearly

Pro

€600/ Yearly

Business

€8,004/ Yearly

Enterprise

Custom

Key Features

API

Workflows can be triggered and controlled via API, webhooks, and CLI.

Open Source

A self-hosted Community Edition is available on GitHub at no license fee.

Automation

You pay per full workflow execution, not per step; Community Edition is free to self-host.

Agents

AI Assistant (preview) uses monthly plan credits on n8n Cloud.

Limits

  • Execution billing: n8n Cloud bills per full workflow execution, not per step (n8n pricing FAQ).
  • Community Edition: Self-hosted Community Edition is free; you operate your own infrastructure (n8n docs).

Ideas / Prompt experiences

Share a prompt that worked for you. Username and email are shown with your submission. External links are not allowed.

Example prompt

Webhook → CRM → Slack automation

Prompt

Build an n8n workflow: Trigger: Webhook POST /new-lead with { name, email, company } Steps: validate email → dedupe HubSpot contact → create if missing → post summary to #sales Return HTTP 200 { ok: true } on success.

Short explanation

n8n AI Assistant docs recommend naming trigger, apps, data flow, and success/failure paths—not a chat prompt.

Example prompt

Scheduled sync with error branch

Prompt

Schedule: every hour. Fetch updated rows from Google Sheets. Transform to API payload. If API fails, send Slack alert and stop. If empty result, skip send.

Short explanation

Workflow automations bill per full execution on n8n Cloud; design idempotent writes for reruns.

Share your experience

Required fields are marked. Variation, result, and explanation are optional.

Abridge logo

Abridge

Explore

Enterprise ambient clinical AI that turns patient conversations into documentation, coding, and follow-up for health systems.

ProductivityPaid

Ada

Explore

AI customer service automation platform that resolves conversations across channels using a no-code builder and integrated AI agent.

Productivity

Adept

Explore

AI research company building agents that can use software and APIs to complete multi-step tasks on a computer. Adept focuses on general-purpose action models for enterprise automation.

Productivity