You can use Workflows to create serverless workflows that link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications.
Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero. Workflows's rapid scaling and low execution delay make it a great fit for latency-sensitive implementations.
Workflows features a pay-per-use pricing model so that you pay only for running your workflows. You can manage workflows from the Google Cloud Console, from the command line using the Cloud SDK, or using the REST API.
A workflow is made up of a series of steps described using the Workflows syntax, which can be written in either the YAML or JSON format. This is the workflow's definition. For a detailed explanation of the Workflows syntax, see the Syntax reference page.
When a workflow is created, it is deployed, which makes the workflow ready for execution.
An execution is a single run of the logic contained in a workflow's definition. A workflow that hasn't been executed generates no charges. All workflow executions are independent, and the product's rapid scaling allows for a high number of concurrent executions.
As a best practice, we recommend placing your main workflow in a
Keep your workflows simple and easy to read by capturing often-repeated steps
in a subworkflow. A subworkflow works similarly to a routine or function in a
programming language, allowing you to encapsulate a step or set of steps that
your workflow will repeat multiple times. If a workflow has a subworkflow,
the main workflow must be placed in a
main block. For an example, see the
You can access data passed at runtime by adding a
params field to your main
workflow which must be placed in a
main block. The
params field names the
dictionary the workflow uses to store the data you pass in. You can then use dot
notation to access the arguments. For an example, see the Syntax reference.
Workflow identity and authentication
You can mitigate the risk of accidental or malicious calls by using Workflows, as every workflow execution requires an authenticated call. You can also simplify interactions with and authenticate to other Google APIs by using IAM-based service accounts.
You can use Secret Manager to securely store keys and passwords for authenticating to external APIs from within a workflow.
To learn more about how Workflows handles authentication, see the Authentication page.
Built-in error handling
You can make your workflows resilient and customize their behavior when a failure occurs by using Workflows's exception handling, including automated HTTP call retries with exponential back-offs, custom error handlers, and other advanced features.
Learn more about creating and updating workflows.
Learn how to control the order in which a workflow's steps are run.
Learn how to use subworkflows to repeat logic within your workflows.