Run a Workflow

Run a pre-defined workflow using the API

Get list of existing workflows

Workflows are attached to a workshop bot. The list of existing workflows in a bot are provided via the get workshop bot details endpoint, which require the bot_id. The result you are looking for should be found in the workflows field:

Get Detail Pre Defined Cortex

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
bot_idstringRequired
Responses
200

Successful Response

application/json
get
/cortex/bot/detail/{bot_id}

Example of a list of workflows:

Save the _id field as we will need it to invoke the workflow.

Invoking a workflow

With the workflow _id we get from the previous step, we should be able to invoke the workflow using the executor endpoint:

Parameters table:

Parameter
Type
Description

workflowId

string

The ID of the workflow to invoke

convoId

string

The ID of the data room to be provided to the workflow as input / context

Create Action Executor Workflow

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
messageIdany ofOptional
stringOptional
or
nullOptional
convoIdstringRequired
workflowIdstringRequired
attackmentIdany ofOptional
stringOptional
or
nullOptional
actionany ofOptionalDefault: continue
string ยท enumOptionalPossible values:
or
nullOptional
wcpOwnerIdany ofOptional
stringOptional
or
nullOptional
Responses
200

Successful Response

application/json
post
/cortex/executor

Upon triggering the endpoint, you should receive a response back with the runTaskId of the workflow run. You can then use the runTaskId to check the status of the workflow run.

Next Step

Now that your workflow is running, let's Get a Workflow Results.

Last updated

Was this helpful?