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
422
Validation Error
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
422
Validation Error
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.
{
"workflows": [
{
"_id": "668e3c20aab00720ed055c3e",
"createdAt": "2024-07-10T07:45:36.023662",
"modifiedAt": "2025-01-14T13:34:05.213017",
"botId": "65c38e71d42e8f8525efdba6",
"name": "Patentsx",
"description": "This is a descriptionx",
"isDefault": false,
"runModeDefault": "run_all_step",
"workflowSteps": [
{
"workflowId": "668e3c20aab00720ed055c3e",
"stepType": "prompt",
"name": "Extraction",
"runModeDefault": "run_all_step",
"prompt": "Identify and outline all potential risks, unusual formulations, and potential legal red flags in the document(s). Discuss the implications of these risks and suggest mitigating strategies if applicable. Generate a list of critical questions raised by the document. These questions should provoke thought, clarify uncertainties, or explore areas for further investigation. Ensure your responses are user-friendly, engaging, and easy to understand, even for individuals without a legal background.",
"model": "anthropic-claude-v3.5-sonnet",
"advanceOptions": {
"temperature": 0.0,
"topP": 1.0,
"presencePenalty": 0.0,
"frequencyPenalty": 0.0
},
"isWebSearchEnabled": true,
"_id": "668e3c20aab00720ed055c3f",
"createdAt": "2025-01-14T13:34:05.258280",
"modifiedAt": "2025-01-14T13:34:05.258280"
},
...
}
]
}