Apps
Gmail
15 min
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 https //accounts google com/lifecycle/steps/signup/name?continue=https //myaccount google com/?utm source%3dogb%26utm medium%3dapp\&dsh=s1124731923 1701622503736389\&ec=galawae\&flowentry=signup\&flowname=glifwebsignin\&hl=iw\&service=accountsettings\&theme=glif\&tl=ahnytiqqcow4phnaw961kpenhpromr2l5dc813x8r5ekxse8efa97ajs5hv5zkgy 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 https //app engini io/connections click on the new integration option located at the topbar choose gmail option from the available applications enter the details in the “add connection” form note there are two different authentication methods available, and the required fields differ depending on the option you choose please follow the relevant instructions based on your selected method oauth2 this method uses a predefined authentication flow you don’t need to provide a client id or client secret, you simply sign in using your account connection name choose a unique identifier for the connection within engini authentication method select oauth2 click on the “sign in with google” button 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 save settings button to save the connection custom oauth2 this method requires you to configure your own oauth2 credentials you must provide both a valid client id and client secret obtained from your google cloud console project connection name choose a unique identifier for the connection within engini authentication method select custom oauth2 when connecting to google services using a custom oauth client to learn more about this authentication, enter https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview pge7hsn11qgbublnn0zz#yhkxl client id enter the client id from the oauth 2 0 credentials in the google cloud project we created client secret enter the client secret from the same set of oauth 2 0 credentials in the google cloud project sign in with google – click sign in with google and log in with the google account used to create the project in google cloud this ensures access to the correct oauth credentials and permissions access token & refresh token automatically populated post connecting to a 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 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 ” add filter repeat steps a d for all the fields you want to populate reset choose the filters from scratch 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 cc emails the email addresses that were included in the cc fields of the email from – the ‘from’ property contains the email address from which the email to this mailbox was sent from email the actual sender's emaiil address 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 to emails the actual recipient email addresses listed in the to field, as a clean list 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 https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p 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 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 https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p 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 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 note \ to use this action, you first need to initialize an array variable choose the array in which you want to include the files from the drop down file name specify the file name content choose the content that the file will contain please note that the content should be in base64 format