Integrating Flow XO and Gmail using Integromat

This article will explain the steps required to integrate Flow XO with Gmail using the popular integration-as-a-service provider Integromat. Although this article is specific to Integromat, the overall design of the solution will be nearly identical to any other integration service you may prefer, such as Zapier, and the setup on the Flow XO side will be the same, so even if you aren't using Integromat, you should be able to follow along using your preferred integration provider.

There are two major scenarios we will be covering here:

  1. Sending an e-mail from Flow XO via your Gmail account
  2. Triggering a Flow XO flow when a new email arrives in your Gmail inbox.

Part 1 - Sending a Gmail email through Integromat

To integrate with Integromat, or any integration-as-a-service provider, the main tool we need to use is HTTP and Webhooks. An HTTP task will send data out of Flow XO, and a Webhook cause Integromat to listen for our data and execute the desired behavior. 

Fortunately, we can build reusable components in both Flow XO and Integromat so that once we set things up initially, sending Gmail from Flow XO will very quick in easy from all of your Flow XO chatbots and workflows.

Here is an overview the steps we'll need to to follow to implement this solution

  1. Create an account on Integromat. You can do that here. Integromat has a generous free plan that works well with this scenario.
  2. Create a webhook in Integromat that we can use send data about the e-mail we want to send. We need to copy the webhook URL that Integromat generates for later use.
  3. Create the reusable "Send E-Mail by Webhook" flow within Flow XO using the Webhook URl from step 1
  4. Create a disposable "test flow" that we can use to trigger our webhook during development.
  5. Execute your "test flow" in Flow XO to send some initial data to Integromat. Integromat will use this to know what fields are available to send to Gmail.
  6. Add a "Gmail" Send Mail step to our Integromat Scenario. 
    1. Use the fields from our webhook test to populate fields of the Gmail integration
    2. Use "Execute Once" to tell our Integormat Scenario to listen for our webhook
    3. Execute our test flow in the test console, to send data to Integromat again
    4. Confirm that the Integromat Scenario received our data at send the e-mail via Gmail
    5. Schedule the Integromat Scenario.
  7. Any time you need to send Gmail from Flow XO from now on, you simply need to add a "Trigger Another Flow" step, passing the email, subject and body as metadata, and Flow XO will work with Integromat to make sure it gets sent.

Step 1 - Create an account on Integromat
Go ahead and do that now if you haven't already. You can do that here: https://www.integromat.com/en/register

Step 2 - Create a webhook in Integromat
We need to create a webhook in Integromat so that we have a URL we can use to send it data. This video shows how to do that:

Step 3 - Create our reusable "Send an E-mail via Webhook" flow inside of Flow X
Now that we have a Integromat webhook URL, we can prepare the reusable flow that we can trigger from any other flow, passing in a few pieces of metadata that will be sent to Integromat for sending email from Gmail. 

Step 4 - Create a disposable test flow to trigger our webhook
This step is optional - but for illustrative purposes, we need a way to trigger our webhook flow. If you are following along with the video, you may want to create this flow as well, or if you have a production flow that is already set up you can always trigger the Gmail webhook flow directly there as well and skip creating this tester.

Step 5, 6 and 7 - Send test data to Integromat and complete our Integration
In these final steps we are going to run our test flow, which will trigger our "Send Email via Webhook" flow and transmit our email parameters to the Integromat scenario we are creating. We can then configure a Gmail step with the data we passed in the webhook, and will have a fully functioning Gmail integration we can use from as many different flows as we like.



Part 2 - Connecting a Gmail Trigger in Integromat to Flow XO

If you need Flow XO to execute a flow or broadcast when you receive a new email in your Gmail inbox, you can easily create a Gmail trigger in Integromat (or Zapier or the integration-as-a-service platform of your choice) and trigger a flow in Flow XO using a webhook. The steps are similar to the "Send an e-mail" integration we went through previously in this article, but reversed:

  1. Create a webhook in Flow XO, and copy the URL
  2. Create a Gmail listener in Integromat, and an HTTP step to send data to Flow XO when a new email is received. Configure that HTTP step with the webhook URL from step 1.
  3. Send test data to Flow XO, confirm the webhook is working
  4. Add your custom logic in your Flow XO flow to handle the e-mail.

Please see the following video for a walkthrough:

As always, if you have any trouble integrating Flow XO with Integromat, or you need help translating these steps to other integration services such as Zapier, please let us know at support@flowxo.com and we'll be sure to help.

Still need help? Contact Us Contact Us