Table of Contents

How to book Google meet by using Pabbly

Alexander Gao Updated by Alexander Gao

Introduction

As Landbot has Calendly integration to book calls, we'd also like to introduce you a flow to book Google meet considering there are many users communicating with their clients with Google meet.

To do that, Pabbly can help you to accomplish the flow, we just need to send some necessary datas collected from Landbot, and Pabbly will book the meeting for you itself, then the users will receive an invitation email, meanwhile the events will be displayed in your Google Calendar.

To do this in the article we will show you how to:

  • 1. Set up in Pabbly the trigger to receive the datas from Landbot
  • 2. Create some blocks in Landbot to prepare the datas to be sent
  • 3. Prepare the Automation trigger in Landbot that will trigger Pabbly workflow with the information needed
  • 4. Use the data collected from Landbot and using Date/Time Formatter, to adjust the time for the end time of the meeting
  • 5. Use the data collected from Landbot and using Google Meet, to setup the necessary contents with the datas collected from Landbot, such as attendee email, start time and end time etc.

Below is an example of the flow:

  • a. Collect the data with Question blocks and button
  • b. Adjust date format with Formulas block
  • c. Set your available time for meeting
  • d. Using Dynamic Data to display the available hours
  • e. Combine the date and the time as a variable
  • f. Send datas to Pabbly

Prepare Landbot
  1. Firstly, we have to make a little flow for collect information, like name, email, date, etc.

The information that we collect, will be stored in variables, that we will send to Pabbly. 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 button block to ask the theme of the meeting:

  1. Remember to save the answer as a variable:
to open the settings of buttons, click on the three points at upper right corner of the block

  1. Let's create a Formulas block:
  1. Reform the date format:
    1. Let's name the result then we are going to use the formula Replace, to replace / with - :
      Replace(@date,"/","-")
    2. In case of we want the users type in a different format, for example DD/MM/YYYY, but in Pabbly only accept RFC3339 format, in Landbot we can adjust it within Formulas block, by using formula ToDate(). Here is an example and the result:
    ToDate(@date,"%d/%m/%Y")

  1. After that, we create a Set variable block, to set the hours that we will be available:

  1. To display the hours as buttons, we have to create a Dynamic data block:

  1. We can put a question that we want to ask the users, then iterate it with the array we set as @time. Before we apply it, we have to save the answer as a variable:

  1. Now we need to create a Set variable block:

  1. Name the variable and below Type the value we combine the reformed date and the hour that users choose with a certain format:
We put +02:00 behind because it's timezone, you can adjust it according to your location.
  1. Create a Automation trigger block:
  1. The final step is leave two messages, one to inform the users the meeting is booked successfully, and the other is to inform them that hour is not available then redirect them to the Question: Date block so they can select again:

Create Pabbly workflow
  1. After set a Trigger automation block, let's open Pabbly, and log in:

  1. What we need to do is press Access Now of Connect:

  1. Then click on the button of Create Workflow at upper right corner:

  1. And give the workflow a name:

  1. Then below Choose Application we select Webhook:

  1. Later it will display this page:

  1. Click on the button of Copy:

  1. Then click on the button Capture Webhook Response:
Prepare Landbot request to Pabbly
  1. During the time it waits for the datas, let's open Landbot, then paste the URL to Trigger automation block:

  1. Now we are going to set the variables we want to send to Pabbly. Scroll down and go to Set data (variables) to be sent section, where you can see we are setting values to the Landbot variables:
For @date_time please use the format YYYY-MM-DDTHH:MM:SSZ (Z means UTC, if you are not at this timezone, you may have to add +HH:00 or -HH:00 to adapt your timezone. ) Also we recommend you to type in an hour which has an event already in your calendar, for the convenience of the following steps when we are setting them up.

  1. And click on Test webhook trigger button:
  1. If you scroll down, you will see the response from Pabbly:

  1. As long as the status code is 200, means our request is successfully sent.

Inside of Pabbly check request data
  1. Now we turn back to Pabbly:

Now we have seen below appears new fields. Means Pabbly has received our variables.

Yes, the @name, @email, and @age are the same as we sent to Pabbly: This is how the trigger works, we send variables to Pabbly, they receive, and when we try to test it as we did in step 15, it will be shown.

Adjust the date format

Create the action to calculate the hour
  1. And now click on the plus button, and search for Date/Time formatter:

  1. In Action Event we select Add/Subtract time, then click on Connect:

Set the date and calculation
  1. Below Enter date we select the date we sent from Landbot:

  1. Below Expression we can put +1 hour for example, it depends on how long you want the meeting to be:

Set the date format
  1. Because we just want to do a calculation, therefore, we don't have to change the date format, just choose the date format as the one we sent for these 2 format options:

  1. Click on Save & Send Test Request, and as we can see the result is down there:

Create the action of Google Calendar

