Gobot + Zapier


How do I use data collected by my chatbot with another application? Zapier!

This article takes you through the steps of creating a Zapier webhook. For more general information about creating a generic webhook on Gobot, click here

Zapier is useful if you want to use Gobot’s webhook to trigger an action in a third party app without any coding. However, Zapier is a paid service (with only a limited free plan) so we did not want to force our users to use Zapier to have their bots send emails or trigger email sequences. For this reason Gobot has a built in email functionality and is directly integrated with a number of top email marketing platforms.  So you don’t need to rely on Zapier to send an email or add email addresses to your email lists, this all can be done easily within Gobot. With that said, there are a large number of other uses for Zapier - so we lay out how to set up a Zapier Zap! below.

Just by way of example, you can use Zapier to easily post messages from Gobot on Slack or SMS, transfer files uploaded on Gobot to Dropbox or Google Drive, create new contacts or tag them in your CRM, add/remove email addresses from MailChimp email lists, create a helpdesk ticket, add data collected by Gobot to a spreadsheet, and so much more!

 ZAPIER WEBHOOK SETUP:

Gobot is not listed in Zapier’s directory but you can still easily create a Zapier Zap to have Gobot trigger some action in a third party application in Zapier’s directory. Very high level, all you need to do is:

(1) include a webhook in your bot chat and make sure to send the webhook to the URL provided by Zapier, and

(2) choose a third party app in Zapier and tell it what you want it to do upon receipt of the the webhook from Gobot.

Step 1: Drag the Webhook button in your script

In Bot Build Mode, drag the Webhook button from your right hand tool palette into your bot script and then, in the right hand panel, identify which collected fields you want communicated to the third party app. For now, leave blank the URL field (we need to get this URL from Zapier).

Step 2: Create a Zap! in Zapier

Step 2a:Sign into Zapier and click Make a Zap!

Step 2b: Under Choose a Trigger, type webhooks, and then select Webhooks by Zapier.

Step 2c: Select the trigger Catch hook and then click Save and Continue.

Step 2d: Skip the Pick off a child key step by clicking Continue.

Step 2e: Click Copy to clipboard to copy the custom URL and paste this in the URL field in the right hand panel for the Webhook button in Gobot (this is the field we left blank in step 1 above).

Stepf 2f: Go back to Gobot and publish your bot.  Webhooks don't work in test mode, so you will need to actually publish and run your bot on your site (or a demo site) rather than click Test.  Once the portion of your script including your webhook is reached the webhook should be sent to Zapier. Go back to Zapier and click OK, I did this. Zapier will tell you that the test has been successful (namely that Zapier has received the webhook sent by Gobot).

Step 2g: Soon you will need to decide what action you want triggered by your Gobot webhook. Before you do that you first need to decide what app you want to conduct the action. Under Choose an Action App, type the name of the app you want to receive the webhook information sent by Gobot. For example, if you want to enter data into a Google sheets spreadsheet, choose Google Sheets.

Step 2h: Next, you will need to enter some customization details laying out how you want the action completed. These steps will differ depending on the app you choose. For example, if you want an email sent you will need to enter the email address, email body, etc. If you want data from your bot entered into Google Sheets, you will need to identify the spreadsheet and specifically where you want the data placed in your spreadsheet, etc.

Step 2i: Click Create and Continue to make sure that running your bot does in fact result in the action you set up, e.g., data collected by your bot is placed in the spreadsheet you identified, etc. You should see a “Test Successful” message.

Step 2j: Finally, name your Zap and turn it on. Done!

As a final step publish and run your bot - make sure you get to the portion of the bot script with your webhook. Next, check the third party app you chose in Zapier to make sure the action your bot was supposed to trigger was in fact triggered.


ALTERNATIVE METHOD TO CREATING A ZAP!

Another method exists for creating a Zap! It is not as straightforward so we don't recommend it, but it may be useful if you don't want to change your bot to include a webhook for whatever reason. The basic concept is to use the notification email sent by Gobot (or any other email sent by Gobot) as your Zapier trigger. Recall, you can control your notification emails under the Notifications tab in the Bot Setup page in Bot Build Mode. You can also send emails by dragging the Email button from your tool palette in the right hand panel into the center panel in Bot Build Mode.

Here are the steps to using a Gobot email as to Zapier trigger:

Go to http://parser.zapier.com and click to sign up.

Click Create Mailbox and you'll be given a robot.zapier.com email address.

Go to the Notifications tab in the Bot Setup page for your bot and enter this email address for your notification. Alternatively, you can use another email sent by your bot using the Email button functionality. Just include the robot.zapier.com email address as the recipient in the right hand editor panel for the Email button in your script.

Publish your bot and run it so that your Gobot email is sent including all of the desired fields collected by your bot.

Go back to the Zapier email parser and refresh the page - you should have received your Gobot email. Highlight the text in your email that you want extracted and give it a name.

Log back into your Zapier account to create a Zap! Click Make a Zap!, and under Choose a Trigger App type "email parser" and select Email Parser by Zapier.

Next, follow the same steps above (2g onward) to Choose an Action App like Google Sheets or Slack, etc. Here are some zaps you can create: http://zapier.com/zapbook/email-parser/



Copyright 2017, Gobot LLC, All rights reserved.


Was this article helpful?


You might also find interest in these related articles:

  1. Gobot Chatbot Webhooks