[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/workflows/docs/reference/syntax/main [Back]  [Original]

Main workflow  |  Workflows  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Main workflow Stay organized with collections Save and categorize content based on your preferences.

A workflow source file can contain only one main workflow and, as a best practice, we recommend placing your main workflow in a main block.

If a workflow has a subworkflow, the main workflow must be placed in a main block. Similarly, for a workflow to receive runtime arguments there must be a main block.

YAML

  main:
      params: [MAP_NAME]
      steps:
          - STEP_NAME:
              ...
          ...
  

JSON

    {
      "main": {
        "params": [
          "MAP_NAME"
        ],
        "steps": [
          {
            "STEP_NAME": {
              ...
            }
          },
          ...
        ]
      }
    }
    

Inside the main workflow, you can define the steps you want and their order of execution using the Workflows syntax. Every workflow must have at least one step.

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-11 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page