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](https://docs.cloud.google.com/workflows/docs/reference/syntax/subworkflows),
the main workflow must be placed in a `main` block. Similarly, for a workflow
to receive [runtime arguments](https://docs.cloud.google.com/workflows/docs/reference/syntax/runtime-args)
there must be a `main` block.

### YAML

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

### JSON

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

Inside the main workflow, you can define the
[steps](https://docs.cloud.google.com/workflows/docs/reference/syntax/steps) you want and their order of
execution using the Workflows syntax. Every workflow must have at least
one step.