Email Trigger V2
Discover more about the Email Trigger V2 and how to use it on the Digibee Integration Platform.
This trigger supports IMAP protocol only.
Email Trigger V2 delivers data from an email inbox into the pipeline.
Parameters
Take a look at the configuration parameters of the trigger. Parameters supported by Double Braces expressions are marked with (DB)
.
Parameter | Description | Default value | Data type |
---|---|---|---|
Account | Specify the account for the trigger to access the correct email. | N/A | String |
Operation | Action to be executed by the trigger. Options are: Mark as Read, Move to Another Folder, and Delete. See more about the operations in the section below. | Mark as Read | String |
Hostname | IMAP server hostname (for example, imap.uol.com). | imap.gmail.com | String |
Port | Number of the port. | 993 | Integer |
Email Folder | Name of the folder/inbox that the trigger must read (for example, inbox). This folder can’t hold more than 100 messages (read/not read). | inbox | String |
Destination Email Folder | Specify which folder the message should be moved to. Keep in mind that this field appears only when the option Move to Another Folder is selected in the Operation parameter. | N/A | String |
Maximum Timeout | Maximum time (in milliseconds) for the pipeline to process information before returning a response. Limit: 900000. | 30000 | Integer |
Allow Redelivery Of Messages | If enabled, the option allows the messages to be delivered again if the Pipeline Engine fails. | False | Boolean |
Operation
Mark as Read: select this option if, after being processed, you want the message to be marked as read.
Move to Another Folder: select this option if, after being processed, you want the message to be moved to a predetermined folder. The destination is specified in the Destination Email Folder field, which only appears in the configurations when Move to Another Folder is selected.
Delete: select this option if, after being processed, you want the message to be deleted.
Attachments
If there are attachments in the body of the message received by the trigger, these are downloaded and made available in the pipeline's execution directory. The attachment names will be contained inside the attachments
property and this property will be an array of strings containing the names of the attachments.
If there are 2 attachments with the same name in the message, a unique identifier will be added to the name of the downloaded attachment.
Example:
There are 2 attachments with the name "file.csv" inside the message. Therefore, the content of the attachments
property will be:
The identifier varies at each execution.
If you use Gmail as IMAP server host, it will be necessary to authorize the support of non-safe applications. Check Google external documentation to see the step-by-step.
Example of use
Learn the configuration parameters in the example below:
Open the trigger configurations and select the email-V2 type.
Fill the configuration fields according to your specifications. For this example, select the option Mark as Read in Operation.
Click on Confirm.
Continue to build the pipeline.
Connect the components.
Deploy the pipeline:
Click on Run, located in the superior part of the screen.
Select the environment, which can be test or prod.
Click on Create.
Select the pipeline with its version and capacity.
Click on Deploy.
When triggered, the pipeline will receive a payload similar to this one:
data: message content.
subject: message subject.
from: sender email.
to: recipient email.
cc: recipients in copy.
bcc: recipients in hidden copy.
replyTo: email the answer is sent to.
sentDate: date when the message was sent.
receivedDate: date when the message was received.
Last updated