Skip to main content

Google Calendar integration in Journeys

Auto-create calendar events, add meeting links, and more

Helga Björg Helgadóttir avatar
Written by Helga Björg Helgadóttir
Updated this week

🔐 Authentication Options

There are two ways to authenticate:

  1. OAuth 2.0 User Consent

    Recommended if you plan to auto-create events for only one or a few employees.

    • Each employee must sign in once with their Google Workspace account and consent to Journeys accessing their calendar.

  2. Domain-Wide Delegation

    Recommended if you plan to auto-create events for many employees.

    • Requires a Google Workspace admin to grant Journeys access to all calendars within your domain.

This article will cover how to set up OAuth 2.0 User Consent authentication.

OAuth 2.0 User Consent Flow

Follow these steps carefully.

Step 1: Create Client Credentials

  1. Create a new project, give it a name (e.g., Journeys-GoogleIntegration) and select it.

  2. Navigate to APIs & Services > Library.

  3. Search for Google Calendar API and click Enable.

  4. In APIs & Services > Credentials, click Create Credentials > OAuth client ID.

  5. You will be prompted to configure your consent screen:

  6. Give the app a name (e.g., [YOUR_COMPANY_NAME] Journeys Integration) and choose a User support email.

  7. For Audience, choose:

    1. Internal - if all of your employees who will use this integration are part of the same Google Workspace domain (everyone has a @yourcompany.com Google account).

    2. External - if any employee will connect using a personal Gmail account (e.g., @gmail.com), or if your company does not use Google Workspace.

  8. Enter an email address to receive important updates about your project. This can be your own email or your IT/admin email. Then click Create to finish setting up the consent screen.

  9. Next, create the OAuth client ID. For Application type, choose Web application. Give it a name (e.g., Journeys-GoogleOAuth).

  10. Under Authorized redirect URIs, add: http://localhost

  11. Click Create.

    You should see the following window:

  12. Important: Copy the Client ID and Client Secret, or download the JSON credentials file. Store it securely and do not share it with others.


Step 2: Generate the Authorization Code

Ask the employee who will be granting Calendar access to paste the following URL into their browser (replace [YOUR_CLIENT_ID] with the Client ID from step 1):

https://accounts.google.com/o/oauth2/v2/auth?
client_id=[YOUR_CLIENT_ID]
&response_type=code
&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar
&redirect_uri=http%3A%2F%2Flocalhost
&access_type=offline
&prompt=consent
  1. The employee will be prompted to sign in to Google and approve access.

  2. After consenting, the browser will redirect to:

http://localhost/?code=[YOUR_CODE]&scope=https://www.googleapis.com/auth/calendar

Copy the value of [YOUR_CODE] and store it immediately.

⚠️ Note: The code expires in 1 hour. If you don’t complete the next step in time, you’ll need to repeat this step.


Step 3: Exchange the Authorization Code for a Refresh Token

  1. In Journeys' Integration Builder, create a new integration (name it Google Calendar).

  2. Create a new endpoint and fill in the fields as below:

    URL: https://oauth2.googleapis.com/token

    Example request:

    {
    "code": "[YOUR_CODE]",
    "client_id": "[YOUR_CLIENT_ID]",
    "grant_type": "authorization_code",
    "redirect_uri": "http://localhost",
    "client_secret": "[YOUR_CLIENT_SECRET]"
    }

    ✏️ Note: replace [YOUR_CODE], [YOUR_CLIENT_ID] and [YOUR_CLIENT_SECRET] with your own.

  3. Save this endpoint and test it.

  4. In the response, locate: "refresh_token": "1//03..."

  5. Copy the refresh token and store it securely.


Step 4: Configure Authentication in Journeys

  1. Go to Authentication and fill in the following fields:

    • Authentication URL: https://oauth2.googleapis.com/token

    • Client ID: your client_id from Google Cloud Console

    • Client secret: your client_secret from Google Cloud Console

    • Extra data:

      {
      "refresh_token": "[YOUR_REFRESH_TOKEN]",
      "grant_type": "refresh_token"
      }

      ✏️ Note: replace [YOUR_REFRESH_TOKEN] with your own.

  2. Test the authentication and confirm you get a successful response:

🎉 And voila, authentication is complete. You can proceed to add endpoints.

Did this answer your question?