Add workflow
POST/workflows
Creates a new Workflow; available as an Add-On Module
Request
Query Parameters
Site Identifier
- application/json
Body
required
Array [
Array [
]
Array [
]
Array [
Array [
-
a document attribute identified by
attributeKey -
a comparison between a document attribute value and another attribute-derived value
-
the document content type
-
the document path
- WorkflowStepConditionDocumentAttribute
- WorkflowStepConditionAttributeValueComparison
- WorkflowStepConditionDocumentStandardMetadata
- WorkflowStepConditionAttributeValueComparisonAttribute
- WorkflowStepConditionAttributeValueComparisonAggregate
FIRST- First value for the attributeLAST- Last value for the attributeSUM- Sum of numeric values for the attributeMIN- Minimum numeric value for the attributeMAX- Maximum numeric value for the attributeCOUNT- Count of values for the attribute-
PATH- Evaluate the document path -
CONTENT_TYPE- Evaluate the document content type EQ- EqualsNEQ- Not equalsCONTAINS- Contains substring or matching valueNOT_CONTAINS- Does not contain substring or matching valueSTARTS_WITH- Starts with valueENDS_WITH- Ends with valueGT- Greater thanGTE- Greater than or equalLT- Less thanLTE- Less than or equalEXISTS- Field existsNOT_EXISTS- Field does not existIN- Matches one of the provided valuesNOT_IN- Does not match any of the provided valuesIS_EMPTY- Source value is emptyIS_NOT_EMPTY- Source value is not empty]
Array [
-
a document attribute identified by
attributeKey -
a comparison between a document attribute value and another attribute-derived value
-
the document content type
-
the document path
- WorkflowStepConditionDocumentAttribute
- WorkflowStepConditionAttributeValueComparison
- WorkflowStepConditionDocumentStandardMetadata
- WorkflowStepConditionAttributeValueComparisonAttribute
- WorkflowStepConditionAttributeValueComparisonAggregate
FIRST- First value for the attributeLAST- Last value for the attributeSUM- Sum of numeric values for the attributeMIN- Minimum numeric value for the attributeMAX- Maximum numeric value for the attributeCOUNT- Count of values for the attribute-
PATH- Evaluate the document path -
CONTENT_TYPE- Evaluate the document content type EQ- EqualsNEQ- Not equalsCONTAINS- Contains substring or matching valueNOT_CONTAINS- Does not contain substring or matching valueSTARTS_WITH- Starts with valueENDS_WITH- Ends with valueGT- Greater thanGTE- Greater than or equalLT- Less thanLTE- Less than or equalEXISTS- Field existsNOT_EXISTS- Field does not existIN- Matches one of the provided valuesNOT_IN- Does not match any of the provided valuesIS_EMPTY- Source value is emptyIS_NOT_EMPTY- Source value is not empty]
- Move to another workflow step
- Complete successfully
- Be rejected
- Be cancelled
- Remain on the current step
]
- Move to another workflow step
- Complete successfully
- Be rejected
- Be cancelled
- Remain on the current step
Array [
]
]
Workflow name
Workflow description
Status of the Workflow
Possible values: [ACTIVE, INACTIVE]
steps
object[]
required
Workflow Steps
Workflow Step Identifier
Workflow Step description
action
object
Type of the Document Action
Possible values: [ANTIVIRUS, DOCUMENTTAGGING, FULLTEXT, MOVE, DELETE, CHECKSUM, NOTIFICATION, OCR, QUEUE, WEBHOOK, IDP, PUBLISH, PDFEXPORT, EVENTBRIDGE, RESIZE, LLMPROMPT, DATA_CLASSIFICATION, MALWARE_SCAN]
parameters
object
ocrTextractQueries
object[]
Natural-language question
Label to identify this query in the result
Page selection
OCR: Parse types - TEXT, FORMS, TABLES, QUERIES (must include ocrTextractQueries)
Type of OCR Engine to use
Possible values: [TESSERACT, TEXTRACT]
OCR Engine output format (textract table only)
Possible values: [CSV]
Number of pages to OCR (from start) (-1 all)
OCR: For the rewriting of the PDF document, converting any image text to searchable text
LLMPROMPT, DATA_CLASSIFICATION, METADATA_EXTRACTION: Set the LLM Prompt Entity Name
LLMPROMPT: Override the LLM Prompt Entity model id
Webhook: Callback URL
Fulltext: Maximum number of characters (-1 unlimited, Typesense defaults to 2048 characters)
DocumentTagging: Engine to use for document tagging generation
Possible values: [chatgpt]
Notification Type
Possible values: [email]
Who to carbon copy on the notification to (comma-delimited list)
Who to blind carbon copy on the notification to (comma-delimited list)
Subject of the notification
Text of the notification
Html of the notification
DocumentTagging: Comma-deliminted list of keywords to generate tags for
Id of Mapping
The name or ARN of the event bus to receive the event
The type of checksum to use for file validation
Possible values: [SHA1, SHA256, SHA512]
The width of the image to resize (or 'auto')
The height of the image to resize (or 'auto')
MOVE: Destination folder path, must end with '/'; RESIZE: Path to use when creating resized document (optional)
DELETE: Type of delete to perform
Possible values: [SOFT_DELETE, HARD_DELETE, PURGE]
The output type of the image
Id of Queue
queue
object
Queue Identifier
mappings
object[]
Mapping Identifier
decision
object
conditions
object[]
Workflow Step Conditions
all
object[]
Workflow Step Condition Criteria
source
object
required
Defines the document-derived source value to evaluate for a workflow condition criterion.
The source identifies where the value comes from before applying the operator. Supported sources include:
oneOf
Uses a document attribute as the source value for a workflow condition criterion.
The attribute is selected using attributeKey.
Document attribute key
Compares the value of one document attribute to another attribute-derived value on the same document.
The criterion operator is evaluated as: document.attribute[valueAttributeKey] OP comparison
Literal comparison value fields are not used with this source.
Identifies this source as an attribute-value comparison.
Possible values: [DOCUMENT_ATTRIBUTE_VALUE_COMPARISON]
Document attribute key containing the value to compare.
comparison
object
required
Defines the right-side comparison value for an attribute value comparison.
oneOf
Uses another document attribute value as the right-side comparison value.
Document attribute key containing the comparison value.
Uses an aggregate over another document attribute's values as the right-side comparison value.
Document attribute key whose values are aggregated for comparison.
Aggregate operation applied to document attribute values.
Values:
Possible values: [FIRST, LAST, SUM, MIN, MAX, COUNT]
Identifies the built-in document metadata field to evaluate for a workflow condition criterion.
Values:
string
Possible values: [PATH, CONTENT_TYPE]
Comparison operator used to evaluate a workflow condition criterion.
Values:
Possible values: [EQ, NEQ, CONTAINS, NOT_CONTAINS, STARTS_WITH, ENDS_WITH, GT, GTE, LT, LTE, EXISTS, NOT_EXISTS, IN, NOT_IN, IS_EMPTY, IS_NOT_EMPTY]
String comparison value
Numeric comparison value
Boolean comparison value
String values used for IN or NOT_IN comparisons
any
object[]
Workflow Step Condition Criteria
source
object
required
Defines the document-derived source value to evaluate for a workflow condition criterion.
The source identifies where the value comes from before applying the operator. Supported sources include:
oneOf
Uses a document attribute as the source value for a workflow condition criterion.
The attribute is selected using attributeKey.
Document attribute key
Compares the value of one document attribute to another attribute-derived value on the same document.
The criterion operator is evaluated as: document.attribute[valueAttributeKey] OP comparison
Literal comparison value fields are not used with this source.
Identifies this source as an attribute-value comparison.
Possible values: [DOCUMENT_ATTRIBUTE_VALUE_COMPARISON]
Document attribute key containing the value to compare.
comparison
object
required
Defines the right-side comparison value for an attribute value comparison.
oneOf
Uses another document attribute value as the right-side comparison value.
Document attribute key containing the comparison value.
Uses an aggregate over another document attribute's values as the right-side comparison value.
Document attribute key whose values are aggregated for comparison.
Aggregate operation applied to document attribute values.
Values:
Possible values: [FIRST, LAST, SUM, MIN, MAX, COUNT]
Identifies the built-in document metadata field to evaluate for a workflow condition criterion.
Values:
string
Possible values: [PATH, CONTENT_TYPE]
Comparison operator used to evaluate a workflow condition criterion.
Values:
Possible values: [EQ, NEQ, CONTAINS, NOT_CONTAINS, STARTS_WITH, ENDS_WITH, GT, GTE, LT, LTE, EXISTS, NOT_EXISTS, IN, NOT_IN, IS_EMPTY, IS_NOT_EMPTY]
String comparison value
Numeric comparison value
Boolean comparison value
String values used for IN or NOT_IN comparisons
transition
object
required
Defines the outcome of a workflow step transition.
A transition determines what happens after a workflow step finishes evaluating its conditions, decisions, or actions.
Depending on the transition type, the workflow may:
Some transition types require additional properties. For example,
when the type is STEP, a target step identifier must be provided
in the transition object.
Possible values: [STEP, RETRY, COMPLETE]
Target workflow step
defaultTransition
object
Defines the outcome of a workflow step transition.
A transition determines what happens after a workflow step finishes evaluating its conditions, decisions, or actions.
Depending on the transition type, the workflow may:
Some transition types require additional properties. For example,
when the type is STEP, a target step identifier must be provided
in the transition object.
Possible values: [STEP, RETRY, COMPLETE]
Target workflow step
decisions
object[]
deprecated
Deprecated; use 'decision' instead
Type of Workflow Step Decision
Possible values: [APPROVE, REJECT]
Workflow Step to move to
Responses
- 201
- 400
201 CREATED
Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
- application/json
- Schema
- Example (from schema)
Schema
Workflow Identifier
{
"workflowId": "string"
}
400 BAD REQUEST
Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
List of errors
Error Key
Error Message
{
"errors": [
{
"key": "string",
"error": "string"
}
]
}