Mailhook Trigger
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 Step output of the Mailhook trigger contains
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.
Last updated
Was this helpful?