Aller au contenu principal

workflows


title: Workflows sidebar_label: Workflows (16) sidebar_position: 2 doc_type: reference

Workflows

En bref

Listez, lancez et suivez vos workflows automatises.

Prerequis

  • Cle API avec le preset MCP et les scopes requis
  • Client MCP configure (voir Configuration)

Exemples minimaux

Lancer et suivre un workflow

  1. Listez les workflows disponibles :
{
"name": "workflow_list",
"arguments": {}
}
  1. Lancez l'execution :
{
"name": "workflow_execute",
"arguments": {
"workflowId": "uuid-du-workflow"
}
}
  1. Suivez le statut d'execution :
{
"name": "workflow_status",
"arguments": {
"runId": "uuid-de-lexecution"
}
}

workflow_cancel

Annule un workflow en cours d'execution.

Scopemcp.workflow.execute
Lecture seuleNon
DestructifOui
IdempotentNon

Parametres

ParametreTypeRequisDescription
runIdstringOuiThe workflow run ID to cancel
reasonstringNonOptional reason for cancellation

Reponse

ChampTypeDescription
successboolean
runIdstring
workflowIdstring
workflowNamestring
previousStatusstring
messagestring

Outils lies : workflow_status, workflow_execute


workflow_create

Cree un nouveau workflow vide ou depuis un template.

Scopemcp.write
Lecture seuleNon
DestructifNon
IdempotentNon

Parametres

ParametreTypeRequisDescription
namestringOuiNom du nouveau workflow
canvasIdstring (uuid)NonCanvas ID to assign the workflow to (uses default canvas if not provided)
descriptionstringNonWorkflow description

Reponse

ChampTypeDescription
workflowIdstring
namestring
descriptionstring
statusstring
versionnumber
canvasIdstring
createdAtstring

Outils lies : workflow_update, workflow_execute, workflow_list, workflow_validate


workflow_execute

Lance l'execution d'un workflow.

Scopemcp.workflow.execute
Lecture seuleNon
DestructifNon
IdempotentNon

Parametres

ParametreTypeRequisDescription
asyncbooleanNonExecution asynchrone (true recommande pour les workflows longs) (defaut : true)
inputsrecordNonInput variables for the workflow
workflowIdstring (uuid)NonIdentifiant unique du workflow a executer
workflowNamestringNonWorkflow name to execute (alternative to workflowId, case-insensitive)

Reponse

ChampTypeDescription
workflowobject
idstring
namestring
wasResolvedByNameboolean
runIdstring
taskIdstring
streamUrlstring
statusenum
resultunknown

Exemple

{
"name": "workflow_execute",
"arguments": {
"workflowId": "uuid-du-workflow"
}
}

Outils lies : workflow_status, workflow_cancel, workflow_validate


workflow_export

Exporte un workflow au format JSON.

Scopemcp.read
Lecture seuleOui
DestructifNon
IdempotentOui

Parametres

ParametreTypeRequisDescription
workflowIdstring (uuid)OuiID of the workflow to export
formatchoix (json, yaml)NonExport format (default: json)
includeTestCasesbooleanNonInclude test cases in export (default: false)

Reponse

ChampTypeDescription
portablerecord

Outils lies : workflow_import, workflow_export_bulk


workflow_export_bulk

Exporte plusieurs workflows en lot.

Scopemcp.read
Lecture seuleOui
DestructifNon
IdempotentOui

Parametres

ParametreTypeRequisDescription
workflowIdsarrayOuiIDs of workflows to export
includeTestCasesbooleanNonInclude test cases in export (default: false)

Reponse

ChampTypeDescription
workflowsarray
countnumber

Outils lies : workflow_export, workflow_list


workflow_get

Recupere la definition complete d'un workflow (blocs, connexions, variables).

Scopemcp.read
Lecture seuleOui
DestructifNon
IdempotentOui

Parametres

ParametreTypeRequisDescription
includeDefinitionbooleanNonInclude full flow definition with blocks and connections (defaut : true)
workflowIdstring (uuid)NonIdentifiant unique du workflow
workflowNamestringNonWorkflow name to retrieve (alternative to workflowId, case-insensitive)

