Tutorial: Sending mails with Google Apps

With Boomi Flow, you can build an app that uses an email service (like Google Apps or Microsoft Exchange) to send emails to users.

Here is an use case: Pepper from FictionalCompany Industries wants to build a simple app that will let her update the design team lead on the arrival of a titanium alloy shipment. The app will initiate a check to see if the shipment has arrived, and send a confirmation email to the design team.

Let’s get building!

If you need to take a closer look, click on the images to enlarge them. Have a question? Click the Help button on the bottom right-hand corner of this page to ask.

This is what our canvas will look like, once we are done:

What we will need

  1. Boomi Flow username/password. (If you do not have a Boomi Flow login, please click here to request one.)
  2. Google Apps email services for Boomi Flow configured. (To see how to configure the Google email service, please click here.)
  3. An email ID to which mails can be sent.
  4. A new flow. (Here is how you can create a new flow. Use the ManyWho Identity Service. Make sure the Access is set to ‘Anyone can run this flow’ and Social Feed is set to ‘None.’ You can call the flow ‘Sending emails’ or anything you wish.)
Note: Your Google Apps account must be configured to enable less secure apps. To configure this, sign in to your Google Admin console, click Security > Basic settings, under Less secure apps, select Go to settings for less secure apps, and select the Allow users to manage their access to less secure apps radio button in the subwindow. For more information on enabling less secure apps, see Google Apps Administrator Help or contact your IT administrator.

Verifying the shipment arrival
  1. Drag a Step element from the sidebar, to the canvas.
  2. In the Configuration Panel, copy-paste the text Verify in the Name text field.
  3. In the Content Editor, copy-paste the text Have the titanium shipments arrived?
  4. Click Save Step.

This is what the canvas looks like now:


Creating the first outcome

A flow begins with the Start element, which is fixed on the canvas. The first outcome in the flow is the outcome of the Start element, which connects an arrow from Start, to the first element the builder places on the canvas.

Outcomes show how a flow progresses. The ‘Label’ text on outcomes gets converted into clickable buttons.

  1. Hover your mouse on StartThe mouse pointer changes from a crossbar to a hand.
  2. Drag an arrow from Start to Verify.
  3. In the Configuration Panel, type Go in the Name text field, and click Save Outcome.

This is what the canvas looks like now:


Importing the Gmail Service

Before we start using a service integration, we need to import it to the flow.

  1. Click Shared Elements on the sidebar.
  2. Select Services.
  3. Click Import Existing.
  4. Click the Import button next to Gmail.
  5. Click Close.

The Shared Elements > Services screen will show the Gmail service once it is imported to the flow.


Creating the Message
  1. Drag a Message element from the sidebar, to the canvas.
  2. In the Configuration Panel, type in a name for the Message element in the Name field. Example: Send mail.
  3. Click New Message Action.
  4. From the drop-down menu The Service to send the Message, select Gmail.
  5. Click the Select button next to Send Email Simple.

  6. The Message Action is pre-populated with the text Send Email Simple.
  7. Click Select or create a new Value in the Value field for Body.
  8. Click Create a new Value.
  9. The Name says Body. You can edit it to anything you like.
  10.  The What kind of Value is this? field should say String.
  11. In the Default Value field, copy-paste Dear AI, The shipment has arrived. We can get started on the design. Thanks, Pepper.
  12. Click Save.
  13. Click Select or create a new Value in the Value field for From.
  14. Enter Gmail in the Search bar, and select Gmail Username.
  15. Click Select or create a new Value in the Value field for Subject.
  16. Click Create a new Value.
  17. The Name says Subject. You can edit it to anything you like.
  18.  The What kind of Value is this? field should say String.
  19. In the Default Value field, copy-paste the text Shipment Status. 
  20. Click Save.
  21. Click Select or create a new Value in the Value field for To.
  22. Click Create a new Value.
  23. The Name field says To. You can edit to anything you like.
  24. The What kind of Value is this? field should say String.
  25. Enter the email address of the person you want to send the email to in the Default Value field. You can add multiple email addresses separated by a semi-colon.
  26. Click Save.
  27. Click Apply Message Action.
  28. Click Save Message.
    This is what the canvas looks like now:

Creating an Outcome for Verify
  1. Hover your mouse on Verify. The mouse pointer changes from a crossbar to a hand.
  2. Drag an arrow from Verify to Send mail.
  3. In the Configuration Panel, type Yes in the Name and Label fields.
  4. Click Save Outcome.

Adding the confirmation screen
  1. Drag a Step element from the sidebar, to the canvas.
  2. In the Configuration Panel, copy-paste the text Email Sent in the Name text field.
  3. In the Content Editor, copy-paste the text Thank you for your time.
  4. Click Save Step



This is what the canvas looks like now:


Creating the second outcome
  1. Hover your mouse on Send mail. The mouse pointer changes from a crossbar to a hand.
  2. Drag an arrow from Send mail to Email Sent.
  3. In the Configuration Panel, type Yes in the Name field. (This outcome does not need a button-click from the user – and therefore has no Label field.)
  4. Click Save Outcome.

That was fast!

And… we are done building. This is what the canvas looks like now:

Let’s run the flow now, and see how easily it converts into an app.


Appchievement!

It took us around 45 minutes to build an app that can send out emails.

This is what the first screen of the app looks like on a browser:

Clicking on Yes, triggers a message action (which happens internally) that sends out the email. Once the email is sent, we receive the ‘Email Sent’ screen:

On your mobile, this is what the first screen looks like:

This is what the ‘Email Sent’ screen looks like:


Check out the glossary for a definition of terms and key concepts that appear in the Boomi Flow website, Drawing Tool, technical documentation, blogs, and marketing communications.

If you need to take a closer look, click on the images to enlarge them. Have a question? Click the Help button on the bottom right-hand corner of this page to ask.