Learn how to connect Engini to Gmail.
Using Engini’s gmail activities, you can check for new sent emails, send emails and include attachments seamlessly.
To get started with the gmail app, create an free account at Google.com or use your organizational google mailbox.
Getting Started with Gmail #
Prerequisites #
- An Gmail account.
Add a connection to Gmail in Engini #
- Enter your Engini account at https://app.engini.io.
- Navigate to Connections page by clicking on the Connections on the left sidebar or by clicking here.
- Click on the Add connection option located at the topbar.
- Choose Gmail option from the available applications.
- Enter the following details in the “Add Connection” form:
- Connection name
- Fields automatically populated post connecting to a Google account include:
- Email: Used as the primary email address associated with the account.
- Display Name: Employed when utilizing the email sending activity, enabling customized sender names.
- Access Token: A token for authorization to access Google services.
- Refresh Token: A token used to obtain a new access token when the current one expires.
- Click on the “Sign in with Google” button.
- Sign into your Google account.
- Click on the save button to save the connection.
Trigger #
Check for new emails #
The trigger monitors the mailbox, listening for new emails sent to the connected mailbox at scheduled intervals as defined.
- Choose the Gmail software.
- Click on the “Check for new emails” trigger.
- Starting (UTC)
Select the start date and time for the scheduled trigger. - Recur every
Choose the time interval for triggering and checking emails. The minimum time interval is 15 minutes. - Add time frame
You can specify a time frame during which the trigger will operate.
- Click on “Add time frame” button.
- Select a specific time frame to activate the trigger.
For example, every 15 minutes from 8 AM to 5 PM.
- Select a filter if necessary:
- Click on “Add Filter” button.
- To select an item from the list, click the small arrow.
- Choose the field on which you want to apply the filter from the drop-down.
- Select the condition.
- Choose the value for which you want the condition to be met.
For example, to receive emails with attached files:- Choose “include attachment” from the drop-down.
- Select the condition “equals.”
- Click the empty field and in the pop-up window, choose “true.”
Email’s properties #
Let’s understand what the properties received are:
- Body – The body property contains the entire message body in formal HTML format.
- CC – The “CC” contains a string with all the emails included in the CC (carbon copy) field. The emails are separated by commas within the string.
- From – The ‘From’ property contains the email address from which the email to this mailbox was sent.
- Labelids – This property holds the labels associated with the email, providing categorization or classification details.
- Message Id – This property contains the unique identifier for the email for use in subsequent actions.
- Received Datetime – The ‘Received date time’ received is in the Israeli time zone (UTC + 3) and includes both the date and time.
- Size Estimate – It indicates an estimated size or storage space occupied by the email content.
- Snippet – It presents a brief excerpt or summary of the email content for quick insight or preview.
- Subject – It contains the email subject.
- Threadid – This property carries the identifier linking the email to its respective email thread or conversation.
- To – The ‘To’ property contains a string with all the email addresses to which the email received by this mailbox was sent. If the email was only sent to this mailbox, only the email address of this mailbox will appear. If the email was sent to additional email addresses, the email addresses will be separated by commas in the string.
Actions #
Sent Email #
Send Email when using your gmail account.
- To
Enter the recipient’s email address.- Click on the empty field, and a tooltip will appear, displaying the email fields you can use.
- From the tooltip, select the recipient’s email address, or you can use a static value.
When using strings, be sure to enclose them in single quotes (‘).
- Subject
Fill in the email subject.- Populate the field with Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- You can also use property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Body
The body of an email is the main content of the message you are sending. It is the section where you write the text of your message and convey the purpose or intention of your email.- Click on the empty field next to the label “body.”
- A window will open where you can enter the email body.
You can populate the body with:- Static value – number / string.
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values.
- Pictures – click on the picture icon.
- Links – click on the picture icon.
- Add Field
By clicking the “Add field” button, you can choose how to fill in the various fields. You can add one field to the action or more.- Choose from the drop down the field you want to fill.
You can choose a field from the following:
- BCC (Blind Carbon Copy): This field allows for recipients to be added in a way that others are unaware of their inclusion in the email.
- CC (Carbon Copy): This field holds a string comprising email addresses included in the CC field. Multiple emails are separated by commas within the string. You can add addresses to be CC’d on the email.
- From (Display Name): Specify the sender name from which the recipient will perceive the email to be sent. This value is automatically populated when creating the connection in Engini.
- Attachments[]: This field allows you to include an array of files attached to the email being sent. To accommodate this field, initiate a attachment array, append the files, and then this array can be integrated into the field. Learn more.
- Click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field.
- You can populate the fields in one of the following options:
- Static value – number / string. when using strings, you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps a-c for all the fields you want to populate.
- Choose from the drop down the field you want to fill.
Initialize attachment array #
To create multiple files that will be sent in the email, you need to initialize an array for the files. Choose this action to initialize the array and give it a name.
Append to attachments array #
Append files to attachments array.
- To use this action, you first need to initialize an array.
- Choose the array in which you want to include the files from the drop-down.
- Specify the file name.
- Choose the content that the file will contain. Please note that the content should be in base64 format.