canonical: https://jentic.com/apis/googleapis.com/workflows

# Google Workflows API

The Google Workflows API manages the definitions of Cloud Workflows - a serverless service that orchestrates calls to Google Cloud, third-party APIs, and HTTP endpoints in declarative YAML. Through this API you create, update, list, and delete workflow definitions and inspect available revisions for rollback and audit. To actually execute a workflow you call the companion Workflow Executions API; this API is purely the control plane for the definition lifecycle.

## For AI agents

Manage Cloud Workflows definitions: create, update, list, and version workflows that orchestrate Google Cloud and third-party API calls. Execution is handled by the separate Workflow Executions API.

## Scope

Does not handle workflow execution, scheduling, container image building, or runtime step orchestration - use for managing Cloud Workflows definitions only.

## Capabilities

- Create a new workflow definition from a YAML or JSON source body
- Update an existing workflow definition in place, producing a new revision
- List all workflows in a region with name, description, state, and revisionId
- List historical revisions of a workflow for rollback or audit
- Delete a workflow that is no longer needed

## Use cases

### GitOps deployment of workflow definitions

Treat workflow YAML as code in a Git repository and have CI deploy changes through the Workflows API on every merge. POST /v1/{+parent}/workflows creates new workflows; PATCH on an existing workflow name pushes updates and produces a new revision the team can roll back to with listRevisions. This brings the same review-and-deploy hygiene to orchestrations that engineers expect for application code.

Example prompt: Create a workflow under projects/{project}/locations/us-central1/workflows with name=order-fulfilment and a sourceContents body, then list revisions to confirm the new revisionId.

### Multi-region orchestration management

Platform teams managing workflows across multiple regions use list endpoints to inventory definitions and coordinate updates. The /v1/{+name}/locations and /v1/{+parent}/workflows endpoints make it straightforward to render an internal dashboard that shows every workflow, its state, and its current revisionId. Combined with the operations endpoints, the same UI can show in-flight create or update operations.

Example prompt: Call GET /v1/{+name}/locations to enumerate regions, then for each region call /v1/{+parent}/workflows and emit a table of name, state, and revisionId.

### Safe rollout with revision rollback

When a new workflow revision misbehaves, listRevisions exposes prior versions so the team can roll back by patching the workflow back to a known-good source. Each revision is immutable and addressable, so this functions as a built-in change-management surface. It is especially useful when a workflow change interacts with downstream APIs in unexpected ways.

Example prompt: List revisions for a workflow, find the revision before the most recent, fetch its sourceContents, and patch the workflow back to that source.

### Agent-driven workflow authoring through Jentic

An agent that designs an orchestration can call Workflows through Jentic to materialise the YAML it generated. Jentic search for create a cloud workflow returns the workflows create operation; the agent fills in name, description, and sourceContents and executes. Credential isolation in Jentic keeps the OAuth token out of the model's context.

Example prompt: Through Jentic, create a workflow with sourceContents generated by the agent and verify the returned operation completes by polling /v1/{+name}/operations.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v1/{+parent}/workflows | List workflows in a region |
| POST | /v1/{+parent}/workflows | Create a new workflow |
| GET | /v1/{+name} | Get workflow details |
| GET | /v1/{+name}:listRevisions | List historical revisions of a workflow |
| GET | /v1/{+name}/locations | List supported locations |
| GET | /v1/{+name}/operations | Track long-running operations |

## Key resources

- **workflows** — Workflow definitions including source, state, and revision metadata
- **locations** — Regions in which workflows can be created
- **operations** — Long-running operations for create, update, and delete actions

## Why Jentic

- **Setup:** Wiring the Workflows API by hand means setting up OAuth 2.0 for your Google Cloud project, refreshing access tokens, and matching definition management calls against the workflows.googleapis.com host. Through Jentic you install once, import the Workflows API from the API Directory, store the OAuth credential once, and your agent calls it.
- **Permission scoping:** The Workflows API puts the workflow in the URL path (/v1/{name}), so a rule can pin your agent to one workflow: it can read that workflow and list its revisions and nothing else. You choose the operations it may call, so creating or deleting workflow definitions is not included unless you add it.
- **Credential handling:** Your Google Cloud OAuth credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. Its client secret and refresh token never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a workflow definition' or 'list workflow revisions', and Jentic returns the workflows create or listRevisions operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Workflow Executions API** — Runtime API for executing the workflows defined here
- **Cloud Build API** — CI service that can deploy workflow YAML changes on every merge
- **Cloud Functions API** — Single-function compute when full multi-step orchestration is overkill

## FAQ

### What authentication does the Workflows API use?

OAuth 2.0 (Oauth2 and Oauth2c schemes) scoped to https://www.googleapis.com/auth/cloud-platform. Through Jentic the OAuth credentials are stored encrypted in the vault and short-lived access tokens are minted at execution time.

### Does this API also run workflows?

No. Workflows is only the definition control plane. To execute a workflow, call the Workflow Executions API at workflowexecutions.googleapis.com. This separation lets the two services scale independently - definition reads are infrequent while executions can fan out heavily.

### What are the rate limits for the Workflows API?

Per-project quotas on workflow create, update, and list calls are configured in the Cloud Console under APIs and Services and are sized for definition management rather than runtime traffic. Most teams never hit them; the runtime quotas live on the Workflow Executions API instead.

### How do I create a workflow through Jentic?

Search Jentic for create a cloud workflow, load the schema for POST /v1/{+parent}/workflows, and execute it with parent=projects/{project}/locations/{loc}, name, description, and a sourceContents body. The response is a long-running operation; poll /v1/{+name}/operations until done is true.

### Can I roll back to a previous workflow revision?

Yes. Call /v1/{+name}:listRevisions to see all historical revisions and their sourceContents, then PATCH the workflow with the desired source to make that revision live. Each PATCH creates a new revisionId rather than overwriting history.

### Can I limit what my agent is allowed to do with the Workflows API?

Yes. Because the Workflows API carries the workflow name in the URL path (/v1/{name}), your self-hosted Jentic One instance lets you write a rule that pins the agent to a single workflow so it can read that workflow and list its revisions and nothing else. You decide which operations it may call, so creating, updating, or deleting workflow definitions stays off limits unless you add those operations yourself. The OAuth credential is held by your instance and injected only for the calls you have permitted.
