Create or update workflow
Create or update new workflow.
API key must have the Edit workflows permission.
Note: If a workflow with the same tag already exists, it will be updated.
Authorizations
All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.
Body
List of actions in the workflow. Actions read run data with three top-level keys: context (workflowRunId, initiatedBy, and entity for a run on an entity), actions (earlier actions by slug) and variables (workflow variables by slug). Every action writes its result to actions.<slug>.outputs. The keys depend on the action type, e.g. result for JQ and JavaScript, or status, headers and body for HTTP. JQ reads .variables.x, CEL, JavaScript and dot paths read variables.x, and action text fields take {{variables.x}} templates. Quote a slug with a hyphen: actions["my-slug"], with a leading dot in JQ.
Filter to determine in what entity contexts the workflow can run
- GLOBAL
- ENTITY
Whether the workflow is a draft
Name of the workflow
If true, only the user who started the workflow can complete actions. Defaults to false.
Tag of the workflow. Use lowercase letters, digits and hyphens, 2 to 255 characters, not starting or ending with a hyphen.
List of variable definitions for the workflow. Set run values with initialContext.
The date the workflow was created, in ISO 8601 format
Description of the workflow
Template for the response when the workflow run fails
Icon tag for the workflow
Whether the workflow is runnable via the public API
The date the workflow was last updated, in ISO 8601 format
Template for the response when the workflow is completed successfully
List of restriction policies for the workflow
Response
Workflow created successfully
List of actions in the workflow. Actions read run data with three top-level keys: context (workflowRunId, initiatedBy, and entity for a run on an entity), actions (earlier actions by slug) and variables (workflow variables by slug). Every action writes its result to actions.<slug>.outputs. The keys depend on the action type, e.g. result for JQ and JavaScript, or status, headers and body for HTTP. JQ reads .variables.x, CEL, JavaScript and dot paths read variables.x, and action text fields take {{variables.x}} templates. Quote a slug with a hyphen: actions["my-slug"], with a leading dot in JQ.
Filter to determine in what entity contexts the workflow can run
- GLOBAL
- ENTITY
Whether the workflow is a draft
Name of the workflow
If true, only the user who started the workflow can complete actions. Defaults to false.
Tag of the workflow. Use lowercase letters, digits and hyphens, 2 to 255 characters, not starting or ending with a hyphen.
List of variable definitions for the workflow. Set run values with initialContext.
The date the workflow was created, in ISO 8601 format
Description of the workflow
Template for the response when the workflow run fails
Icon tag for the workflow
Whether the workflow is runnable via the public API
The date the workflow was last updated, in ISO 8601 format
Template for the response when the workflow is completed successfully
List of restriction policies for the workflow