1. Help Center
  2. Slack
  3. Integrations, Webhooks & APIs

Integrating Polly with Google Calendar

If you want to use Polly to automatically send meeting-effectiveness surveys, you’ve come to the right place!

The following steps will walk you through how to integrate Polly with Google Calendar, so that users can add Polly to their own Google calendars and begin collecting feedback on the effectiveness of their meetings.


Pre-Requisites

Before you get started here’s what you’ll need:

  • Access to Polly workflows and the Polly API 
  • A Polly template for a meeting effectiveness survey
  • Access to the Google Calendar API
  • Access to the Google App Script writer. Code samples are here: Apps Script

Step 1: Set up Polly Workflow

You’ll want to set up a Polly workflow that triggers off of an API call, and passes over any parameters from Google Calendar that you’ll want to include as part of the survey.


Here is an example set up in Polly:


In this example, we’ve chosen the API trigger, and set up the following parameters:

Recipient: This parameter is key, as it defines who the Polly will be sent to. In this case, we will pull the attendees of the meeting (you can include the meeting owner as well), and send them the Polly survey.

Title: We’ve included this parameter to help the recipients of the survey know which meeting they are giving feedback on. In the survey, the users will be able to see the title. For example, they will see Meeting Name: All Hands March 2021

Sender: We’ve included this parameter as an additional way to help recipients of the survey known which meeting they are giving feedback on. In the survey, the users will be able to see the sender. For example, they will see Meeting Owner: Lauren Hayes

Once you’ve set up the parameters, you will choose the survey you want to send and the audience. Here is an example:


A key point here is that you will choose the variable audience option off of the email parameter you have provided. In this case, recipient. This is why it’s vital to add the parameter for the attendee’s emails.

 

✏️ Note: The emails gathered from Google Calendar must match the email addresses associated with the users in Slack. If you have multiple email domains and/or the Slack emails do not match the Google Calendar emails, sync with Polly support on workaround options.

Step 2: Set up Google App Script

Once you have your Polly workflow set up, you’re ready to set up the Google App Script which will ping the Polly workflow via the Polly API you set up in Step 1.

Using the Google calendar API, there are a few methods which are needed to pull both the triggering event, in this case, that a meeting has ended, as well as the set parameters (recipient, title, sender)

getEvents(startTime, endTime): Necessary to pull the trigger event, that a meeting has ended. You can set the script to run on a set time, for example, 15 minutes, and filter for any meeting that has ended within the last period of time (ie, the last 15 minutes)

getGuestByEmail(email): Pulls the attendees by email, will be used to send attendees Polly surveys

getTitle(): Pulls the title of the event, used to populate title parameter

getCreators(): Pulls the creator of the event, used to populate sender parameter

To create the script, go to script.google.com/create.

When you’ve added your code, run it. You’ll need to authorize the script to access your calendar.

If it runs successfully, the script will ping the Polly API, and trigger your workflow, passing over the attendee’s emails and sending them a Polly directly in Slack.

Step 3: Distribution

Because calendars are owned at the user level, and not the company level, any user who wants to enable their meetings to be eligible for meeting effectiveness surveys via Polly will have to add this app script on their Google account by going to script.google.com, enable calendar services, and authorize the script to access their calendar and ping the Polly API.

Therefore, Polly suggests starting with a sample group of users, helping them deploy the script, and monitoring early activity closely. 

Step 4: Results

Once the app script is deployed and Pollys are sent to users, you will start seeing results appear in the workflow at app.polly.ai 

You can grab a quick visualization in the workflow view within the Polly app. For deeper and customized visualization, you can connect Polly to your own visualization tool using our Google Sheets integration, our API, or our webhooks.

For example, you can use Polly’s Google Sheets integration to automatically send the data from the workflow to a Google Sheet.

From there, you can add any number of filters and/or rules to appropriately sort, visualize, or send out your data. For example, you can have a rule which sends results from a specific owner to a sheet to which that user has access. That way, they can gauge the effectiveness of their own meetings.