Back to contents

JetAppointment: How to Add Appointments to Google Calendar and Gmail

 

This tutorial will teach you how to connect Google Calendar, Gmail, and the JetAppointment plugin using the Integromat platform. This connection will automatically transfer bookings made on the website to Google Calendar date slots and your email.

When users book appointments, it would be helpful if all appointments were shown on the Google Calendar schedule and sent to your email address. To connect the JetAppointment plugin to Google Calendar and Gmail, you could use Integromat.

How to Connect the JetAppointment Plugin to Google Calendar

1 Step — Set up the Integromat

Integromat is a free platform that allows you to connect apps and automate workflows using a no-code visual builder.

Sign in or sign up to the Integromat platform. After getting to the “My Lab” page, go to the “Scenarios tab in the left-side menu and click on the “Create a new scenario” button in the upper right corner.

create a new scenario

Hit the big plus button and choose the “Webhooks” module from the list of tools. A Webhook in web development is a method of augmenting or altering the behavior of a web page or web application with custom callbacks. More about Custom Webhook you can find out in this Integromat tutorial

webhooks

Then you’ll see the list of triggers and actions. You need to choose “Custom webhook.

custom webhook

Click on the new Webhooks module. Hit the “Add” and the “Save” button to enter the name for the Webhook.

add a hook

After that, you will see the generated link, which you should copy to the clipboard. Then proceed to your WordPress website without closing the Integromat window.

listening for the data

2 Step — Set up the Appointment Form

A detailed guide on how to create JetAppointment forms from scratch can be found here.

If you already have such a form, just click to edit the one you want to connect with Integromat. In the Post-submit Actions / Notifications Settings block, you need to click “Add Notification” and choose the “Call a Webhook” Type for it. Paste the link to the Webhook URL field. Hit the “Apply Changes” and “Update” buttons.

call a webhook

Navigate to the front-end page with that form and submit it. After that, you should see the green note: “Successfully determinated” in the Webhook. Hit the “OK” button.

3 Step — Adding the Google Calendar module

Click the “Add another module” button, insert the “Google Calendar” module and choose the “Create an Event” action.

add google calendar

Click the “Add” button near the Connection bar and connect Integromat to the Gmail account. Select your login for the Primary Calendar as the Calendar ID. As Event Name, choose as many items as you want, like price, user name and surname, user email, and so on. They will be shown in the Google Calendar slots as additional information about appointments. The item names are assimilated with the field names from the form that is connected with the Webhook. Drag and drop slot item to the Start Date field and slotEnd item to the End Date field.

event name

Since the date and time are saved in the timestamp, they need to be parsed. Click on the “Date and Time” icon and drag and drop the parseDate function to the Start Date and End Date fields. Prescribe the dates in such a way as it is shown on the screenshot. X is the Unix timestamp (the date format of the input). Other tokens for date/time parsing you could get here.

parse date

The slot and slotEnd items work for appointments with the time frames, but if you need to book an event only by days (not by hours), you need to drag and drop the date item.

date item

Don’t forget to click on the “OK” button when you finish.

To run the activated scenario, you could set up the schedule. Enable the “sheduling” toggle at the bottom left corner and push the “Schedule setting” icon. You can read more about it in the Integromat article and choose the most appropriate option.

schedule setting

And then, hit the “Save” icon on the panel of controls at the bottom of the page.

Now, go to the Google Calendar service. After you run a new scenario, the appointments will appear in the schedule.

google calendar schedule

How to Connect Gmail to the JetAppointment Plugin and Google Calendar

In the Tools panel, click on the “Flow Control button. Drag and drop the Router module and connect it with the Webhook and Google Calendar. Hit the “Add anoter module” button, add the Gmail module and then pick the Send an email action.

router

Click the “Add” button near the Connection bar and connect Integromat to your Gmail account. You also need to define the email address for the letters to be sent To, the Subject of the letter, the Content, and the Attachments. To fill the bars, you can use the data users will put into the form fields, just choose the ID of a particular field.

set up gmail integromat

Push the “OK” button and Run the scenario.

That’s it. By now, the Google Calendar and the JetAppointment plugin are connected to show all appointments on the schedule. Also, with Gmail, you will receive information about all appointments with emails.