Email Trigger
Start workflows when emails arrive
Email triggers start your workflow when an email arrives at a designated address. Use them to process incoming documents, respond to inquiries, or automate email-based business processes.
Getting Your Workflow Email Address
When you add an email trigger to your workflow:
- Select Email Received as the trigger type
- A unique email address is generated:
{workflow-name}@{your-org}.workflows.flint.comFor example:
invoice-processing@acme.workflows.flint.comEmails sent to this address trigger your workflow.
Configuring the Trigger
Sender Filtering
Control which emails trigger the workflow:
| Filter | Description |
|---|---|
| Any sender | All emails trigger the workflow |
| Specific domains | Only from @partner.com, @vendor.com |
| Specific addresses | Only from invoices@supplier.com |
| Trusted sources | From addresses in your trusted sources list |
Always use sender filtering in production. Without it, anyone who discovers your email address can trigger your workflow.
Subject Filtering
Filter by email subject:
| Filter | Example |
|---|---|
| Contains | Subject contains "Invoice" |
| Starts with | Subject starts with "[ORDER]" |
| Matches pattern | Subject matches regex PO-\d{6} |
Attachment Requirements
Specify attachment requirements:
| Setting | Behavior |
|---|---|
| Not required | Process with or without attachments |
| Required | Only trigger if attachments present |
| Specific types | Only PDF, XLSX, etc. |
Accessing Email Data
In your workflow, access email content via trigger:
{{trigger.from}} // Sender email address
{{trigger.to}} // Recipient address (JSON string)
{{trigger.subject}} // Email subject
{{trigger.text}} // Plain text body
{{trigger.html}} // HTML body
{{trigger.emailId}} // Unique email identifier
{{trigger.attachmentCount}} // Number of attachmentsAttachments
Access attachments as an array:
{{trigger.attachments}} // All attachments
{{trigger.attachments[0]}} // First attachment
{{trigger.attachments[0].filename}} // File name
{{trigger.attachments[0].content}} // File content (base64)
{{trigger.attachments[0].mimeType}} // MIME type
{{trigger.attachments[0].size}} // Size in bytesTrusted Sources
Trusted sources are pre-approved senders that can trigger your workflows. Manage them in Settings Trusted Sources.
Add a Trusted Source
Click Add Source and enter:
- Email address (
invoices@supplier.com) - Or domain (
@supplier.com)
Verify (Optional)
For higher security, verify the source:
- Flint sends a verification email
- The source clicks the link
- Source is marked as verified
Assign to Workflows
In your email trigger, select Trusted Sources Only and check which sources apply.
Email Processing Tips
Setting Up Email Forwarding
If you receive emails at an existing address and want to process them in Flint:
Gmail Forwarding
- In Gmail, go to Settings Forwarding
- Add your Flint workflow address
- Verify the forwarding address
- Choose "Forward a copy" or set up a filter
Outlook/Microsoft 365
- Go to Settings Mail Rules
- Create a rule for emails matching your criteria
- Set action to "Forward to" your Flint address
Generic SMTP Forwarding
Configure your email server to forward:
- All emails to a specific address
- Emails matching certain criteria
- A copy (BCC) of all incoming mail
Forwarded emails include original sender information in headers. Flint extracts this so trigger.from reflects the original sender, not the forwarder.
Testing Email Triggers
Send a Test Email
- Compose an email to your workflow address
- Include test content and attachments
- Send and watch the workflow run
Use the Test Feature
- In the workflow editor, click Test Trigger
- Enter sample email data:
- From address
- Subject
- Body
- Upload test attachment
- Click Run Test
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Email not triggering | Sender not in filter | Check sender filtering settings |
| Attachments missing | Large files rejected | Check attachment size limits (25MB) |
| Wrong sender showing | Forwarding issue | Check header parsing settings |
| Duplicate runs | Email sent multiple times | Enable deduplication by message ID |
| Delayed processing | High volume | Check your workflow queue |
Best Practices
- Use specific addresses —
invoices@rather thaninbox@ - Filter senders — Always restrict who can trigger workflows
- Handle failures — Add error handling for malformed emails
- Monitor volume — Set up alerts for unusual email volumes
- Test with production-like data — Use realistic attachments and content