Mutations
triggerWorkflow
Manually trigger a workflow against a specific thread. Returns the resulting WorkflowExecution so you can track the run’s status and step results.
MUTATION
triggerWorkflow(input: TriggerWorkflowInput!): TriggerWorkflowOutput!Arguments
input
required
Returns
workflowExecution
error
Mutation
mutation TriggerWorkflow($input: TriggerWorkflowInput!) {
triggerWorkflow(input: $input) {
workflowExecution {
id
workflowId
workflow {
id
name
trigger
startStepId
steps {
__typename
}
publishedAt {
__typename
}
}
triggeredBy
executionStatus
errorMessage
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"workflowId": "id",
"threadId": "id"
}
}Response
{
"data": {
"triggerWorkflow": {
"workflowExecution": {
"id": "id",
"workflowId": "id",
"workflow": {
"id": "id",
"name": "string",
"trigger": "string",
"startStepId": "id",
"steps": [
{
"__typename": "WorkflowStep"
}
],
"publishedAt": {
"__typename": "DateTime"
}
},
"triggeredBy": "string",
"executionStatus": "QUEUED",
"errorMessage": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?
⌘I
Mutation
mutation TriggerWorkflow($input: TriggerWorkflowInput!) {
triggerWorkflow(input: $input) {
workflowExecution {
id
workflowId
workflow {
id
name
trigger
startStepId
steps {
__typename
}
publishedAt {
__typename
}
}
triggeredBy
executionStatus
errorMessage
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"workflowId": "id",
"threadId": "id"
}
}Response
{
"data": {
"triggerWorkflow": {
"workflowExecution": {
"id": "id",
"workflowId": "id",
"workflow": {
"id": "id",
"name": "string",
"trigger": "string",
"startStepId": "id",
"steps": [
{
"__typename": "WorkflowStep"
}
],
"publishedAt": {
"__typename": "DateTime"
}
},
"triggeredBy": "string",
"executionStatus": "QUEUED",
"errorMessage": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}
