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.

Connection compatibility

Destination info
  • Status: Generally Available
  • Supported sources: AMP , Android, Cordova, Cloud, Flutter, iOS , React Native , Unity, Warehouse, Web, Shopify
  • Refer to it as GOOGLE_CLOUD_FUNCTION in the Integrations object.

Connection modes
SourceCloud modeDevice modeHybrid mode
AMPsupportednot supportednot supported
Androidsupportednot supportednot supported
Cloudsupportednot supportednot supported
Cordovasupportednot supportednot supported
Fluttersupportednot supportednot supported
iOSsupportednot supportednot supported
React Nativesupportednot supportednot supported
Shopifysupportednot supportednot supported
Unitysupportednot supportednot supported
Warehousesupportednot supportednot supported
Websupportednot supportednot supported
Supported message types
SourceIdentifyPageTrackScreenGroupAlias
Cloud mode
Supported sourcessupportedsupportedsupportedsupportedsupportedsupported

Get started

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.
  • Consent management provider: Configure the consent management settings for the specified source by choosing the consent management provider from the dropdown. If you choose Custom, make sure to pass the custom consent data to SDK.

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