Relay.app Docs
  • Getting Started
    • Introduction
    • Helpful Resources
    • FAQ
  • Triggers
    • Triggers 101
    • Webhook Trigger
    • Mailhook Trigger
    • Manual Trigger
    • Scheduled Trigger
    • Batch Triggers
    • RSS Trigger
  • Actions in Apps
    • Actions 101
  • DATA
    • Step Outputs
    • Find Steps
    • Lists (Arrays)
    • Inspecting Run Data
  • AI
    • AI Steps
    • Human-in-the-Loop AI reviews
    • AI Credits
    • Agentic Tool Use
    • Knowledge
    • Prompt Templates
    • Prompt Tips
    • Audio Transcription
  • Built-in actions
    • Transform data
    • Search Google
    • Scrape Text from Website
    • Custom HTTP Requests
    • Run Custom Code (JS)
  • Flow Control
    • Paths
    • Iterators
    • Wait steps
    • Sequences
  • Human-in-the-Loop
    • Human-in-the-Loop Steps
    • AI output reviews
    • Roles
  • Workflows
    • Folders and Organization
    • Sharing Workflows
    • Headings
    • Notes
  • TEMPLATES
    • About Workflow Templates
    • Using a Template (Importing)
    • Creating a Template (Exporting)
  • Workspace
    • Step & AI credit usage
    • Billing and Plans
    • Workspace administration
    • (Sharing) App Accounts
  • App-Specific FAQs
    • Airtable
    • Attio
    • Cal.com
    • Coda
    • DeepSeek
    • Discord
    • Fireflies
    • Gmail
    • Google Docs
    • Google Drive
    • Google Sheets
    • Microsoft Permissions
    • Microsoft Outlook Mail
    • Notion
    • OpenAI
    • OpenPhone
    • Slack
    • X (Twitter)
    • QuickBooks Online
Powered by GitBook
On this page
  • When to use a Mailhook trigger
  • Setting up a Mailhook trigger
  • Step output
  • Size limitations

Was this helpful?

  1. Triggers

Mailhook Trigger

Last updated 2 months ago

Was this helpful?

The Mailhook trigger lets you trigger workflow runs when an email is received on a uniquely generated email address just for this workflow.

When to use a Mailhook trigger

You should use Mailhooks when you want to instantly trigger a workflow programmatically from another tool, but that tool (a) doesn't offer webhooks, and (b) Relay.app doesn't integrate with it yet.

Mailhooks vs. Webhooks

Mailhooks are very much analogous to webhooks, in that they're typically system-generated. There are some tools that have their own automation features, and can automatically send an email when something happens, but not many of those same tools let you send an arbitrary HTTP request (meaning: you can't use a webhook trigger). If a webhook is available, you should use that, but if it's not available, a mailhook may be your best choice.

Mailhooks vs. a standard "Email Received" trigger

For any mailhook trigger, you could also send those emails to your personal inbox and set up an Email Received trigger, but this is a much more deliberate (and less error-prone) way to accomplish that same end result without cluttering up your personal inbox. If your use case is to simply process all emails coming into your personal inbox with some light filtering, then the Gmail trigger is the way to go. But if you're working in a tool that sends emails programmatically, or you want to kick off runs only in very specific circumstances, the mailhook trigger is an easy way to set that up.

Setting up a Mailhook trigger

1. Select 'Mailhook' from the Trigger menu

2. Specify who might send emails to the unique email address

By default, it's set to accept emails from Any sender. You can change this when desired.

Step output

  • The email's message Body

  • The email's Subject

  • The email address of the sender (From)

  • A List of recipients of the email (To)

  • A List of CC'd email addresses

Size limitations

There is a 10 MB request size limit on mailhook triggers.

Because of the way mailhook requests are sent, rejections unfortunately will not come back to you in the form of a bounced message, so please be aware of this limit if you expect to receive messages with large attachments.

The of the Mailhook trigger contains

Step output