Skip to content

Email Trigger

Overview

The Email Trigger (Inbound Email Trigger) automatically starts workflows when emails are received at specific email addresses. This enables powerful email-based automation like parsing customer inquiries, processing support tickets, handling order confirmations, and more.

When to use this trigger:

  • Process support emails automatically
  • Parse order confirmations from suppliers
  • Handle lead inquiries from email
  • Process email-to-ticket conversions
  • Monitor specific email addresses for actions
  • Parse and extract data from structured emails

The Inbound Email trigger opened to its settings: the trigger banner, the Inbound Email Address with a copy button (the address is blurred), and a note that mail sent or forwarded to it starts the workflow

Quick Start

Builder fields

The Field column is the label as it appears in the task builder; Key is the name the value is stored under and referenced by.

Field Key Type Default Notes
Inbound Email Address token email-display –
  1. Create a workflow and add an Inbound Email trigger
  2. Copy its Inbound Email Address — the trigger's own address
  3. Send or forward emails to it: point a supplier's notifications at it, add it to a distribution list, or set a mailbox rule to forward the emails you want to it
  4. Add the tasks to run for each email, and switch the workflow on

Every email that reaches the address starts the workflow once. There is no mailbox to connect and no matching rule on the trigger: decide which emails go to the address where they are sent from, or put an If after the trigger on the sender or subject.

Outputs

Field Type Example Notes
from_email string jane@example.com Sender address.
from_name string Jane Doe Sender display name.
to_email string sales@…, info@… Comma-separated list of recipients.
subject string Quote request
body string Hi, could you… The message with HTML tags stripped — the field to use for matching and AI prompts.
body_html string <p>Hi, could you…</p> The original HTML body.
body_text string Hi, could you… The plain-text part, when the sender supplied one.
email_id number 99213 The stored email's ID.
date_received string 2026-09-07T09:14:02Z When it arrived.
attachment_count number 2 How many attachments. 0 when none.
attachment_names string quote.pdf,logo.png Comma-separated. Empty when none.
attachment_urls string https://…,https://… Comma-separated, same order as the names.
attachment_sizes string 18422,3110 Comma-separated byte sizes.
attachment_types string application/pdf,image/png Comma-separated content types.
run boolean true
run_text string Inbound data received and processed successfully.

Attachment fields are parallel comma-separated strings, not a list

attachment_names, _urls, _sizes and _types share an order. To act on each attachment, split them with a Formatter and iterate with a Loop.

There is no cc, bcc, message_id or in_reply_to field — the trigger does not carry them.

Real-World Examples

Turn an inbound email into a CRM note

Email Trigger
  └─ Match to Client     contact_email: {{task_54001_from_email}}
      └─ Workflow Note   log the subject and body against the client

Route support mail with AI

Email Trigger
  └─ AI Prompt        classify {{task_54001_body}} as Sales, Support or Billing
      └─ Key Match    each category to its address
          └─ Email    forward it on

Save an attachment against the sender

Email Trigger
  └─ Match to Client   contact_email: {{task_54001_from_email}}
      └─ Files         download {{task_54001_attachment_urls}}

attachment_count is 0 when there were none, so branch on it before trying to save anything.

Pull an order number out of the message

Email Trigger
  └─ Regex           pattern: (ORD|INV)-\d{4,}
      └─ Edit Client   record {{task_10001_response}}

Handling Attachments

Checking for Attachments

Use an If task to check if attachments exist:

Condition: {{task_54123.JSON.attachments}} is not empty

Downloading Attachments

Attachment URLs are temporary and accessible for 24 hours:

{{task_54123.JSON.attachments[0].url}}

To permanently store attachments:

  1. Use Webhook Out to download the file
  2. Use File task to upload to your storage

Processing Multiple Attachments

Use a Loop task to process each attachment:

  1. Loop - Loop through task_54123.JSON.attachments
  2. Inside loop: Process each attachment

