Syntax overview

The Workflows syntax reference details the format for creating workflows.

Search the syntax

Syntax cheat sheet

To create a workflow, you use the Workflows syntax to define the desired steps and order of execution. For more information about creating workflows, see Create and manage workflows.

Syntax format
Calls and controlling flow
Variables and expressions
Handling errors

For other functions available in addition to the core syntax, refer to the Standard library and Connectors references.

File structure

Workflow source files have the following characteristics:

  • They contain only one main workflow.
  • They might contain subworkflows.
  • They are either a valid YAML or JSON file.

    Code samples are provided in both YAML and the equivalent JSON.

Using code samples

For all samples that communicate with other Google Cloud resources, your workflow must be associated with a service account that has sufficient privileges to access those resources. To learn more about granting roles to service accounts, see Manage access to projects, folders, and organizations. To learn how to change the service account associated with a workflow, see update a workflow. For more information about authentication, see Grant a workflow permission to access Google Cloud resources.

Some samples might require that you first enable a Google Cloud API. Learn more about listing services and enabling services.

See all Workflows code samples.

Notation key

Notation Description
[] Square brackets Optional; if the brackets themselves must be typed, this is indicated
{} Braces Required
| Vertical bar Separator for mutually exclusive items; choose one
... Ellipsis Items that can be repeated; or indicates an omission to improve clarity and shorten the length of the example