Send an email via Gmail


This tutorial will show you to be build a simple Choreo that sends email via Gmail. Choreos like this are great for chaining with other Choreos, so, for example, you can send an email containing the result of a database query or API call.

Get Set Up

1Make sure you have a Temboo account. If you don't already have one, you can register for a free account here.

2Download and install Twyla for Mac or Windows. For information about how to obtain the Twyla installer, please contact support@temboo.com

3You'll also need a Gmail account, which you can create here. To authenticate with Google, you'll want to enable 2-Step Verification and generate an App Password for Temboo.

4Sign in to your Google Account settings page by clicking on your name or picture in the upper right corner of the screen and then clicking Account.

5Scroll down to the "Signing in" box.

6Click 2-Step Verification. This will bring you to the 2-Step Verification settings page.

7You will then see a step-by-step guide which will guide you through the setup process.

8After you've enabled 2-Step Verification, you'll be prompted to create an App Password.

9In the Select app dropdown menu, choose "Other", and give this app a name (e.g., TembooApp).

10Click "Generate". You'll be given a 16-digit passcode that can be used to access your Google Account from Temboo.

Note: If you wish to authenticate with OAuth credentials, you should use the Google > Gmailv2 Choreos.

Send an Email

Twyla has native email support, so we'll start by putting a Send Email step on the canvas.

1Drag a Send Email Step from the steps pallette to the canvas. Connect the Begin Step to your new Send Email Step.

Making a connection between the Begin Step and the Send Email Step

2Double click the Send Email Step to open the step property editor. Configure the Server tab with the appropriate details for your Gmail account. Make sure to use Port 465 and enable the Use SSL checkbox.

Configuring the Server tab in the Send Email step

3On the Details tab, specify your Gmail address for the From address, and specify a recipient in the To address. You can create new local input variable if you want to pass in the recipient address dynamically, which we've done in the screenshot below.

Configuring the Details tab in the Send Email step

4Create two new input variables called Subject and Message. They should be both of type 'String'.

Setting up the input variables

5Save your new Choreo, switch to the Test pane, and run your new Gmail Choreo by providing your Subject, Message, and Recipient as inputs.

Testing out the new Gmail Choreo

When you run the Choreo, it will send an email from your Gmail account to the specified recipient. The best way to test it out is simply by sending a test message to yourself.

Need Help?

We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.


Back