Common Attachment Types

  • PDF: Use PDF task to extract text
  • Images: Use AI Prompt with vision models
  • CSV/Excel: Download and parse with Code task
  • Documents: Use Speech to Text if scanned

Parsing Email Content

Extract Data from Structured Emails

Many automated emails follow predictable formats. Use Code task or AI Prompt to extract data.

Example: Parse order confirmation

const body = input.task_54123_body_text;

// Extract order number
const orderMatch = body.match(/Order #(\d+)/);
const orderNumber = orderMatch ? orderMatch[1] : '';

// Extract amount
const amountMatch = body.match(/Total: \$(\d+\.\d{2})/);
const amount = amountMatch ? amountMatch[1] : '';

return {
  order_number: orderNumber,
  amount: amount,
};

Clean Email Replies

Email replies often include previous message history. To extract just the new content:

const body = input.task_54123_body_text;

// Split at common reply markers
const cleanBody = body
  .split(/On .* wrote:/)[0]
  .split(/From:/)[0]
  .split(/-----Original Message-----/)[0]
  .trim();

return { clean_message: cleanBody };

Extract Email Addresses from Body

const body = input.task_54123_body_text;
const emailRegex = /[\w.-]+@[\w.-]+\.\w+/g;
const emails = body.match(emailRegex) || [];

return { extracted_emails: emails };

Auto-Reply Handling

Prevent Reply Loops

If your workflow sends an email in response, be careful not to create loops:

  1. Check in_reply_to field
  2. Add a unique identifier to your auto-reply subject
  3. Use If task to skip processing if subject contains that identifier

Example:

Condition: {{task_54123_subject}} does not contain "[AUTO-REPLY]"

Setting Reply-To Headers

When sending email responses, use the original sender:

To: {{task_54123_from}}
Subject: Re: {{task_54123_subject}}

Best Practices

✅ Do's

  • Send only the emails you want to it: a mailbox rule that forwards just the supplier's notifications keeps runs to the ones that matter
  • Handle missing data gracefully: Use If tasks to check required fields exist
  • Prefer body_text for parsing and AI prompts — it has no HTML
  • Test with sample emails: send one to the address and check the run's output

❌ Don'ts

  • Don't create reply loops: a workflow that emails the address it listens on will keep starting itself
  • Don't publish the address: anyone who has it can start the workflow
  • Don't expose sensitive data: Be careful when forwarding or logging email content

Troubleshooting

Emails not triggering the workflow

  1. Check the workflow is switched on
  2. Check the email was sent to this trigger's exact Inbound Email Address
  3. If it was forwarded by a mailbox rule, check the rule ran (some providers block automatic forwarding)

Wrong emails being processed

Forward fewer emails to the address, or add an If after the trigger on from_email or subject.

Advanced Features

Email Categorization

Automatically categorize emails using AI:

  1. Email Trigger
  2. AI Prompt - "Categorize this email as: support, sales, billing, or other"
  3. If Task - Route based on category

Frequently Asked Questions

Can I monitor multiple email addresses?

Yes — each Inbound Email trigger has its own address, so use one trigger (and workflow) per purpose.

Does this work with shared mailboxes?

Yes — have the shared mailbox forward the emails to the trigger's address.

Can I delete emails after processing?

No — the trigger only receives a copy of each email sent to its address.

What happens if I receive thousands of emails?

Each email triggers the workflow independently. For high-volume scenarios:

  • Forward only the emails that need processing
  • Monitor execution costs

Can I access email headers?

Yes, all standard email headers are available in the output. Use JSON notation to access specific headers:

{{task_54123.JSON.headers.X-Custom-Header}}

How quickly does the workflow trigger?

Usually within 1-5 minutes of email receipt. This varies based on system load.

Can I trigger on sent emails (not just received)?

No, only incoming emails trigger workflows. For sent emails, use your email provider's webhooks or API.

What's the attachment size limit?

Generally 25MB per attachment. Larger attachments may not be processed successfully.

Can I move processed emails to a folder?

Not directly. You would need to use the email provider's API in a Code task to move emails after processing.


Next Steps: