Workflows

Create an approval flow from a description

Saves a new flow (a reusable approval process) from what the person described: the form fields, then the approval steps in order — who is asked at each (a role, a member from custodo_list_members or a reparto from custodo_list_teams), whether all or any of them must approve, the deadline, and when a step is skipped (condition). The person approves the exact flow before it is saved, and it is saved SWITCHED OFF: say so, and give them open_in_builder. Prefer roles or named members over guessing; ask when the description does not say who approves.

post/api/v1/rest/workflow/flows

Request

  • Base URL: https://api.custodo.ai
  • URL: https://api.custodo.ai/api/v1/rest/workflow/flows
  • Auth: HTTP bearer

Headers

X-Tenant-Idstring uuid

The organisation to act in. An API key is bound to exactly one, so this is optional for a key and must match the one it was minted for.

Request body

namestring required
descriptionstring
trigger'manual' | 'document_ready' | 'document_typed' | 'email_received' | 'crm_deal_won' | 'spese_report_submitted'

manual = a person starts it; document_ready / document_typed / email_received / crm_deal_won / spese_report_submitted start it automatically.

document_type_idstring uuid

document_* triggers only: the class that starts it (documents_list_types).

trigger_configobject

The automatic trigger’s filter: document_* {titleContains}; email_received {mailboxIds, subjectContains, fromContains, toContains, requireAttachments, pec: any|only|exclude}; crm_deal_won {pipelineIds, minAmount}; spese_report_submitted {minTotalCents}. Omit for none — but ALWAYS narrow email_received, or every synced message opens a run.

priority'low' | 'normal' | 'high'

Response

Done. data is the tool’s own answer.

oktrue required
dataunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.