Skip to main content

Google Cloud Functions Integration with Orkes Conductor

Available since
  • v5.3.0 and later

Integrating Google Cloud Functions with Orkes Conductor lets you build workflows that interact with your Google Cloud Functions using the following operations:

  • List Functions
  • Invoke HTTP Function

This guide explains how to set up and use the integration. Here's an overview:

  1. Get the required credentials from Google Cloud Console.
  2. Configure a new Google Cloud Functions integration in Orkes Conductor.
  3. Use Google Cloud Functions integration in workflows.

Step 1: Get the Google Cloud credentials

To integrate Google Cloud Functions with Orkes Conductor, you need a Google Cloud service account with the appropriate permissions and its JSON key file.

To create a service account and generate a key:

  1. Go to the Google Cloud Console and select your project.
  2. Navigate to IAM & Admin > Service Accounts.
  3. Select + Create service account, enter a name and description, and select Create and continue.
  4. Assign the IAM roles based on the access level required:
    • Cloud Functions Viewer: List and view functions.
    • Cloud Functions Invoker: Invoke HTTP functions (1st gen).
    • Cloud Run Invoker: Invoke 2nd gen and Cloud Run functions.
  5. Select Continue, then Done.
  6. Select the newly created service account, go to the Keys tab, and select Add Key > Create new key.
  7. Choose JSON as the key type and select Create. The key file downloads automatically.

Keep the downloaded JSON file ready; you'll need its full contents in the next step.

Next, enable the following APIs for the project.

To enable the APIs for the project:

  1. Go to APIs & Services > Enabled APIs & services.
  2. Select + Enable APIs and services.
  3. Search Cloud Functions API and select Enable.
  4. Search Cloud Run Admin API and select Enable.

Step 2: Add an integration for Google Cloud Functions

After obtaining the credentials, add a Google Cloud Functions integration to your Conductor cluster.

To create an integration:

  1. Go to Integrations > Connected Apps from the left navigation menu on your Conductor cluster.
  2. Select + New integration.
  3. In the Cloud section, choose Google Cloud Functions.
  4. Select + Add and enter the following parameters:
ParameterDescriptionRequired/Optional
Integration nameA name for the integration.Required.
ScopeThe OAuth2 scope for Cloud Functions / Cloud Platform API access. Supported values:
  • Cloud Functions (read-only): Grants read-only access to cloud functions.
  • Cloud Functions (full control): Grants full access to cloud functions.
Required.
Service Account JSONPaste the full contents of the Google Cloud service account key JSON file downloaded in Step 1.Required.
Default Project IDThe default Google Cloud Project ID to use when a project ID is not explicitly provided in a workflow task.Optional.
Default LocationThe default region for the cloud function. For example: us-central1.Optional.
Default Function URLThe default HTTP trigger URL to use when the function URL is not explicitly provided in a workflow task.Optional.
DescriptionA description of the integration.Required.

Google Cloud Functions Integration with Orkes Conductor

  1. (Optional) Toggle the Active button off if you don't want to activate the integration instantly.
  2. Select Save.

Step 3: Use Google Cloud Functions integration in workflows

Once the integration is ready, this can be used directly within the workflows.

To use Google Cloud Functions integration in a workflow:

  1. Go to Definitions > Workflow from the left navigation menu on your Conductor cluster.
  2. Select + Define workflow.
  3. In your workflow, select the (+) icon and select Connected Apps.

Adding Google Cloud Functions Integration in Conductor workflow

  1. In Add Task panel on the right, search for Google Cloud Functions, and select the integration created in Step 2.

The following operations are available for use with this integration.

OperationDescription
List FunctionsLists serverless functions in a project and location, including 1st gen, 2nd gen, and Cloud Run functions.
Invoke HTTP FunctionInvokes an HTTP-triggered Google Cloud Function with an optional JSON payload.
  1. Select the required operation, configure the parameters, and select Save > Confirm.
  2. Select Execute to run the workflow.

For the complete operations parameters and output reference, see Google Cloud Functions Operations Reference.