Google Cloud Functions

Send your event data from RudderStack to Google Cloud Functions.

Google Cloud Functions is a Functions-as-a-Service (FaaS) product that lets you run your code in the cloud without any servers or containers.

RudderStack supports Google Cloud Functions as a destination where you can send your event data seamlessly.

Find the open source code for this destination in the GitHub repository.

Getting started

RudderStack supports sending event data to Google Cloud Functions via the following connection modes:

Connection ModeWebMobileServer
Device mode---
Cloud modeSupportedSupportedSupported

Once you have confirmed that the source platform supports sending events to Google Cloud Functions, follow these steps:

  1. From your RudderStack dashboard, add the source. Then, from the list of destinations, select Google Cloud Functions.
  2. Assign a name to the destination and click Continue.

Connection settings

To successfully set up Google Cloud Functions as a destination, you need to configure the following settings:

  • URL: Enter the Trigger URL obtained in the Trigger field during the cloud function setup. For more information on obtaining the URL, see FAQ below.
  • Required Authentication: This setting is turned on by default. Turn it off if your cloud function does not require authentication.
  • Credentials: Enter your service account credentials here. This is a required field if Required Authentication setting is turned on, that is, your cloud function requires authentication. To create service account credentials from scratch, see the Google documentation.
  • Enable Batch Input: Turn on this setting to pass a batch input (array of events) to your cloud function.
    • Max Batch Size: If Enable Batch Input setting is turned on, specify the maximum batch size in this field.
  • OneTrust Cookie Categories: This setting lets you associate OneTrust cookie consent groups to your cloud function.

Supported events

Google Cloud Functions accepts identify, track, page, group, and alias events.

info
This destination accepts raw event data similar to a webhook. RudderStack sends the entire event payload to Google Cloud Functions without any transformation or modification.

FAQ

How do I create a Google Cloud Function?

  1. Log in to your Cloud Functions account and click VIEW CONSOLE.
  2. Select your project.
  3. Then, click CREATE FUNCTION.
  4. Enter a Function name and select the Region from the dropdown.
warning
Verify that your cloud function name is valid.
  1. In the Trigger field, select HTTP or HTTPS, depending on your use-case.
  2. In the Runtime, build and connections settings, specify the memory allocated for the cloud function in the Memory allocated field.
  3. Configure the rest of the cloud function settings as per your requirement and click Next.
Google Cloud Functions setup
  1. Add the function code and the language in the Runtime field.
  2. Enter the function name as defined in your code in the Entry point field.
  3. Click Deploy to save your settings and create the Cloud Function.
  4. In the TRIGGER tab, copy the trigger URL - this is required to set up Google Cloud Functions as a destination in RudderStack.
Google Cloud Functions trigger URL

Questions? Contact us by email or on Slack