Create Google Calendar and connect
  1. Click on the Plus button, and search for Google Calendar:

  1. Then we choose Get Free/Busy Information:

  1. Click on Connect and connect with our Google Calendar:

Enter the start time and the end time
  1. Below Minimum Time we use @date_time from Landbot, and below Maximum Time we put in the calculated time from the second action, to check this interval is busy or free:

Test the action
  1. Click on Save & Test Request:

As you can see here, the last two labels conclude busy, means during this interval there is an event, if not, there won't be these two labels.

Create Router based on Busy Information

Create Router
  1. Click on the plus button, and search for router:

Set conditions to filter
  1. Click on Set Filter & Action Steps:

  1. Below Select label we select those two labels that we get from last action, and select Is Exist as the filter type:

Test the request
  1. Then click on Save & Send Test Request:

As you can see in the value, the condition is true, so in this route the flow can continue to work, also it means the interval is occupied, the user can not book the meeting.
Return and trigger Landbot message
  1. Click on the plus button, and search for API by Pabbly:

  1. For Action Event we choose Custom Request, and then we select Put for the method:

  1. Now we have to go to Landbot API documentation(Customer > Assign bot), to get the URL for API. Copy the URL:
  1. Then paste it to Endpoint URL in Pabbly:

  1. Then let's replace :customer_id with the ID we sent from Landbot:

  1. Then open the builder, find its URL, copy the number in front of builder:

  1. Go back to Pabbly, replace :bot_id with it:

  1. Now we need to add headers, click on the check box in front of Add Headers:

  1. Now let's turn to Landbot to get the token, by clicking on the avatar > account, scroll down, in the API token:

  1. Copy it:

  1. Go to Pabbly, below Label we type in Authorization, below Value we type in the token :

It should be displayed like: Authorization Token XXXXXXXXXXXXXXXXXX

(You can also check at the top of Landbot API documentation, at General )

  1. Then we add another header, below Label we type in Content-Type, in Value we type in application/json:

  1. Let's turn back to Landbot API documentation, copy the Request-example:
{ "launch": true,
"node": "XXXXXXXX"
}
  1. Paste it to Data, in the page of Pabbly:

  1. Now we turn back to our bot builder, to copy the reference of the message block which informs the users the hour they choose is not available:

  1. Paste the reference to the code:

  1. Click on save and click on Done to finish this route:

Create Router based on Free Information

Set conditions to filter
  1. Click on Set filter & Action steps:

  1. This time we also select the last two labels from Google Calendar action for the label, but for filter type, we select Does not exist:

  1. After it's set, click on Save & Send Test Request:

As the response displayed with Condition is false. But if here comes out with Condition is true, means in that interval it's free to book a meeting, so in the following steps we are going to set the action of Google meet.
Create Google Meet
  1. Click on the plus button, and search for Google Meet:

  1. Now we select Schedule a Meeting for Action Event and click on connect, to establish a connection with our google account:

Set up the meeting details with datas collected
  1. Below Summary we choose @summary we sent from Landbot as the theme of meeting
  1. Description is the resume of the meeting, so we can use @name and @summary to make it more dynamic:

  1. Below Start Time we choose the date and time we sent from Landbot, and Below End time we choose the date and time calculated in the second action:

  1. Below Attendee Email, it requires JSON format:
{"email":""}

  1. Click on Save & Test Request:

Return and trigger Landbot message
  1. Click on the plus button, and search for API by Pabbly:

  1. For Action Event we choose Custom Request, and then we select Put for the method:

  1. Now we have to go to Landbot API documentation(Customer > Assign bot), to get the URL for API. Copy the URL:
  1. Then paste it to Endpoint URL in Pabbly:

  1. Then let's replace :customer_id with the ID we sent from Landbot:

  1. Then open the builder, find its URL, copy the number in front of builder:

  1. Go back to Pabbly, replace :bot_id with it:

  1. Now we need to add headers, click on the check box in front of Add Headers:

  1. Now let's turn to Landbot to get the token, by clicking on the avatar > account, scroll down, in the API token:

  1. Copy it:

  1. Go to Pabbly, below Label we type in Authorization, below Value we type in the token :

It should be displayed like: Authorization Token XXXXXXXXXXXXXXXXXX

(You can also check at the top of Landbot API documentation, at General )

  1. Then we add another header, below Label we type in Content-Type, in Value we type in application/json:

  1. Let's turn back to Landbot API documentation, copy the Request-example:
{ "launch": true,
"node": "XXXXXXXX"
}
  1. Paste it to Data, in the page of Pabbly:

  1. Now we turn back to our bot builder, to copy the reference of the message block which informs the users the meeting is successfully booked:

  1. Paste the reference to the code:

  1. Click on save and click on Done to finish this route:

Test the bot and check result in Google Calendar

Selected interval available

And also, the event appears correctly in Google Calendar, with the date and the hour we selected.

Selected interval not available

As it displayed, the message is informing that the interval is not available and redirect the users to select another date and hour.

How did we do?

Contact