Connector for Workflows definitions

Workflows connector that defines the built-in function used to access Workflows definitions.

Documentation pages that include this code sample

To view the code sample used in context, see the following documentation:

Code sample


# This workflow demonstrates how to use the Cloud Workflows connector.
# The workflow creates/gets/deletes a workflow.
# Expected successful output: "SUCCESS"

- init:
    - project: ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")}
    - location: "us-central1"
    - workflow: "dummy-workflow"
- create_workflow:
    call: googleapis.workflows.v1.projects.locations.workflows.create
      parent: ${"projects/" + project + "/locations/" + location}
      workflowId: ${workflow}
        name: ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow}
        description: "A dummy workflow to be created and deleted."
        sourceContents: "- step:\n    next: end"
- get_workflow:
    call: googleapis.workflows.v1.projects.locations.workflows.get
      name: ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow}
- delete_workflow:
    call: googleapis.workflows.v1.projects.locations.workflows.delete
      name: ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow}
- the_end:
    return: "SUCCESS"

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.