Reponse

ChampTypeDescription
wasResolvedByNameboolean

Outils lies : workflow_list, workflow_validate, workflow_execute


workflow_get_block_output

Recupere la sortie d'un bloc specifique dans une execution.

Scopemcp.read
Lecture seuleOui
DestructifNon
IdempotentOui

Parametres

ParametreTypeRequisDescription
blockIdstringOuiThe block ID to get output for
runIdstringOuiThe workflow run ID (wfr_xxx format or UUID)
includeInputbooleanNonInclude the input that was passed to this block (defaut : true)
includeLogsbooleanNonInclude execution logs for this block (defaut : true)

Reponse

ChampTypeDescription
runIdstring
workflowIdstring
inputnumber
outputnumber
variablesProducedarray
tokensobject
totalnumber
logsarray

Outils lies : workflow_get_variables, workflow_status


workflow_get_variables

Recupere les variables d'execution a un point donne du workflow.

Scopemcp.read
Lecture seuleOui
DestructifNon
IdempotentOui

Parametres

ParametreTypeRequisDescription
runIdstringOuiThe workflow run ID (wfr_xxx format or UUID)
blockIdstringNonSpecific block ID to get variables for (returns snapshot before that block)
includeInternalbooleanNonInclude internal variables (prefixed with __) (defaut : false)

Reponse

ChampTypeDescription
runIdstring
workflowIdstring
statusstring
blockIdstring
blockTypestring
blockIndexnumber
variablesarray
availableAtarray
changedVariablesarray
timestampstring

Outils lies : workflow_get_block_output, workflow_status


workflow_import

Importe un workflow depuis un fichier JSON.

Scopemcp.write
Lecture seuleNon
DestructifNon
IdempotentNon

Parametres

ParametreTypeRequisDescription
workflowrecordOuiPortable workflow JSON object (from workflow_export)
conflictResolutionchoix (fail, update_if_newer, force_update, create_new)NonHow to handle name conflicts (default: fail)
dryRunbooleanNonValidate without persisting (default: false)
preserveIdbooleanNonKeep original workflow ID (default: false)

Reponse

ChampTypeDescription
successboolean
workflowIdstring
namestring
statusenum
errorstring

Outils lies : workflow_export, workflow_list


workflow_list

Liste les workflows disponibles dans votre workspace.

Scopemcp.read
Lecture seuleOui
DestructifNon
IdempotentOui

Parametres

ParametreTypeRequisDescription
limitnumberNonNombre maximum de resultats (defaut : 50)
offsetnumberNonDecalage pour la pagination (defaut : 0)
searchstringNonSearch by name
statuschoix (draft, published, archived, all)NonFilter by status (defaut : "all")

Reponse

ChampTypeDescription
workflowsarray
totalnumber
hasMoreboolean

Exemple

{
"name": "workflow_list",
"arguments": {}
}

Outils lies : workflow_get, workflow_execute, workflow_validate


workflow_schedule_create

Cree une planification automatique pour un workflow (cron, intervalle).

Scopemcp.write, mcp.workflow.execute
Lecture seuleNon
DestructifNon
IdempotentNon

Parametres

ParametreTypeRequisDescription
namestringOuiSchedule name
scheduleTypechoix (cron, interval, specific)OuiType of schedule
workflowIdstring (uuid)OuiWorkflow ID to schedule
cronExpressionstringNonCron expression (for scheduleType=cron). Example: "0 9 * * MON-FRI"
descriptionstringNonSchedule description
intervalUnitchoix (seconds, minutes, hours, days, weeks)NonInterval unit (for scheduleType=interval)
intervalValuenumberNonInterval value (for scheduleType=interval)
isEnabledbooleanNonWhether schedule is active immediately (defaut : true)
maxConcurrentnumberNonMax concurrent executions (defaut : 1)
specificTimesarrayNonSpecific times (for scheduleType=specific)
timeoutMsnumberNonExecution timeout in ms (default: 5 minutes) (defaut : 300000)
timezonestringNonTimezone (IANA format). Default: Europe/Paris (defaut : "Europe/Paris")
workflowNamestringNonAlternative: workflow name (if ID unknown)

