Table of Contents

Zapier trigger

Alexander Gao Updated by Alexander Gao

Even though Landbot has A native integration of Zapier (Zapier block), but we still want to present to you another option to use the Zapier block in a more flexible and practical... Using the Trigger automation block!

Don't worry, it is still a no-code solution, and we will explain in this tutorial how to do it πŸ˜‰ .

We will show here some examples you can do with this intergation, such as sending values to Google Spreadsheet, generate a PDF, or sending an Email using the Trigger automation block.

So while we are starting this tutorial, we need to open your Bot Builder and enter into your Zapier Account:

If you still don't have a Zapier account, you can create one here:

Trigger a zap with the Trigger automation block

Prepare Landbot
  1. First we have to build a bot flow in your bot to collect the information you need to send to Zapier, like name, email, age, etc.

The information that we collect, will be stored in variables, that we will sent to Zapier.

As in the example below, we are storing the name input in the variable @name, that we will use later.

  1. Then let's set a Trigger automations block.

Create Zap trigger
  1. After set a trigger automation block, let's open Zapier:

  1. We need to do is click on the button Make A Zap:

  1. Search the option Webhook (webhooks by Zapier) and select it:

  1. On the dropdown Trigger Event, choose the option Catch Hook and press continue:

  1. Copy the Webhook URL, so that we can use it in the next steps, and press CONTINUE.
  1. On the following screen, don't press the Test trigger button yet (we will do it after a few more steps).
Prepare Landbot request to Zapier
  1. Go back to Landbot, and paste in the Trigger automation block the URL that you have copied from the Zap.
    Please add it to the URL field in the Trigger automation block.
  1. Scroll down and go to the Set data (variables) to be sent section of the Trigger automation, where you can set test values:
  1. And click on Test webhook trigger button:
  1. If you scroll down, you will see the response from Zapier:

  1. If you see the Status code as 200, and the status as "success", this means that our request was successfully sent.

Check the data of the request (test) in Zapier
  1. Go back to Zapier.
  2. Click on the button Test trigger, to check the information that we have sent from the Webhook Test:

  1. Once we press Test trigger you will see the page below, with the variables and values we used in the test:
As you can see, the @name, @email, and @age are the same as we sent to Zapier:This is how the trigger works, we send variables to Zapier, they receive, and when we try to test it as we did in step 15, it will be shown.

After we turn on Zap, the whole progress will be doing automatically.
  1. So far the part of trigger is done.
    However, after the trigger we have to set up the actions we want to trigger on Zapier. Please keep in mind that this set up is done in your Zapier account, not in Landbot.

Now let's press continue

Action 1 : Insert a new row to Google Sheets

The second part of this integration is setting up an action triggered by a Zap.

As we said before, we will use Google Spreadsheet as an example.

  1. Choose Google Sheets:

  1. Then set the action event you need to use. We will use "Create Spreadsheet Row" in our example.
  1. Then log into your Google Account:
  1. Then we must select the Spreadsheet, the sheet, and finally the variables we want to use.
    We have added as columns to add the information the values "name", "email" and "age".
  1. Finally we can test our trigger and action integration!

  1. Click on Test & Continue,

  1. A simple test is done, but we still have to check our spreadsheet to see if it's what we want!
Webhook is a premium function of Zapier, unless you can turn on it, otherwise just click on test the request in Trigger automation block of Landbot won't send the information right to the Sheet.

Here are they! Exactly what we want to put in.

Action 2 : Make a PDF file

Like first action, we choose an app to integrate, here we will use PDF monkey.

Then in the Action Event we choose generate document, press continue.

  1. Sign in PDFMonkey.
When you sign in PDFMonkey, it requires an API Secret Key, just click on My account page, then copy the key, paste it in the sign in page. Then it's done.

  1. After sign in, let's continue. Below Action Event we choose Generate Document
  1. Let's open PDFMonkey to do some following issues.

  1. Click on add an application.

  1. Let's give it a name! Then click on the green button ADD
  1. After we add it, appears this page, of adding a template. Click on add a template below.
  1. Then we arrive here, choose a template that you need, for example the bill template.
  1. Let's give this PDF a name!
  1. Then click on the green button Create down there of the page
  1. And appears a page like this, maybe the code is making you dizzy, but don't worry, we don't have to edit the code in HTML section, click on Sample data above the code board instead.
  2. What we are going to do now is copy the code.

  1. Then we click on the green button Publish at upper right corner:

  1. Let's turn back to Zapier, the part of customize document:
  2. Let's put the application that we have created below App, and the template we have created below Template:
  3. Then we have come to the part of Dynamic Data: let's paste the code we have copied before.

  1. Also, normally it's very necessary to replace some information with our own variable, or our own data.

Like here we delete the string Company name, and replace it with our variable @name.

  1. Now we don't need to do anything else, just scroll down the page and press continue:

  1. Now it's time to send data, as always, after we confirm there's nothing wrong, we click on test and continue:

  1. Now we are successfully created a document.
  1. After created a document, we have to check it. Let's copy the download_url:
  2. Then create a new tab in the browser, paste it to the search bar, and press enter:
  1. Then it will be downloaded:
  1. Press it and open the pdf:

Yes, it's correct, the action 2 is done!

Also we have to add that it's just a test, so we can download this way. Normally every time you create a document, the document will be generated in the document section of PDFMonkey. Check the photo below.

Action 3: Send an Email by Gmail

  1. As we did in the past actions, select an app to use. In this action, we will select Gmail to integrate. In Action Event, we select send Email

  1. Choose or sign in your Google account,
  2. Then we could use the variables we send from trigger. Such as @email, @name.

  1. Now we send something, let's set the subject and the body, even you can send an attachment.

  1. Finally we have the whole email customized! Let's test it, to see could we receive the email.
  2. Yes, we have received the email sent by our Zap! The action worked.

How did we do?

How to extract data from an external source with Zapier and use it in Landbot