Free n8n template

Email to Asana task n8n template

What it does

An importable n8n workflow that watches a Gmail label, strips quoted history and signatures, and has Claude classify each message and extract a verb-first title, description, requester, due date and priority. Requests become Asana tasks with a link to the email. Replies on a thread that already has a task become comments, using a Google Sheet as the thread map. You need n8n, Gmail, an Anthropic API key, Asana, Google Sheets and Slack.

What this workflow does

  1. Gmail: To task label (Gmail Trigger) picks up new messages carrying your “To task” label, with the full body.
  2. Strip quotes and signatures (Code) removes quoted replies, reply headers, signatures and legal footers, keeps attachment names, and skips no-reply and auto-submitted senders before any model call.
  3. Classify and extract with Claude (HTTP Request) returns a category (new request, update, informational, automated, other) plus task fields from a strict JSON schema. Due date and assignee each carry a confidence value, so vague cases are marked rather than guessed.
  4. Parse and route (Code) handles refusals and truncated output, drops non-requests, maps the sender’s domain to an Asana project and named teammates to Asana users, and only sets a due date the sender actually stated.
  5. Route (Switch) sends tasks onward and errors to Slack.
  6. Look up thread (Google Sheets) checks whether this thread already has a task.
  7. Task exists for thread? (If) adds the new message as a comment with any proposed date change, or creates a new task.
  8. Create Asana task, Shape mapping row (Edit Fields) and Save thread mapping record thread ID, task ID and link.
  9. Label email as captured (Gmail) tags the message so the team can see it is tracked.
  10. Post exception to Slack collects API errors, refusals and Asana failures.

Before you import

  • A Gmail account or shared mailbox, with a “To task” label applied by a filter or by hand, and a “Task captured” label.
  • An Anthropic API key. The template uses claude-opus-5-5 at low effort; claude-haiku-5-5 is cheaper for high-volume, simple classification.
  • An Asana personal access token, a “Needs review” project, and a Google Sheet with a Threads tab.
  • A Slack bot in an exceptions channel.

Setup

  1. Import the JSON and connect Gmail, Anthropic, Asana, Google Sheets and Slack credentials.
  2. Replace REPLACE_WITH_TO_TASK_LABEL_ID on the trigger and REPLACE_WITH_CAPTURED_LABEL_ID on the label node with Gmail label IDs (they look like Label_123).
  3. Create the Threads tab with headers thread_id, task_id, task_url, subject, from_address, created_at, and replace REPLACE_WITH_SHEET_ID on both Sheets nodes.
  4. In Parse and route, fill DOMAIN_PROJECTS, DEFAULT_PROJECT and PEOPLE.
  5. Replace REPLACE_WITH_ASANA_WORKSPACE_ID and REPLACE_WITH_SLACK_EXCEPTIONS_CHANNEL_ID.

Test it

Label four emails: a clear request with a date, a reply on that same thread changing the date, a newsletter and a thank-you note. The first should create one Asana task with the due date and an email link. The reply should appear as a comment on that task with the proposed date, not as a second task. The newsletter and thank-you should create nothing.

Make it production-ready

  • Before switching it on, label 100 to 200 real emails by hand and measure how many created tasks are real. Favor precision first.
  • Keep every task in the Needs review project for two weeks, then route by client domain.
  • Log deleted or merged auto-created tasks and add them to your test set.
  • Add an n8n error workflow, and watch Asana’s rate limits if the mailbox is busy.
  • Optionally send the requester a short acknowledgment with the task link once accuracy is proven.

Read the full guide on turning emails into tasks with AI for classifier testing and deduplication, or talk to Lumeor about Outlook, ClickUp or Jira versions.

Next steps