Email Trigger
Overview
The Email Trigger node automatically starts a workflow whenever an email is received at a unique, system-generated workflow email address.
It is ideal for building workflows that react to incoming communication — such as automated ticket creation, customer onboarding, routing messages, extracting information, file processing, or building AI-driven email assistants.
Whenever an email arrives, all details (sender, recipients, subject, body, attachments, spam scores, metadata) become instantly available to downstream workflow nodes.
Description
Trigger workflow when an email is received at a workflow inbox.
When you add an Email Trigger node to a workflow, the system generates a unique address:
workflow-[id]@mails.worqhat.app
Any email sent to this address will trigger the workflow automatically.
The node captures entire email metadata including:
- Sender and recipients
- Subject
- Text and HTML content
- Attachments
- Threading details
- Spam & virus scores
- Delivery metadata
To generate a new workflow inbox, set incomingEmail to:
{{GENERATE_INCOMING_EMAIL}}
The system assigns a unique incoming address automatically.
Input Parameters
- Only
incomingEmailis configured manually. - All other fields are populated automatically when an email arrives.
- Access inputs with:
{{emailTrigger.input.<name>}}
incomingEmailstringRequiredhtmlMessagestringOptionaltextMessagestringOptionalsubjectstringOptionalfromstringOptionaltostringOptionalccarrayOptionalbccarrayOptionalinReplyTostringOptionalreferencesarrayOptionalattachmentFilestringOptionalattachmentFileNamestringOptionalattachmentFileTypestringOptionalattachmentFileSizenumberOptionalspamScorenumberOptionalvirusScorenumberOptionaldeliveryTimestringOptionaldeliveryIdstringOptionaldeliveryStatusstringOptionalAccess inside workflows:
{{emailTrigger.input.from}}
{{emailTrigger.input.subject}}
{{emailTrigger.input.textMessage}}
{{emailTrigger.input.attachmentFile}}
Output Parameters
This node does not produce any output parameters of its own.
It only exposes the incoming email data through {{nodeId.input.*}} for downstream nodes.
You can access incoming email values in other nodes using:
{{emailTrigger.input.from}}
{{emailTrigger.input.subject}}
{{emailTrigger.input.textMessage}}
{{emailTrigger.input.htmlMessage}}
{{emailTrigger.input.attachmentFile}}
Output Type
Output Type: None
The node does not define or emit any structured output type.
It only forwards the incoming email data as input fields accessible via {{nodeId.input.<key>}}.
Example Usage
Trigger Workflow with Email
Incoming Email Configuration:
{ "incomingEmail": "{{GENERATE_INCOMING_EMAIL}}"}
The system assigns a unique workflow inbox at workflow-[id]@mails.worqhat.app.
Example: Use an Existing Workflow Inbox
Configuration:
{ "incomingEmail": "workflow-123@mails.worqhat.app"}
Accessing Values Inside the Workflow:
{{emailTrigger.input.from}} → "sender@example.com"
{{emailTrigger.input.subject}} → "Test Email"
{{emailTrigger.input.textMessage}} → "Email body content"
{{emailTrigger.input.htmlMessage}} → "<html>Email body</html>"
{{emailTrigger.input.attachmentFile}} → "file-id-123"
How to Use in a No-Code Workflow
Add the Email Trigger Node
Place the node at the start of your workflow. It acts as the entry point for incoming emails.
Configure Incoming Email
Use {{GENERATE_INCOMING_EMAIL}} to auto-create a new inbox, or specify an existing workflow inbox address.
Save & Deploy
Once configured, the workflow email address becomes active immediately. The system will generate an address like workflow-[id]@mails.worqhat.app.
Connect to Processing Nodes
Link this trigger node to other nodes (e.g., AI, Database, Email, Storage) to process, store, or react to incoming emails automatically.
Test the Connection
Send a test email to the workflow inbox address to verify the workflow triggers correctly.
Example Using Mailgun
curl -s --user 'api:MAILGUN_API_KEY' \ https://api.mailgun.net/v3/YOUR_DOMAIN/messages \ -F from='Tester <test@yourdomain.com>' \ -F to='workflow-123@mails.worqhat.app' \ -F subject='Test Email Trigger' \ -F text='This is a test message for the workflow.'
Monitor Workflow Execution
Check workflow logs or downstream outputs to ensure emails are being processed correctly.
Best Practices
- Use
{{GENERATE_INCOMING_EMAIL}}for new workflows to ensure unique inbox addresses. - Handle both HTML and text versions of emails for maximum compatibility.
- Verify attachments before processing to avoid errors.
- Use AI nodes for summarization, autoresponse, and intelligent routing.
- Utilize spamScore/virusScore for filtering logic and security.
- Keep workflow inboxes private to prevent abuse and spam.
- Always test your workflow with sample emails before production use.
Do / Don't
- ✔️ Use
{{GENERATE_INCOMING_EMAIL}}for new workflows. - ✔️ Handle both HTML and text versions of the email.
- ✔️ Verify attachments before processing.
- ✔️ Use AI nodes for summarization, autoresponse, and routing.
- ✔️ Utilize spamScore/virusScore for filtering logic.
- ✔️ Keep workflow inboxes private to prevent abuse.
- ❌ Don't share workflow email addresses publicly.
- ❌ Don't assume every email contains HTML — always check text fallback.
- ❌ Don't use attachment fields without validating their presence.
- ❌ Don't store suspicious emails without checking spam/virus scores.
- ❌ Don't reuse the same workflow inbox for multiple workflows.
cURL: Sending a Test Email
While email systems generally require SMTP, you can send a test email using a transactional email provider API such as SendGrid, Mailgun, or Postmark.
Example: Send a test email via Mailgun cURL
curl -s --user 'api:MAILGUN_API_KEY' \ https://api.mailgun.net/v3/YOUR_DOMAIN/messages \ -F from='Tester <test@yourdomain.com>' \ -F to='workflow-123@mails.worqhat.app' \ -F subject='Test Email Trigger' \ -F text='This is a test message for the workflow.'
Example: Send a test email with attachment
curl -s --user 'api:MAILGUN_API_KEY' \ https://api.mailgun.net/v3/YOUR_DOMAIN/messages \ -F from='Tester <test@yourdomain.com>' \ -F to='workflow-123@mails.worqhat.app' \ -F subject='Invoice Attached' \ -F text='Please find the invoice attached.' \ -F attachment=@invoice.pdf
Example Workflow Integration
Use Case: Automatically process incoming support emails.
- Trigger Node – Email Trigger (receives emails at workflow inbox).
- AI Node – Text Analysis (categorizes and summarizes the email).
- Utility Node – Send Email (sends auto-response) or Database (stores ticket).
Additional Email Use Cases
1. Support Ticket Automation
Incoming support emails automatically:
- Create tickets
- Categorize based on subject
- Auto-respond with confirmation
- Route to teams (support@, billing@, sales@)
2. Billing & Invoice Processing
Customers send invoices or payment confirmations:
- Extract attachments
- Process PDF invoices with extraction nodes
- Update accounting systems
- Notify finance teams
3. Sales Lead Capture
Inbound form submissions forwarded as emails:
- Parse sender & content
- Extract lead info
- Push to CRM
- Notify sales reps instantly
4. Hiring & Resume Intake
Applicants send resumes:
- Extract text from resume
- Classify skillsets with AI
- Rank candidates
- Store structured data in database
5. Customer Onboarding Automation
Trigger welcome steps when onboarding emails arrive:
- Summarize content
- Trigger KYC flow
- Extract attachments (ID proofs)
- Update user onboarding records
6. Report Ingestion
Internal systems email automated daily reports:
- Parse attachment
- Extract data
- Trigger BI or analytics pipelines
Example Workflow Diagram
┌────────────────────┐
│ Email Trigger │
│ workflow inbox │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ AI Processing │
│ summary/classify │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ Integrations │
│ Slack / DB / CRM │
└────────────────────┘
Common Errors
Missing incomingEmailErrorOptionalEmail address in useErrorOptionalEmpty email bodyErrorOptionalAttachment missingErrorOptional