Google Calendar

Author: Nasir Ahmed 65 views

Overview

The Advanced Form Integration plugin allows creating connections to Google Calendar from many popular WordPress forms. When a user fills a form on your website, the plugin will instantly send the data and create a new event in your selected Google Calendar.

Supported Features

  • Create a new event on specified date and time in your selected Google Calendar.

How To Setup

Authorizing Google Calendar API

At first, you are required to create a connection with the Google Calendar API. Here is how you should proceed:

  1. Go to Google Developer Console and create a New Project.

  2. Go to the Menu > APIs & Services > Dashboard and select the newly created project from the upper dropdown.

  3. Go to Library menu, select Google Calendar API and click on ENABLE.

  4. Again go to Menu > APIs & Services > OAuth consent screen. Select External and click on CREATE. Put an App name, select User support email, add your website domain in Authorized domains, insert your email in Developer contact information. Click on SAVE AND CONTINUE.

  5. In Scopes section, click on ADD OR REMOVE SCOPES. Search for Google Calendar API and selct the scope named ‘https://www.googleapis.com/auth/calendar’ and hit UPDATE. Click on SAVE AND CONTINUE.

  6. You can add Test users or skip this step. Click on SAVE AND CONTINUE.

  7. Summary page will appear. Click on BACK TO DASHBOARD.

  8. Hit PUBLISH APP button uder Publishing status and Confirm.

  9. Now go to Credentials menu and click CREATE CREDENTIALS. Select OAuth Client ID. Select Web application under Application type and put a name. Copy redirect URI from plugin’s Google Calendar settings and add under Authorized redirect URIs.

  10. You’ll get both Client ID and Client Secreat in the popup. If the popup was closed, you can get the keys in edit screen.

  11. Paste both Client ID and Client Secret in plugin’s Google Calendar settings page, then click on Save & Authorize. On the next page select the Google Calendar account.

  12. An unverified app screen will appear. It is ok, as you are authorizing your own app in your own website. Click on Advance and then Go to yorudomain.com. On the consent page, mark the Google Calendar scope checkbox and click on Continue.

  13. You’ll be redirected to the settings page and the connection status should show as Connected.

Advanced Form Integration – Google Calendar Authorization

Create New Integration

After the authorization process is done, you can start creating new integration. Click on Add New under the AFI menu, New Integration page will appear.

Title

A default title will be auto-generated with an auto incremental number. You can rename it to something related to the task. It will help you to quickly recognize the correct one if multiple integrations are created.

Trigger

Select the sender form in the Form Provider drop-down. For example, Contact Form 7 or Gravity Form, or the Elementor Pro Form which you want to connect. After selecting the form provider, all forms built under that will be fetched and auto-populated in the Form/Task Name drop-down. Select the form that you want to integrate.

Action

Select Google Calendar in Platform drop-down. Then select Add New Event in the Task drop-down.

google calendar - fields
Google Calendar Integration – Fields
Map Fields

Available calendar lists in the authorized account will be auto-populated in the Calendar drop-down. Select the calendar where you want to create the event. You will find Google Calendar fields on the left side and form fields drop-down on the right. This form field drop-down will contain the field titles of the form you selected in the trigger area. You need to map the required fields.

Calendar
All calendars that exist in your authorized Google account will be listed here. Select the one where you want to create the event.
Title (Summary)
Title of the event.
Description

Description of the event. Can contain HTML. Optional.

All Day Event

Mark the checkbox to create an all-day event. For a multiple-day event, the calendar can show the span one day less as it ends at midnight. In this situation add +1day in the end date mapping. The mapping will look like {{end_date}} +1day.

Start Date Time
Start date-time of the event. Accepts regular date or date-time formats, e.g. 2021-10-15, 10/15/2021, 2021-10-15 05:20, 10/15/2021 07:25, etc. If your form has separate date and time fields, you can map both fields here with a space like {{date_field}} {{time_field}}
End Date Time
End date-time of the event. Accepts the same format as Start Date Time.
Timezone

The plugin will use the timezone of your WordPress setup. Use this field if you want to override that timezone. Accepts timezone formatted as an IANA Time Zone Database name, e.g. “Europe/Zurich”.

Location
The geographic location of the event is free-form text. Optional.
Attendees
Accepts attendee’s email. Use comma-separated emails for multiple attendees.

Save Integration

Finally, click the Save Integration button and you are done.

Troubleshooting

After the integration is made, when users fill up the form and submit it, the plugin initiates the process of sending data to the configured platform. It also saves a log that includes what data it tried to send, and what it got in response from that platform. So if you find an integration is not working, your first task is to check the logs. Go to AFI > Log menu and check the recent logs.

On this page