Mailhook Trigger
Last updated
Last updated
The Mailhook trigger lets you trigger workflow runs when an email is received on a uniquely generated email address just for this workflow.
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 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.
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.
By default, it's set to accept emails from Any sender. You can change this when desired.
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