Skip to main content
Google Cloud
Documentation Technology areas
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
Cross-product tools
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
Related sites
  • Google Cloud Home
  • Free Trial and Free Tier
  • Architecture Center
  • Blog
  • Contact Sales
  • Google Cloud Developer Center
  • Google Developer Center
  • Google Cloud Marketplace
  • Google Cloud Marketplace Documentation
  • Google Cloud Skills Boost
  • Google Cloud Solution Center
  • Google Cloud Support
  • Google Cloud Tech Youtube Channel
/
  • English
  • Deutsch
  • Español
  • Español – América Latina
  • Français
  • Indonesia
  • Italiano
  • Português
  • Português – Brasil
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어
Console Sign in
  • Workflows
Guides Reference Samples Resources
Contact Us Start free
Google Cloud
  • Documentation
    • Guides
    • Reference
    • Samples
    • Resources
  • Technology areas
    • More
  • Cross-product tools
    • More
  • Related sites
    • More
  • Console
  • Contact Us
  • Start free
  • All Workflows code samples
  • Aggregate data using a parallel loop
  • Assign variables
  • Calculate math floor
  • Catch errors
  • Conditional jump to a specific step
  • Conditional jump to a specific step
  • Connector for AI Platform Training and Prediction
  • Connector for Application Integration
  • Connector for Batch
  • Connector for BigQuery
  • Connector for BigQuery Data Transfer
  • Connector for Cloud Build
  • Connector for Cloud Functions
  • Connector for Cloud Natural Language
  • Connector for Cloud Resource Manager
  • Connector for Cloud Run
  • Connector for Cloud Scheduler
  • Connector for Cloud Spanner
  • Connector for Cloud SQL Admin
  • Connector for Cloud Storage
  • Connector for Cloud Tasks
  • Connector for Cloud Translation
  • Connector for Compute Engine
  • Connector for Dataflow
  • Connector for Document AI
  • Connector for Firestore
  • Connector for Firestore (read)
  • Connector for Firestore (write)
  • Connector for Google Forms
  • Connector for Google Sheets
  • Connector for Kubernetes API
  • Connector for Kubernetes Engine
  • Connector for Pub/Sub
  • Connector for Secret Manager
  • Connector for Storage Transfer Service
  • Connector for Transcoder
  • Connector for Vertex AI
  • Connector for Workflows definitions
  • Connector for Workflows executions
  • Create a Compute Engine VM instance using the Compute Engine API connector
  • Create a workflow that executes a Cloud Run job using Terraform
  • Create a workflow using Python or Ruby
  • Create and deploy a workflow using Terraform
  • Create execution
  • Define a map
  • Define lists
  • Delete a workflow using Python or Ruby.
  • Demonstrate local scope of variable created inside a for loop
  • Demonstrate variable scope in a parallel step
  • Deploy a Kubernetes application using Workflows connectors
  • Deploy a workflow from Git using Cloud Build
  • Deploy a workflow that listens for events
  • Deploy your first workflow
  • Execute a Cloud Run job
  • Execute a Cloud Run job that processes event data saved in Cloud Storage
  • Execute other workflows in parallel
  • Explicitly step to the next workflow step
  • Generate a random number and return result in JSON
  • Get a workflow using Python or Ruby.
  • Get started with the Cloud Client Libraries for the Workflows API
  • Handle errors with custom predicate
  • Implicitly step to the next workflow step
  • Input a search term and pass it to an API
  • Invoke a Cloud Run workload that requires authentication
  • Iterate through a list
  • List workflows using Python or Ruby
  • Load data from Cloud Storage to BigQuery using a workflow
  • Make an external HTTP GET request with headers
  • Make an external HTTP POST request
  • Make HTTP requests in a for-in loop
  • Multiply a number by 2 and return result in JSON
  • Paginate a BigQuery result set
  • Perform a parallel for:in loop
  • Perform a parallel for:range loop
  • Perform a parallel loop
  • Perform a parallel step using branches
  • Perform a parallel step with the secondary workflow inlined
  • Perform error handling in a parallel step
  • Perform operations in parallel using branches
  • Perform parallel iteration using for loops
  • Query a BigQuery dataset and write the results to a Sheet spreadsheet using connectors
  • Retry after an HTTP 500 error
  • Retry steps using a custom retry policy for an HTTP status code
  • Retry steps using a default retry policy
  • Retry steps with custom configuration
  • Reverse a list
  • Run a batch translation using the Cloud Translation connector
  • Run a workflow that executes other workflows in parallel
  • Run gcloud commands in a workflow
  • Run kubectl commands in a workflow
  • Run multiple BigQuery query jobs in parallel
  • Run multiple queries serially using the connector for BigQuery.
  • Stop a Compute Engine instance through an HTTP request
  • Store callback details in a Firestore database
  • Translate text using the Cloud Translation API
  • Update a workflow using Python or Ruby
  • Use a basic for-range loop
  • Use a Cloud Tasks queue to buffer your workflow executions
  • Use a for-in loop to iterate through a list
  • Use a for-in loop to iterate through a map
  • Use a for-range loop to make HTTP requests
  • Use a simple subworkflow
  • Use an embedded switch statement to execute steps
  • Use an expression to assign a variable value
  • Use arguments in a workflow
  • Use client libraries to execute a workflow
  • Use Google Translate in a for-in loop
  • Use OIDC to authenticate when making a request to Cloud Functions
  • Validate a translation request using a callback endpoint
  • Write to Firestore through an HTTP request
  • Write to Google Sheets from a workflow
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
  • Google Cloud Home
  • Free Trial and Free Tier
  • Architecture Center
  • Blog
  • Contact Sales
  • Google Cloud Developer Center
  • Google Developer Center
  • Google Cloud Marketplace
  • Google Cloud Marketplace Documentation
  • Google Cloud Skills Boost
  • Google Cloud Solution Center
  • Google Cloud Support
  • Google Cloud Tech Youtube Channel
  • Home
  • Documentation
  • Application development
  • Workflows
  • Samples

