All Workflows code samples
This page contains code samples for Workflows. To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.
Generate a random number and return result in JSON
After receiving an HTTP request, this function generates a random number between 1 and 100, and then returns the number in JSON format.
- Workflows
- Google Cloud
- Python
Use client libraries to execute a workflow
Use client libraries to execute a workflow. Polls the workflow's execution using exponential backoff until the execution terminates and then prints the results.
- Google Cloud
- Workflows
- Java
- Python
- Node JS
- JavaScript
- TypeScript
Create a workflow using Python or Ruby
Creates a workflow using Python or Ruby.
- Google Cloud
- Workflows
- Go
- C#
- Ruby
- Python
- Java
List workflows using Python or Ruby
Lists workflows using Python or Ruby.
- Workflows
- Google Cloud
- Python
- Ruby
- Java
- C#
- Go
Get a workflow using Python or Ruby.
Gets a workflow using Python or Ruby.
- Workflows
- Google Cloud
- Java
- Go
- Python
- C#
- Ruby
Calculate math floor
After receiving an HTTP request, extracts input from the JSON body, calculates its math.floor, and returns the result.
- Workflows
- Google Cloud
- Python
Delete a workflow using Python or Ruby.
Deletes a workflow using Python or Ruby.
- Google Cloud
- Workflows
- C#
- Java
- Ruby
- Go
- Python
Update a workflow using Python or Ruby
Updates a workflow using Python or Ruby.
- Google Cloud
- Workflows
- Ruby
- C#
- Go
- Java
- Python
Multiply a number by 2 and return result in JSON
After receiving an HTTP request, this function extracts the input from the JSON body, multiplies it by 2, and returns the result in JSON format.
- Google Cloud
- Workflows
- Python