Reponse

ChampTypeDescription
scheduleIdstring
namestring
workflowIdstring
workflowNamestring
scheduleTypestring
expressionstring
timezonestring
isEnabledboolean
nextRunAtstring
messagestring

Outils lies : workflow_schedule_list, workflow_schedule_trigger, workflow_validate


workflow_schedule_list

Liste les planifications (schedules) des workflows.

Scopemcp.read
Lecture seuleOui
DestructifNon
IdempotentOui

Parametres

ParametreTypeRequisDescription
limitnumberNonMaximum results (defaut : 50)
offsetnumberNonPagination offset (defaut : 0)
statuschoix (active, paused, all)NonFilter by status (defaut : "all")
workflowIdstring (uuid)NonFilter by workflow ID

Reponse

ChampTypeDescription
schedulesarray
totalnumber
hasMoreboolean

Outils lies : workflow_schedule_create, workflow_schedule_trigger, workflow_list


workflow_schedule_trigger

Declenche manuellement une planification existante.

Scopemcp.workflow.execute
Lecture seuleNon
DestructifNon
IdempotentNon

Parametres

ParametreTypeRequisDescription
scheduleIdstringOuiSchedule ID to trigger
scheduleNamestringNonAlternative: schedule name (if ID unknown)

Reponse

ChampTypeDescription
successboolean
scheduleIdstring
scheduleNamestring
workflowIdstring
workflowNamestring
runIdstring
triggeredAtstring
messagestring

Outils lies : workflow_status, workflow_schedule_list, workflow_execute


workflow_status

Consulte le statut d'execution d'un workflow (en cours, termine, echoue).

Scopemcp.read
Lecture seuleOui
DestructifNon
IdempotentOui

Parametres

ParametreTypeRequisDescription
runIdstring (uuid)OuiIdentifiant de l'execution

Reponse

ChampTypeDescription
runIdstring
workflowIdstring
workflowNamestring
statusenum
progressnumber
currentNodestring
resultunknown
errorstring
startedAtstring
completedAtstring
durationnumber

Outils lies : workflow_get_variables, workflow_get_block_output, workflow_cancel


workflow_update

Met a jour la definition d'un workflow existant.

Scopemcp.write
Lecture seuleNon
DestructifNon
IdempotentNon

Parametres

ParametreTypeRequisDescription
workflowIdstring (uuid)OuiID of the workflow to update
descriptionstringNonNew workflow description
expectedVersionnumberNonExpected version for OCC conflict detection
namestringNonNew workflow name
statuschoix (draft, published, archived)NonNew workflow status

Reponse

ChampTypeDescription
workflowIdstring
namestring
statusstring
versionnumber
updatedAtstring

Outils lies : workflow_get, workflow_create, workflow_validate


workflow_validate

Valide un workflow avant execution (verification des connexions et parametres).

Scopemcp.read
Lecture seuleOui
DestructifNon
IdempotentOui

Parametres

ParametreTypeRequisDescription
checkCyclesbooleanNonCheck for circular dependencies in the flow (defaut : true)
checkReferencesbooleanNonValidate external references (agents, entities, subflows) (defaut : true)
checkVariablesbooleanNonAnalyze variable usage and detect issues (defaut : true)
workflowIdstring (uuid)NonIdentifiant unique du workflow a valider
workflowNamestringNonWorkflow name to validate (alternative to workflowId)

Reponse

ChampTypeDescription
workflowIdstring
workflowNamestring
isValidboolean
canExecuteboolean
summaryobject
errorCountnumber
warningCountnumber
infoCountnumber
issuesarray
referencesarray
structureobject
blockCountnumber
connectionCountnumber
hasTriggerboolean
hasOutputboolean
hasCyclesboolean

Outils lies : workflow_execute, workflow_get


Depannage

CodeMessageSolution
404Workflow non trouveVerifiez l'identifiant avec workflow_list.

Besoin d'aide ?

Ecrivez-nous : Support et contact.