# Google Cloud Functions


> Send your event data from RudderStack to Google Cloud Functions.


[Google Cloud Functions](https://cloud.google.com/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](https://github.com/rudderlabs/rudder-transformer/tree/main/src/v0/destinations/google_cloud_function).

## Connection compatibility

  
  
  
  <div class="quick-info">
    <div>
      <div class="connection-modes-column-headers">
        <table>
          <tr class="connection-modes-column-headers">
            <th colspan="4">
            Destination Information
          </th>
        </tr>
          <tr class="destination-info-content">
            <td>
              <ul>
                <li>
                  <b>Status:</b> Generally Available 
                </li>
                <li>
                  <b>Supported sources:</b>  
                  
                      AMP
                      ,
                  
                  
                      Android (Java)
                      ,
                  
                  
                      Android (Kotlin)
                      ,
                  
                  
                      Cordova,
                  
                  
                      Cloud,
                  
                  
                      Flutter,
                  
                  
                      iOS (Obj-C)
                      ,
                  
                  
                      iOS (Swift)
                      ,
                  
                  
                      React Native
                      ,
                  
                  
                      Unity,
                  
                  
                      Warehouse,
                  
                  
                      Web,
                  
                  
                      Shopify
                  
                </li>
                <li>
                  Refer to it as <b>Google Cloud Function</b> in the <a href="/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/filtering/#filtering-destinations">Integrations object</a>.
                </li>
              </ul>
            </td>
          </tr>
        </table>
      </div>
      <div class="table-content connection-modes-table">
        
          <table>
            <tr class="heading connection-modes-header">
              <th colspan="5">
              Connection Modes
              <a href=/docs/destinations/rudderstack-connection-modes>
                <i class="fa-regular fa-circle-info"></i>
              </a>
            </th>
          </tr>
            <tr class="connection-modes-column-headers">
              <th>Source</th>
              <th>Cloud mode</th>
              <th>Device mode</th>
              <th>Hybrid mode</th>
              <th>Device Mode Transformations
                <a href=/docs/transformations/usage/#device-mode>
                  <i class="fa-regular fa-circle-info"></i>
                </a>
              </th>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                AMP
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Android (Java)
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Android (Kotlin)
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Cloud
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Cordova
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Flutter
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                iOS (Obj-C)
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                iOS (Swift)
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                React Native
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Shopify
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Unity
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Warehouse
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
            <tr class="connection-modes-row">
              <td>
                Web
                
              </td>
              <td>
                <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                 <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
              </td>
              <td>
                
                <img src=/docs/images/no-image.svg loading="lazy"
                    decoding="async" class="img__small" style="
                    margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                    margin-right: 0;" alt="not supported" />
                
              </td>
            </tr>
            
          </table>
         
      </div>
      <div class="table-content message-types-table">
          <table>
            <tr class="heading message-types-header">
              <th colspan="9">
              Supported Message Types
            </th>
          </tr>
          <tr class="message-types-column-headers">
            <th>Source</th>
            <th>Identify</th>
            <th>Page</th>
            <th>Track</th>
            <th>Screen</th>
            <th>Group</th>
            <th>Alias</th>
            <th>Record</th>
            <th>AudienceList</th>
          </tr>
          
          
          
            
              
              
          
          
          
            
            <tr class="heading message-mode-header">
              <th colspan="9">Cloud mode</th>
            </tr>
              <tr class="message-mode-row">
                <td>Supported sources</td>
                <td>
                  <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="supported" />
                </td>
                <td>
                  <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="supported" />
                </td>
                <td>
                  <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="supported" />
                </td>
                <td>
                  <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="supported" />
                </td>
                <td>
                  <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="supported" />
                </td>
                <td>
                  <img src=/docs/images/tick.svg loading="lazy" decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
                <td>
                   <img src=/docs/images/no-image.svg loading="lazy"
                      decoding="async" class="img__small" style="
                      margin-top: 3px; width: 20px;height: 16px;margin-left: 0;
                      margin-right: 0;" alt="not supported" />
                </td>
              </tr>
              
          
            </table>
        </div>
    </div>
  </div>
  

## 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](https://app.rudderstack.com/), 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](#how-do-i-create-a-google-cloud-function) 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](https://developers.google.com/workspace/guides/create-credentials#service-account).
- **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 settings**: Configure the consent management settings for the specified source by choosing the **Consent management provider** from the dropdown and entering the relevant consent category IDs. See [Consent Management in RudderStack](https://www.rudderstack.com/docs/data-governance/consent-management/overview/) for more information on this feature.

## Supported events

Google Cloud Functions accepts [`identify`](https://www.rudderstack.com/docs/event-spec/standard-events/identify/), [`track`](https://www.rudderstack.com/docs/event-spec/standard-events/track/), [`page`](https://www.rudderstack.com/docs/event-spec/standard-events/page/), [`group`](https://www.rudderstack.com/docs/event-spec/standard-events/group/), and [`alias`](https://www.rudderstack.com/docs/event-spec/standard-events/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](https://cloud.google.com/functions) 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.

5. In the **Trigger** field, select **HTTP** or **HTTPS**, depending on your use-case.
6. In the **Runtime, build and connections settings**, specify the memory allocated for the cloud function in the **Memory allocated** field.
7. Configure the rest of the cloud function settings as per your requirement and click **Next**.

![Google Cloud Functions setup](/docs/images/event-stream-destinations/gcf-setup-1.webp)

8. Add the function code and the language in the **Runtime** field.
9. Enter the function name as defined in your code in the **Entry point** field.
10. Click **Deploy** to save your settings and create the Cloud Function.
11. 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](/docs/images/event-stream-destinations/gcf-url.webp)
