Email listener
Trigger budibase automations when an email hits your folder/inbox
The Email Received automation triggers whenever a new email arrives in a mailbox that you've connected to. It connects to your IMAP server (Gmail, Outlook, or any IMAP-compatible provider), checks for new messages on a short polling interval, and fires when an email matches your conditions. When it runs, the trigger exposes the message’s subject, sender, recipients, date, plain-text, and HTML body so you can use them in later steps.
If your flow also needs to send or reply to emails, set up SMTP first. The IMAP trigger doesn’t require SMTP to receive messages, but you’ll need SMTP for outbound mail. For a quick setup guide, follow the steps on the Email (SMTP) setup page here.
Setup
To configure the trigger, create a new Email received type automation. Click on the initial step and enter your IMAP host and port, enable SSL/TLS, and provide the mailbox username and password
The Email received trigger listens to the mailbox you set up within the initial step of the automation. When a new email arrives, Budibase detects it, converts the message into a payload (subject, from/to, date, body text/HTML), and starts your automation. You can then map those fields in downstream steps (e.g., create a record with From/To/Body). Budibase tracks each email’s UID, so the same message won’t trigger twice.
Example
This is an example of how you can use Budibase's email automation trigger to populate a table with the contents of an email. This is useful when testing this feature, as you can see what is being output from the automation
When an email is received, it triggers the create row action, which we have set up to populate our 'emailz' table based on three fields: body, from, and subject. These have been selected from the Email's trigger outputs
Now, each time an email is received, Budibase runs the automation and creates a new row in 'Emailz' with the sender’s email address in from and the message content in body. There may not always be a subject, but if there is, it will be in subject

Updated 12 days ago