All Collections
Integrations
Google Calendar
How to automatically send a follow-up sequence after a specific meeting ends in Google Calendar
How to automatically send a follow-up sequence after a specific meeting ends in Google Calendar

How to connect Google Calendar to automatically send an InputKit follow-up sequence by email 1 hour after a specific meeting ends

Philippe Genois avatar
Written by Philippe Genois
Updated over a week ago

One of the most popular ways to automate sendings in InputKit is with Google Calendar. Our clients usually want to follow up after a certain type of meeting, whether it's a final project delivery or any other type of important customer touch point.

The way to do that is with Zapier. In this guide, you'll learn how to automatically send a follow-up sequence by email to the customer 1 hour after any specific event ends.

Note: To do this, you'll need a Zapier account, which is around $20 USD/month.

In order for this automation to work, you must follow these 3 restrictions

1. The calendar event that will trigger the email must contain this code in its title:

(iii)

This is important because you want to tell Zapier which calendar event should trigger the action. You probably don't want all of your events to trigger it. So add this code only to the events you want to trigger the action.

If you're familiar with javascript, you'll be able to edit that code.

2. The calendar event that will trigger the email must contains the customer's email address inside its description.

If the description contains multiple email addresses, Zapier will use only the first one.

3. The calendar event that will trigger the email must contains the customer's full name, between parentheses inside its description.
For example:

(John Doe)


See this image as an example:

1. Open a Zapier account (if not already done)

a) Create a Zapier account here: https://zapier.com/sign-up/
b) Use this link to access to InputKit app inside Zapier
c) Click the "Accept Invite & Build a Zap" button (see image below)

2. Create the Zap and connect to Google Calendar

a) As the trigger step, search for 'Google Calendar'

b) Select 'Event Ended'. That means Zapier will listen for any ending event in your Google calendar, which is what you want. In other words, anytime an event in your calendar is done, Zapier will read it and send a sequence by email to the customer's email address in that event description.


c) Select your calendar where you'll add the events. 

d) Add the search term

(iii)

d) Click 'Continue' and 'Continue'


3. Add the first action step

a) Click 'Add a step'

b) Search for 'Code by Zapier Action' and select that

c) Select 'Run Javascript' (don't worry, you don't need to understand Javascript)

d) In the Input Data section, copy the image below:

date --> Event Ends
description --> Description
title --> Summary


e) In the code section, copy+paste the javascript code below.

const title = inputData.title;

const description = inputData.description;


// This is used to filter events based on a unique code

const uniqueCode = '(iii)';

var isValid = false;

const hasCode = ((title && title.indexOf(uniqueCode) > -1));

const oneHour = 60*60*1000;

function extractEmails (text) {

  if(text){

    const emails = text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);

    if(emails){

      var email = emails[0];

      if(!email || email === 'undefined' || email === ''){

        email = null;

      }

      return email;

    }else{

      return null;

    }

  }else{

    return null;

  }

}

function formatDate (date) {

  if(date){

    return date.toISOString().slice(0, 19).replace('T', ' ');

  }else{

    return null;

  }

}

function extractName (text) {

  if(text){

    return text.substring(

      text.lastIndexOf("(") + 1,

      text.lastIndexOf(")")

    );

  } else {

    return null;

  }

}

function capitalizeFirstLetter(string) {

  if(string){

    var name = string.toLowerCase();

    string.charAt(0).toUpperCase() + string.slice(1);

    return capitalizeFirstLetter(name);

  }else{

    return null;

  }

}

var customerName = extractName(description);

var customerEmail = extractEmails(description);

var dateToSend = new Date(inputData.date);


// Send the email 1 hour after the event ends

dateToSend.setTime(dateToSend.getTime() + oneHour);

dateToSend = formatDate(dateToSend);

if(customerEmail && hasCode && customerName){

  isValid = true;

}

output = [{isValid, customerEmail, customerName, dateToSend}];

f) Click 'Continue' and then 'Test this step'.  You should see something like this:

4. Add the filter step

This step will check if the event respects the criteria to continue. (contains the special code (iii), contains the customer's email address name. If it does, it will continue. Otherwise, it will stop there.

a) Choose the action step 'Filter'

b) Choose the 'Is Valid' option under 'Run Javascript'. Then, choose '(Boolean) is true'

c) Click 'Test and Continue'

5. Add the Delay step

a) Choose the action step 'Delay'

b) Select the 'Delay For' option

This will let you delay the sending for the desired amount of time. In this example, we'll use 1 hour.

e) Click 'Continue' and then 'Skip test'

6. Add the InputKit step

a) Add the action step 'InputKit' (use the latest version)
If you don't see InputKit in the list, make sure to use this link to get access.

b) Select the 'Send a Sequence by Email' action

c) Connect your InputKit account with your email/password

d) Choose the sequence you want to send to those customers

e) For the customer email address, select 'Customer Email' under 'Run Javascript'

f) For the customer name, select 'Customer Name' under 'Run Javascript'

g) Click Continue

h) Click 'Send test to InputKit'
You should see a success message like below

Click 'Finish' and you're done!

Your zap should look something like this: 

If something is not working or if you need any help with this process, feel free to reach out to us, we'll be glad to help!

Did this answer your question?