Define lists

Defines a few lists.

Explore further

For detailed documentation that includes this code sample, see the following:

  • Lists

Code sample

YAML

- first_step:
    assign:
      - my_list1: [1, 2, 3]
      - my_list2:
          - 1
          - 2
          - 3
      - my_list3: ["Grzegorz", "Irina", "Yufei"]

What's next

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

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.

  • Why Google

    • Choosing Google Cloud
    • Trust and security
    • Modern Infrastructure Cloud
    • Multicloud
    • Global infrastructure
    • Customers and case studies
    • Analyst reports
    • Whitepapers
  • Products and pricing

    • See all products
    • See all solutions
    • Google Cloud for Startups
    • Google Cloud Marketplace
    • Google Cloud pricing
    • Contact sales
  • Support

    • Community forums
    • Support
    • Release Notes
    • System status
  • Resources

    • GitHub
    • Getting Started with Google Cloud
    • Google Cloud documentation
    • Code samples
    • Cloud Architecture Center
    • Training and Certification
    • Developer Center
  • Engage

    • Blog
    • Events
    • X (Twitter)
    • Google Cloud on YouTube
    • Google Cloud Tech on YouTube
    • Become a Partner
    • Google Cloud Affiliate Program
    • Press Corner
  • About Google
  • Privacy
  • Site terms
  • Google Cloud terms
  • Manage cookies
  • Our third decade of climate action: join us
  • Sign up for the Google Cloud newsletter Subscribe
  • English
  • Deutsch
  • Español
  • Español – América Latina
  • Français
  • Indonesia
  • Italiano
  • Português
  • Português – Brasil
  • 中文 – 简体
  • 中文 – 繁體
  • 日本語
  • 한국어