# Google Cloud Functions

**Google Cloud Functions** allows you to get and execute [Cloud Run functions from Google](https://cloud.google.com/functions?hl=en).

## **Parameters**

Take a look at the configuration parameters for the connector. Parameters supported by [Double Braces expressions](https://docs.digibee.com/documentation/connectors-and-triggers/double-braces/overview) are marked with `(DB)`.

### **General tab**

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Default value</th><th>Data type</th></tr></thead><tbody><tr><td><strong>Operation</strong></td><td>The operation to perform. The options are: <strong>Call Function</strong> and <strong>Get Function</strong>.</td><td>N/A</td><td>String</td></tr><tr><td><strong>Function Name</strong> <code>(DB)</code></td><td>The name of the Cloud Run function at Google.</td><td>N/A</td><td>String</td></tr><tr><td><strong>Account</strong></td><td>The <a href="https://cloud.google.com/iam/docs/keys-create-delete#console">service account key</a> to authenticate on the application. Supported type: <strong>Google Key</strong>.</td><td>N/A</td><td>GOOGLE-KEY</td></tr><tr><td><strong>Location</strong></td><td>The location of the Cloud Run function.</td><td>N/A</td><td>String</td></tr><tr><td><strong>Project</strong> <code>(DB)</code></td><td>The name of the Google Cloud project where the Cloud Run function is located.</td><td>N/A</td><td>String</td></tr><tr><td><strong>Body</strong> <code>(DB)</code></td><td>The body for calling the function. If you don't pass any parameters, you must at least enter empty brackets <code>{ }</code> in this field. It is only available if the <strong>Operation</strong> is <strong>Call Function</strong>.</td><td>N/A</td><td>JSON</td></tr><tr><td><strong>Fail On Error</strong></td><td>If the option is activated, the pipeline's execution with an error will be interrupted. Otherwise, the pipeline execution proceeds, but the result will show a false value for the <code>"success"</code> property.</td><td>False</td><td>Boolean</td></tr></tbody></table>

### **Documentation tab**

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Default value</th><th>Data type</th></tr></thead><tbody><tr><td><strong>Documentation</strong></td><td>Section for documenting any necessary information about the connector configuration and business rules.</td><td>N/A</td><td>String</td></tr></tbody></table>

## **Google Cloud Functions in action**

### **Call Function operation**

When you select the **Call Function** operation, you call the function on Google using an HTTP request.

See an example of the configuration and output:

#### **Configuration**

* **Operation:** Call Function
* **Function Name:** helloWorld
* **Account:** google-key-functions
* **Location:** us-central1 (Iowa)
* **Project:** teste-434118
* **Body:** `{ }`

#### **Output**

{% code overflow="wrap" %}

```json
{
  "success": true,
  "headers": {
    "GoogleCloudFunctionsResponseObject": "execution_id: \"04lfg6k7y71x\"\nresult: \"Hello, World!\"\n"
  },
  "body": {
    "result": "Hello, World!"
  }
}
```

{% endcode %}

### **Get Function operation**

When you select the **Get Function** operation, you get the Cloud Functions object.

See an example of the configuration and output:

#### **Configuration**

* **Operation:** Get Function
* **Function Name:** helloWorld
* **Account:** google-key-functions
* **Location:** us-central1 (Iowa)
* **Project:** teste-434118

#### **Output**

{% code overflow="wrap" %}

```json
{
  "success": true,
  "body": {
    "name": "projects/teste-434118/locations/us-central1/functions/helloWorld",
    "https_trigger": {
      "url": "https://us-central1-teste-434118.cloudfunctions.net/helloWorld"
    },
    "status": "ACTIVE",
    "entry_point": "helloWorld",
    "timeout": {
      "seconds": 60
    },
    "available_memory_mb": 256,
    "service_account_email": "teste-434118@appspot.gserviceaccount.com",
    "source_upload_url": "https://storage.googleapis.com/uploads-603950532802.us-central1.cloudfunctions.appspot.com/9185413e-2038-46aa-9ae1-4c3f0dff7088.zip",
    "runtime": "nodejs14",
    "ingress_settings": "ALLOW_ALL",
    "version_id": 1,
    "build_id": "21535f31-f44b-4748-b401-edd449bd2fcb",
    "update_time": {
      "seconds": 1725041576,
      "nanos": 902000000
    }
  }
}
```

{% endcode %}
