Automation API
- Base URL:
https://automation.sls.epilot.io - Full API Docs: https://docs.epilot.io/api/automation
Usageโ
import { epilot } from '@epilot/sdk'
epilot.authorize(() => '<token>')
const { data } = await epilot.automation.searchFlows(...)
Tree-shakeable importโ
import { getClient, authorize } from '@epilot/sdk/automation'
const automationClient = getClient()
authorize(automationClient, () => '<token>')
const { data } = await automationClient.searchFlows(...)
Operationsโ
flows
executions
getExecutionsstartExecutionsearchExecutionsgetExecutioncancelExecutionretriggerActionresumeExecutionWithTokencancelSchedule
bulk
Schemas
AutomationFlowIdAutomationActionIdAutomationFlowWorkflowContextRoleSearchAutomationsRespJourneyContextUsagesReqJourneyContextUsageJourneyContextUsagesRespAnyTriggerAnyActionAnyActionConfigAutomationActionConfigAutomationLoopAutomationActionExecutionStateAutomationActionIterationRetryStrategyAutomationActionErrorOutputErrorCodeErrorDetailCartCheckoutActionConfigCartCheckoutActionCartCheckoutConfigMapEntityActionConfigMapEntityActionMapEntityConfigGraphContextEntryGraphSeedGraphDefinitionGraphNodeGraphNodeFilterGraphEdgeMappingConfigRefRelationAttributeMappingAttributeV2OperationNodeOperationObjectNodePrimitiveJSONValueMappingAttributeMappingAttributeModeSetValueMapperCopyValueMapperAppendValueMapperMoveThreadActionAssignThreadActionLabelEmailActionMoveThreadConfigLabelEmailConfigAssignThreadConfigEntityAssigneeEntityAssigneeVariableAssignEntityConfigAssignEntityActionConfigAssignEntityActionSendEmailActionConfigSendEmailActionForwardEmailActionConfigForwardEmailActionForwardEmailConfigReplyEmailActionConfigReplyEmailActionReplyEmailConfigSendEmailConfigSendEmailConditionCreateDocumentActionConfigCreateDocumentActionCreateDocumentConfigTriggerWorkflowActionConfigTriggerWorkflowActionTriggerWorkflowConfigTriggerWorkflowConditionTriggerShareEntityActionConfigTriggerShareEntityActionTriggerShareEntityConfigAssignUsersToStepCustomActionTriggerWebhookActionConfigTriggerWebhookActionTriggerWebhookConfigInformERPActionConfigInformERPActionInformERPConfigTriggerEventActionConfigTriggerEventActionTriggerEventConfigFlowExecutionCancelActionConfigFlowExecutionCancelActionFlowExecutionCancelConfigCancellationReasonConditionStatementActionConditionActionScheduleSourceActionScheduleAutomationExecutionIdAutomationExecutionAutomationLoopStateWorkflowExecutionContextWorkflowWaitContextExecutionChainTriggerEventManualTriggerEventFlowAutomationTaskTriggerEventEntityActivityTriggerEventMessagingTriggerEventEntityOperationTriggerEventEventCatalogTriggerEventPayloadRefApiCallerContextExecutionStatusGetExecutionsRespSearchExecutionsReqSearchExecutionsRespStartExecutionRequestActionInputsSendEmailInputsFlowExecutionCancelInputsPatchBulkJobRequestBulkTriggerRequestEntityRefBulkTriggerJobExecutionStatsExecItemJobIdEntityIdActivityIdOrganizationIdTriggerContextAutomationTriggerFlowsTriggerJourneySubmitTriggerFrontendSubmitTriggerApiSubmissionTriggerNewEmailThreadTriggerReceivedEmailTriggerSentEmailTriggerEntityOperationTriggerActivityTriggerEntityOperationEntitySearchFilterEntitySearchFilterValueEntityManualTriggerEventCatalogTriggerTriggerConditionComparisonFilterConditionOnEventEqualsIgnoreCaseConditionAnythingButConditionNumericConditionExistsConditionPrefixConditionSuffixConditionWildcardConditionOrConditionDiffAddedDiffUpdatedDiffDeletedOrConditionForDiffEntityItemSnapshotRetryReqResumeTokenResumeReqResumeRespErrorObject
searchFlowsโ
Search available automation flows
GET /v1/automation/flows
const { data } = await client.searchFlows({
schema: 'example',
size: 1,
from: 1,
trigger_source_id: 'example',
target_workflow: 'example',
trigger_event_name: 'example',
include_flows: true,
})
createFlowโ
Create new automation flow
POST /v1/automation/flows
const { data } = await client.createFlow()
batchGetFlowsโ
Get multiple automation flows by their IDs
POST /v1/automation/flows:batchGet
const { data } = await client.batchGetFlows(
null,
{
ids: ['7791b04a-16d2-44a2-9af9-2d59c25c512f']
},
)
getFlowโ
List available automation flows
GET /v1/automation/flows/{flow_id}
const { data } = await client.getFlow({
flow_id: 'example',
})
putFlowโ
Update automation flow by id
PUT /v1/automation/flows/{flow_id}
const { data } = await client.putFlow({
flow_id: 'example',
})
deleteFlowโ
Update automation flow by id
DELETE /v1/automation/flows/{flow_id}
const { data } = await client.deleteFlow({
flow_id: 'example',
})
getExecutionsโ
List automation executions
GET /v1/automation/executions
const { data } = await client.getExecutions({
entity_id: 'example',
size: 1,
from: 1,
include_flows: true,
})
Response
{
"total": 0,
"results": [
{
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [],
"schedules": [],
"actions": [],
"action_inputs": {},
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {},
"version": 2,
"trigger_event": {},
"workflow_context": {},
"workflow_wait_context": {},
"loops": [],
"loop_state": {},
"chain": ["string"]
}
]
}
startExecutionโ
Start new automation execution
POST /v1/automation/executions
const { data } = await client.startExecution(
null,
{
entity_id: 'e3d3ebac-baab-4395-abf4-50b5bf1f8b74',
flow_id: '7791b04a-16d2-44a2-9af9-2d59c25c512f',
workflow_context: {
workflow_exec_id: 'string',
workflow_exec_task_id: 'string',
workflow_role: 'trigger_workflow',
_execution_chain: {
parent_execution_id: 'string',
parent_task_id: 'string',
depth: 0
},
_automation_chain: ['string'],
entity_contexts: [
{
entity_id: 'string',
entity_schema: 'string',
is_primary: true
}
],
resolved_input: {
with_relations: true,
also_pass: [
{
entity_id: 'string',
entity_schema: 'string'
}
]
},
trigger_user_id: '10006129',
run_by: {
user_id: '10006129',
org_id: '739224'
}
},
flow_execution_id: 'string',
flow_automation_task_id: 'string',
action_inputs: {
'cancel-flow-execution': {
selected_reasons: [
{
id: '_6kITMwkv_0Uo4i7fO7Ja',
title: 'Process completed successfully'
}
],
extra_description: 'string'
},
'send-email': {
subject: 'string',
body: 'string',
attachment_entity_ids: ['string']
}
}
},
)
Response
{
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {
"_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"_title": "string",
"_org": "string",
"_schema": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z"
},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [
{
"id": "string",
"schedule_id": "string",
"evaluation_order": "AFTER_SCHEDULE",
"evaluationResult": true,
"error_output": {},
"allow_failure": true,
"statements": []
}
],
"schedules": [
{
"id": "string",
"scheduleApiId": "string",
"numberOfUnits": 0,
"timePeriod": "minutes",
"timeRelation": "after",
"source": {}
}
],
"actions": [
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "map-entity",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"loop_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME",
"iterations": []
},
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "trigger-workflow",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"loop_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME",
"iterations": []
}
],
"action_inputs": {
"cancel-flow-execution": {
"selected_reasons": [],
"extra_description": "string"
},
"send-email": {
"subject": "string",
"body": "string",
"attachment_entity_ids": ["string"]
}
},
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"version": 2,
"trigger_event": {
"type": "manual",
"org_id": "123",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"caller": {
"EpilotAuth": {}
}
},
"workflow_context": {
"workflow_exec_id": "string",
"workflow_exec_task_id": "string",
"workflow_role": "trigger_workflow",
"_execution_chain": {
"parent_execution_id": "string",
"parent_task_id": "string",
"depth": 0
},
"_automation_chain": ["string"],
"entity_contexts": [
{}
],
"resolved_input": {
"with_relations": true,
"also_pass": []
},
"trigger_user_id": "10006129",
"run_by": {
"user_id": "10006129",
"org_id": "739224"
}
},
"workflow_wait_context": {
"workflow_execution_id": "string",
"workflow_task_id": "string",
"source": "journey_submission"
},
"loops": [
{
"id": "loop_contracts",
"source_path": "submission.steps[0]['Contracts']",
"source_type": "journey-multi-select",
"filter_tags": ["_hidden_ 2a4b1c3d-0000-4000-8000-000000000000 - Dokumente"],
"length": 0
}
],
"loop_state": {},
"chain": ["string"]
}
searchExecutionsโ
Search automation executions of an entity with cursor-based pagination. Returns pages of up to 100 executions, newest first. Prefer this over GET /v1/automation/executions, which returns the full exec
POST /v1/automation/executions:search
const { data } = await client.searchExecutions(
null,
{
entity_id: 'e3d3ebac-baab-4395-abf4-50b5bf1f8b74',
include_flows: false,
size: 25,
cursor: 'string'
},
)
Response
{
"total": 0,
"results": [
{
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [],
"schedules": [],
"actions": [],
"action_inputs": {},
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {},
"version": 2,
"trigger_event": {},
"workflow_context": {},
"workflow_wait_context": {},
"loops": [],
"loop_state": {},
"chain": ["string"]
}
],
"next_cursor": "string"
}
bulkTriggerExecutionsโ
Create a bulk job that triggers multiple automation executions
POST /v1/automation/executions/bulk-jobs
const { data } = await client.bulkTriggerExecutions(
null,
{
flow_id: '7791b04a-16d2-44a2-9af9-2d59c25c512f',
entities_refs: [
{
entity_id: 'e3d3ebac-baab-4395-abf4-50b5bf1f8b74',
entity_schema: 'string'
}
],
trigger_context: {
entity_id: 'a1b2c3d4-e5f6-7890-1234-567890abcdef'
}
},
)
getBulkJobโ
Get the status of a bulk job that triggers multiple automation executions.
GET /v1/automation/executions/bulk-jobs/{job_id}
const { data } = await client.getBulkJob({
job_id: 'example',
include_execution_summary: true,
})
Response
{
"job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"status": "approval",
"created_by": "1234",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"approved_at": "1970-01-01T00:00:00.000Z",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
"report_file_entity_id": "string",
"last_error": "ThrottlingException: Throughput exceeds the current capacity of your table or index.",
"restart_count": 1,
"restarted_at": "1970-01-01T00:00:00.000Z",
"entity_query": {
"type": "refs",
"data": [
{
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_schema": "string"
}
]
},
"pagination_state": {
"page_size": 0,
"pages_processed": 0,
"total_processed": 0,
"stable_query_id": "string",
"search_after": ["string"],
"has_more": true
},
"execution_summary": [
{
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_schema": "string",
"execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"timestamp": "2025-10-30T15:56:47.842Z",
"error": "string"
}
],
"execution_stats": {
"total": 60582,
"pending": 0,
"starting": 0,
"in_progress": 0,
"success": 0,
"failed": 0,
"cancelled": 0,
"skipped": 0,
"paused": 0,
"scheduled": 0,
"hot": 0
},
"execution_summary_truncated": true
}
patchBulkJobโ
Approve / Cancel / Restart a bulk job that triggers multiple automation executions.
PATCH /v1/automation/executions/bulk-jobs/{job_id}
const { data } = await client.patchBulkJob(
{
job_id: 'example',
},
{
action: 'APPROVE',
task_token: 'string'
},
)
Response
{
"job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"status": "approval",
"created_by": "1234",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"approved_at": "1970-01-01T00:00:00.000Z",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
"report_file_entity_id": "string",
"last_error": "ThrottlingException: Throughput exceeds the current capacity of your table or index.",
"restart_count": 1,
"restarted_at": "1970-01-01T00:00:00.000Z",
"entity_query": {
"type": "refs",
"data": [
{
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_schema": "string"
}
]
},
"pagination_state": {
"page_size": 0,
"pages_processed": 0,
"total_processed": 0,
"stable_query_id": "string",
"search_after": ["string"],
"has_more": true
},
"execution_summary": [
{
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_schema": "string",
"execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"timestamp": "2025-10-30T15:56:47.842Z",
"error": "string"
}
],
"execution_stats": {
"total": 60582,
"pending": 0,
"starting": 0,
"in_progress": 0,
"success": 0,
"failed": 0,
"cancelled": 0,
"skipped": 0,
"paused": 0,
"scheduled": 0,
"hot": 0
},
"execution_summary_truncated": true
}
getExecutionโ
Get automation execution
GET /v1/automation/executions/{execution_id}
const { data } = await client.getExecution({
execution_id: 'example',
})
Response
{
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {
"_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"_title": "string",
"_org": "string",
"_schema": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z"
},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [
{
"id": "string",
"schedule_id": "string",
"evaluation_order": "AFTER_SCHEDULE",
"evaluationResult": true,
"error_output": {},
"allow_failure": true,
"statements": []
}
],
"schedules": [
{
"id": "string",
"scheduleApiId": "string",
"numberOfUnits": 0,
"timePeriod": "minutes",
"timeRelation": "after",
"source": {}
}
],
"actions": [
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "map-entity",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"loop_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME",
"iterations": []
},
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "trigger-workflow",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"loop_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME",
"iterations": []
}
],
"action_inputs": {
"cancel-flow-execution": {
"selected_reasons": [],
"extra_description": "string"
},
"send-email": {
"subject": "string",
"body": "string",
"attachment_entity_ids": ["string"]
}
},
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"version": 2,
"trigger_event": {
"type": "manual",
"org_id": "123",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"caller": {
"EpilotAuth": {}
}
},
"workflow_context": {
"workflow_exec_id": "string",
"workflow_exec_task_id": "string",
"workflow_role": "trigger_workflow",
"_execution_chain": {
"parent_execution_id": "string",
"parent_task_id": "string",
"depth": 0
},
"_automation_chain": ["string"],
"entity_contexts": [
{}
],
"resolved_input": {
"with_relations": true,
"also_pass": []
},
"trigger_user_id": "10006129",
"run_by": {
"user_id": "10006129",
"org_id": "739224"
}
},
"workflow_wait_context": {
"workflow_execution_id": "string",
"workflow_task_id": "string",
"source": "journey_submission"
},
"loops": [
{
"id": "loop_contracts",
"source_path": "submission.steps[0]['Contracts']",
"source_type": "journey-multi-select",
"filter_tags": ["_hidden_ 2a4b1c3d-0000-4000-8000-000000000000 - Dokumente"],
"length": 0
}
],
"loop_state": {},
"chain": ["string"]
}
cancelExecutionโ
Cancel automation execution
DELETE /v1/automation/executions/{execution_id}
const { data } = await client.cancelExecution({
execution_id: 'example',
})
Response
{
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {
"_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"_title": "string",
"_org": "string",
"_schema": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z"
},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [
{
"id": "string",
"schedule_id": "string",
"evaluation_order": "AFTER_SCHEDULE",
"evaluationResult": true,
"error_output": {},
"allow_failure": true,
"statements": []
}
],
"schedules": [
{
"id": "string",
"scheduleApiId": "string",
"numberOfUnits": 0,
"timePeriod": "minutes",
"timeRelation": "after",
"source": {}
}
],
"actions": [
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "map-entity",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"loop_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME",
"iterations": []
},
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "trigger-workflow",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"loop_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME",
"iterations": []
}
],
"action_inputs": {
"cancel-flow-execution": {
"selected_reasons": [],
"extra_description": "string"
},
"send-email": {
"subject": "string",
"body": "string",
"attachment_entity_ids": ["string"]
}
},
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"version": 2,
"trigger_event": {
"type": "manual",
"org_id": "123",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"caller": {
"EpilotAuth": {}
}
},
"workflow_context": {
"workflow_exec_id": "string",
"workflow_exec_task_id": "string",
"workflow_role": "trigger_workflow",
"_execution_chain": {
"parent_execution_id": "string",
"parent_task_id": "string",
"depth": 0
},
"_automation_chain": ["string"],
"entity_contexts": [
{}
],
"resolved_input": {
"with_relations": true,
"also_pass": []
},
"trigger_user_id": "10006129",
"run_by": {
"user_id": "10006129",
"org_id": "739224"
}
},
"workflow_wait_context": {
"workflow_execution_id": "string",
"workflow_task_id": "string",
"source": "journey_submission"
},
"loops": [
{
"id": "loop_contracts",
"source_path": "submission.steps[0]['Contracts']",
"source_type": "journey-multi-select",
"filter_tags": ["_hidden_ 2a4b1c3d-0000-4000-8000-000000000000 - Dokumente"],
"length": 0
}
],
"loop_state": {},
"chain": ["string"]
}
retriggerActionโ
Retry a specific automation execution action which failed / is stuck.
POST /v1/automation/executions/{execution_id}/{action_id}/retrigger
const { data } = await client.retriggerAction(
{
execution_id: 'example',
action_id: 'example',
},
{
condition_id: 'string',
retry_strategy: 'RETRY_AND_RESUME'
},
)
resumeExecutionWithTokenโ
Resume a paused automation execution using a unique resume token.
POST /v1/automation/public/executions:resume
const { data } = await client.resumeExecutionWithToken(
null,
{
resume_token: 'eyJraWQiOiJrZXkifQ=='
},
)
Response
{
"execution": {
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {
"_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"_title": "string",
"_org": "string",
"_schema": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z"
},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [
{}
],
"schedules": [
{}
],
"actions": [
{},
{}
],
"action_inputs": {
"cancel-flow-execution": {},
"send-email": {}
},
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"version": 2,
"trigger_event": {
"type": "manual",
"org_id": "123",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"caller": {}
},
"workflow_context": {
"workflow_exec_id": "string",
"workflow_exec_task_id": "string",
"workflow_role": "trigger_workflow",
"_execution_chain": {},
"_automation_chain": ["string"],
"entity_contexts": [],
"resolved_input": {},
"trigger_user_id": "10006129",
"run_by": {}
},
"workflow_wait_context": {
"workflow_execution_id": "string",
"workflow_task_id": "string",
"source": "journey_submission"
},
"loops": [
{}
],
"loop_state": {},
"chain": ["string"]
},
"resumedAction": {
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "map-entity",
"config": {
"mapping_config": {},
"target_schema": "string",
"use_uniqueness_criteria": true,
"target_unique": ["string"],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {
"message": "There are no registered portal users for the given emails, hence skipping the action",
"payload": {}
},
"condition_id": "string",
"schedule_id": "string",
"loop_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {
"error_code": "MAPPING_ERROR",
"error_reason": "string",
"error_info": {}
},
"retry_strategy": "RETRY_AND_RESUME",
"iterations": [
{}
]
}
}
cancelScheduleโ
Cancel a scheduled automation
DELETE /v1/automation/executions/{execution_id}/schedules/{schedule_id}
const { data } = await client.cancelSchedule({
execution_id: 'example',
schedule_id: 'example',
})
Response
{
"id": "string",
"scheduleApiId": "string",
"numberOfUnits": 0,
"timePeriod": "minutes",
"timeRelation": "after",
"source": {
"id": "string",
"origin": "trigger",
"schema": "string",
"attribute": "string"
}
}
Schemasโ
AutomationFlowIdโ
ID of the Automation Flow
type AutomationFlowId = string
AutomationActionIdโ
type AutomationActionId = string
AutomationFlowโ
type AutomationFlow = {
id?: string
flow_name: string
enabled?: boolean
disable_details?: {
disabled_at: string // date-time
disabled_by: "system" | "user"
blame?: string
}
triggers: Array<{
id?: string // uuid
type: "frontend_submission"
configuration: {
source_id?: { ... }
}
} | {
id?: string // uuid
type: "journey_submission"
configuration: {
source_id: { ... }
}
} | {
id?: string // uuid
type: "api_submission"
configuration: {
source_id?: { ... }
}
} | {
id?: string // uuid
type: "entity_operation"
configuration: {
schema?: { ... }
operations?: { ... }
include_activities?: { ... }
exclude_activities?: { ... }
filter_config?: { ... }
ecp_config?: { ... }
}
} | {
id?: string // uuid
type: "activity"
configuration: {
schema?: { ... }
types?: { ... }
}
} | {
id?: string // uuid
type: "entity_manual"
configuration: {
schema?: { ... }
}
} | {
id?: string // uuid
type: "received_email"
configuration: {
message_type?: { ... }
}
} | {
id?: string // uuid
type: "sent_email"
configuration: object
} | {
id?: string // uuid
type: "new_email_thread"
configuration: {
shared_inbox_ids?: { ... }
direction: { ... }
}
} | {
id?: string // uuid
type: "flows_trigger"
configuration?: {
journey_id?: { ... }
}
} | {
id?: string // uuid
type: "event_catalog"
configuration: {
event_name: { ... }
event_version: { ... }
entity_node_id: { ... }
entity_schema: { ... }
ignore_automation_triggered?: { ... }
}
}>
trigger_conditions?: Array<{
source: string
comparison: "equals" | "any_of" | "not_empty" | "is_empty"
value?: string | number | string[] | number[]
}>
entity_schema?: string
conditions?: Array<{
id?: string
schedule_id?: string
evaluation_order?: "AFTER_SCHEDULE" | "BEFORE_SCHEDULE"
evaluationResult?: boolean
error_output?: {
error_code: { ... }
error_reason: { ... }
error_info?: { ... }
// ...
}
WorkflowContextRoleโ
The role this automation plays in the workflow.
type WorkflowContextRole = "trigger_workflow" | "run_task_automation"
SearchAutomationsRespโ
type SearchAutomationsResp = {
total: number
results: Array<{
id?: string
flow_name: string
enabled?: boolean
disable_details?: {
disabled_at: { ... }
disabled_by: { ... }
blame?: { ... }
}
triggers: Array<{
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration?: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
}>
trigger_conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
}>
entity_schema?: string
conditions?: Array<{
id?: { ... }
schedule_id?: { ... }
evaluation_order?: { ... }
evaluationResult?: { ... }
error_output?: { ... }
allow_failure?: { ... }
statements?: { ... }
}>
schedules?: Array<{
id: { ... }
scheduleApiId?: { ... }
numberOfUnits?: { ... }
timePeriod?: { ... }
timeRelation?: { ... }
source: { ... }
}>
loops?: Array<{
id: { ... }
source_path: { ... }
source_type?: { ... }
filter_tags?: { ... }
length?: { ... }
}>
actions: Array<{
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
// ...
}
JourneyContextUsagesReqโ
type JourneyContextUsagesReq = {
journey_id: string // uuid
param_keys: string[]
param_ids?: string[]
}
JourneyContextUsageโ
type JourneyContextUsage = {
kind: "automation"
resource: {
type: "automation_flow"
id: string
name?: string
}
location?: {
action_id?: string
action_type?: string
}
matched_as: {
dialect: "name"
token: string
at: string
}
link_hint: {
route: "automation-flow"
params: Record<string, string>
}
}
JourneyContextUsagesRespโ
type JourneyContextUsagesResp = {
usages: Array<{
kind: "automation"
resource: {
type: { ... }
id: { ... }
name?: { ... }
}
location?: {
action_id?: { ... }
action_type?: { ... }
}
matched_as: {
dialect: { ... }
token: { ... }
at: { ... }
}
link_hint: {
route: { ... }
params: { ... }
}
}>
status: "ok" | "partial"
scanned: number
}
AnyTriggerโ
type AnyTrigger = {
id?: string // uuid
type: "frontend_submission"
configuration: {
source_id?: string
}
} | {
id?: string // uuid
type: "journey_submission"
configuration: {
source_id: string // uuid
}
} | {
id?: string // uuid
type: "api_submission"
configuration: {
source_id?: string
}
} | {
id?: string // uuid
type: "entity_operation"
configuration: {
schema?: string
operations?: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity" | "relationsAdded" | "relationsRemoved" | "relationsSoftDeleted" | "relationsRestored" | "relationsDeleted"[]
include_activities?: string[]
exclude_activities?: string[]
filter_config?: {
operation?: { ... }
activity?: { ... }
}
ecp_config?: {
origin?: { ... }
portal_id?: { ... }
file_config?: { ... }
}
}
} | {
id?: string // uuid
type: "activity"
configuration: {
schema?: string
types?: "CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal" | string[]
}
} | {
id?: string // uuid
type: "entity_manual"
configuration: {
schema?: string
}
} | {
id?: string // uuid
type: "received_email"
configuration: {
message_type?: "RECEIVED"
}
} | {
id?: string // uuid
type: "sent_email"
configuration: object
} | {
id?: string // uuid
type: "new_email_thread"
configuration: {
shared_inbox_ids?: string[]
direction: "INBOUND" | "OUTBOUND" | "BOTH"
}
} | {
id?: string // uuid
type: "flows_trigger"
configuration?: {
journey_id?: string // uuid
}
} | {
id?: string // uuid
type: "event_catalog"
configuration: {
event_name: string
event_version: string
entity_node_id: string
entity_schema: string
ignore_automation_triggered?: boolean
}
}
AnyActionโ
type AnyAction = {
type?: "map-entity"
config?: {
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
target_schema: string
use_uniqueness_criteria?: boolean
target_unique?: string[]
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
graph_context?: Array<{
seed: { ... }
graph: { ... }
}>
}
} | {
type?: "trigger-workflow"
config?: {
target_workflow?: string
conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
schema?: { ... }
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: { ... }
step_name?: { ... }
user_ids?: { ... }
}>
filter_with_purposes?: boolean
}
} | {
type?: "trigger-share-entity"
config?: {
operation?: "share" | "unshare"
unshare_all_partners?: boolean
partner_org_ids?: string[]
}
} | {
type?: "trigger-webhook"
config?: {
event_id?: string
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
} | {
type?: "inform-erp"
config?: {
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
} | {
type?: "trigger-event"
config?: {
event_name: string
event_inputs?: Record<string, unknown>
}
} | {
type?: "create-document"
config?: {
template_id?: string
filename?: string
}
} | {
type?: "send-email"
config?: {
email_template_id?: string
// ...
}
AnyActionConfigโ
type AnyActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "map-entity"
config?: {
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
target_schema: string
use_uniqueness_criteria?: boolean
target_unique?: string[]
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
graph_context?: Array<{
seed: { ... }
graph: { ... }
}>
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
} | {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-workflow"
config?: {
target_workflow?: string
conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
schema?: { ... }
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: { ... }
step_name?: { ... }
user_ids?: { ... }
}>
filter_with_purposes?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
} | {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-workflow"
config?: {
operation?: "share" | "unshare"
unshare_all_partners?: boolean
partner_org_ids?: string[]
}
allow_failure?: boolean
created_automatically?: boolean
// ...
}
AutomationActionConfigโ
type AutomationActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: string
config?: Record<string, unknown>
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
AutomationLoopโ
A loop scope on an automation flow.
type AutomationLoop = {
id: string
source_path: string
source_type?: "journey-multi-select" | "journey-file-upload" | "previous-action-outputs" | "entity-relation"
filter_tags?: string[]
length?: number
}
AutomationActionExecutionStateโ
type AutomationActionExecutionState = {
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
started_at?: string
updated_at?: string
outputs?: Record<string, unknown>
error_output?: {
error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"
error_reason: string
error_info?: {
details?: { ... }
}
}
retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"
iterations?: Array<{
index: number
execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
started_at?: string // date-time
ended_at?: string // date-time
outputs?: Record<string, unknown>
error_output?: {
error_code: { ... }
error_reason: { ... }
error_info?: { ... }
}
}>
}
AutomationActionIterationโ
A snapshot of a single completed pass through a looped action.
type AutomationActionIteration = {
index: number
execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
started_at?: string // date-time
ended_at?: string // date-time
outputs?: Record<string, unknown>
error_output?: {
error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"
error_reason: string
error_info?: {
details?: { ... }
}
}
}
RetryStrategyโ
different behaviors for retrying failed execution actions.
type RetryStrategy = "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"
AutomationActionโ
type AutomationAction = {
id?: string
flow_action_id?: string
name?: string
type?: string
config?: Record<string, unknown>
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
started_at?: string
updated_at?: string
outputs?: Record<string, unknown>
error_output?: {
error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"
error_reason: string
error_info?: {
details?: { ... }
}
}
retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"
iterations?: Array<{
index: number
execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
started_at?: string // date-time
ended_at?: string // date-time
outputs?: Record<string, unknown>
error_output?: {
error_code: { ... }
error_reason: { ... }
error_info?: { ... }
}
}>
}
ErrorOutputโ
type ErrorOutput = {
error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"
error_reason: string
error_info?: {
details?: Array<{
explanation: { ... }
context?: { ... }
id?: { ... }
}>
}
}
ErrorCodeโ
type ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"
ErrorDetailโ
type ErrorDetail = {
explanation: string
context?: string
id?: string
}
CartCheckoutActionConfigโ
type CartCheckoutActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "cart-checkout"
config?: {
version?: string
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
target_unique?: string[]
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
CartCheckoutActionโ
type CartCheckoutAction = {
type?: "cart-checkout"
config?: {
version?: string
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
target_unique?: string[]
}
}
CartCheckoutConfigโ
type CartCheckoutConfig = {
version?: string
mapping_config?: {
config_id: string
target_id: string
version?: number
}
relation_attributes?: Array<{
target: string
target_tags?: string[]
target_tags_include_source?: boolean
source_filter?: {
limit?: { ... }
schema?: { ... }
attribute?: { ... }
relation_tag?: { ... }
tag?: { ... }
self?: { ... }
}
related_to?: Record<string, unknown>
mode: "append" | "prepend" | "set"
}>
mapping_attributes?: Array<{
target?: string
operation: {
_set?: { ... }
_append?: { ... }
_uniq?: { ... }
_copy?: { ... }
} | unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
value: unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source: string
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source?: string
value_json: string
target_unique?: string[]
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
target_unique?: string[]
}
MapEntityActionConfigโ
type MapEntityActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "map-entity"
config?: {
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
target_schema: string
use_uniqueness_criteria?: boolean
target_unique?: string[]
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
graph_context?: Array<{
seed: { ... }
graph: { ... }
}>
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
MapEntityActionโ
type MapEntityAction = {
type?: "map-entity"
config?: {
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
target_schema: string
use_uniqueness_criteria?: boolean
target_unique?: string[]
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
graph_context?: Array<{
seed: { ... }
graph: { ... }
}>
}
}
MapEntityConfigโ
type MapEntityConfig = {
mapping_config?: {
config_id: string
target_id: string
version?: number
}
target_schema: string
use_uniqueness_criteria?: boolean
target_unique?: string[]
mapping_attributes?: Array<{
target?: string
operation: {
_set?: { ... }
_append?: { ... }
_uniq?: { ... }
_copy?: { ... }
} | unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
value: unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source: string
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source?: string
value_json: string
target_unique?: string[]
}>
relation_attributes?: Array<{
target: string
target_tags?: string[]
target_tags_include_source?: boolean
source_filter?: {
limit?: { ... }
schema?: { ... }
attribute?: { ... }
relation_tag?: { ... }
tag?: { ... }
self?: { ... }
}
related_to?: Record<string, unknown>
mode: "append" | "prepend" | "set"
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
graph_context?: Array<{
seed: {
entity_id: { ... }
node_id: { ... }
}
graph: {
nodes: { ... }
edges: { ... }
}
}>
}
GraphContextEntryโ
One multi-hop graph query to run against entity-api's POST /v1/entity:graph. Every node
in graph.nodes is merged into the mapping's source context under its own id, so
listing multiple nodes here costs one entity-api call, not one per node. A node's value
overwrites any existing source-context
type GraphContextEntry = {
seed: {
entity_id: string // uuid
node_id: string
}
graph: {
nodes: Array<{
id: { ... }
schema: { ... }
cardinality?: { ... }
fields?: { ... }
filter?: { ... }
optional?: { ... }
}>
edges: Array<{
from: { ... }
to: { ... }
}>
}
}
GraphSeedโ
type GraphSeed = {
entity_id: string // uuid
node_id: string
}
GraphDefinitionโ
type GraphDefinition = {
nodes: Array<{
id: string
schema: string
cardinality?: "one" | "many"
fields?: string[]
filter?: Array<{
attribute: { ... }
value: { ... }
}>
optional?: boolean
}>
edges: Array<{
from: string
to: string
}>
}
GraphNodeโ
type GraphNode = {
id: string
schema: string
cardinality?: "one" | "many"
fields?: string[]
filter?: Array<{
attribute: string
value: string | number | boolean
}>
optional?: boolean
}
GraphNodeFilterโ
Entities are included in this node's result only if attribute exactly equals the literal value.
type GraphNodeFilter = {
attribute: string
value: string | number | boolean
}
GraphEdgeโ
type GraphEdge = {
from: string
to: string
}
MappingConfigRefโ
type MappingConfigRef = {
config_id: string
target_id: string
version?: number
}
RelationAttributeโ
type RelationAttribute = {
target: string
target_tags?: string[]
target_tags_include_source?: boolean
source_filter?: {
limit?: number
schema?: string
attribute?: string
relation_tag?: string
tag?: string
self?: boolean
}
related_to?: Record<string, unknown>
mode: "append" | "prepend" | "set"
}
MappingAttributeV2โ
type MappingAttributeV2 = {
target?: string
operation: {
_set?: unknown
_append?: unknown
_uniq?: boolean | string[]
_copy?: string
} | unknown
}
OperationNodeโ
Mapping operation nodes are either primitive values or operation node objects
type OperationNode = {
_set?: unknown
_append?: unknown
_uniq?: boolean | string[]
_copy?: string
} | unknown
OperationObjectNodeโ
type OperationObjectNode = {
_set?: unknown
_append?: unknown
_uniq?: boolean | string[]
_copy?: string
}
PrimitiveJSONValueโ
type PrimitiveJSONValue = unknown
MappingAttributeโ
type MappingAttribute = {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
value: unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source: string
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source?: string
value_json: string
target_unique?: string[]
}
MappingAttributeModeโ
- copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used togethe
type MappingAttributeMode = "copy_if_exists" | "append_if_exists" | "set_value"
SetValueMapperโ
type SetValueMapper = {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
value: unknown
}
CopyValueMapperโ
type CopyValueMapper = {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source: string
}
AppendValueMapperโ
type AppendValueMapper = {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source?: string
value_json: string
target_unique?: string[]
}
MoveThreadActionโ
type MoveThreadAction = {
type?: "move-thread"
config?: {
target_inbox_id?: string
}
}
AssignThreadActionโ
type AssignThreadAction = {
type?: "assign-thread"
config?: {
remove?: string[]
add?: string[]
assignment_type?: "direct" | "even_distribution" | "sequential"
only_available_users?: boolean
hold_until_available?: boolean
match_user_skills?: boolean
required_skill_categories?: string[]
skill_match_mode?: "require_all" | "prefer"
fallback?: "leave_unassigned" | "assign_to_fallback"
fallback_assignees?: string[]
write_mode?: "append" | "replace"
}
}
LabelEmailActionโ
type LabelEmailAction = {
type?: "label-email"
config?: {
add: string[]
}
}
MoveThreadConfigโ
type MoveThreadConfig = {
target_inbox_id?: string
}
LabelEmailConfigโ
type LabelEmailConfig = {
add: string[]
}
AssignThreadConfigโ
type AssignThreadConfig = {
remove?: string[]
add?: string[]
assignment_type?: "direct" | "even_distribution" | "sequential"
only_available_users?: boolean
hold_until_available?: boolean
match_user_skills?: boolean
required_skill_categories?: string[]
skill_match_mode?: "require_all" | "prefer"
fallback?: "leave_unassigned" | "assign_to_fallback"
fallback_assignees?: string[]
write_mode?: "append" | "replace"
}
EntityAssigneeโ
A single assignee as stored in a user-relation attribute. Written through verbatim by the assign-entity worker. Note this object encoding differs deliberately from AssignThreadConfig, which stores bare id strings โ each matches what its own target accepts.
type EntityAssignee = {
type: "user" | "partner_user" | "partner_organization" | "group"
user_id?: string
group_id?: string
org_id?: string
partner_id?: string
display_name?: string
email?: string
}
EntityAssigneeVariableโ
An assignee resolved at execution time from a user-relation attribute of an
entity in the automation context, e.g. {{submission._owners}}. Resolves
against the entity being assigned or the triggering entity, whichever has
the given schema slug. The attribute may hold user ids, `{ org_id, user_id }
type EntityAssigneeVariable = {
variable: string
}
AssignEntityConfigโ
type AssignEntityConfig = {
attribute?: string
assignees?: Array<{
type: "user" | "partner_user" | "partner_organization" | "group"
user_id?: string
group_id?: string
org_id?: string
partner_id?: string
display_name?: string
email?: string
} | {
variable: string
}>
write_mode?: "replace" | "append"
assignment_type?: "direct" | "sequential" | "even_distribution"
candidate_pool?: Array<{
type: "user" | "partner_user" | "partner_organization" | "group"
user_id?: string
group_id?: string
org_id?: string
partner_id?: string
display_name?: string
email?: string
}>
candidate_group?: {
type: "user" | "partner_user" | "partner_organization" | "group"
user_id?: string
group_id?: string
org_id?: string
partner_id?: string
display_name?: string
email?: string
}
reset_interval?: "daily" | "weekly" | "monthly" | "never"
workload_filter?: {
attribute?: string
values?: string[]
}
match_user_skills?: boolean
required_skill_categories?: string[]
required_skills?: string[]
required_skills_match_mode?: "require_all" | "prefer"
skill_match_mode?: "require_all" | "prefer"
fallback?: "leave_unassigned" | "assign_to_fallback"
fallback_assignees?: Array<{
type: "user" | "partner_user" | "partner_organization" | "group"
user_id?: string
group_id?: string
org_id?: string
partner_id?: string
display_name?: string
email?: string
}>
source?: {
id?: string
origin?: "trigger" | "action"
schema?: string
}
}
AssignEntityActionConfigโ
type AssignEntityActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "assign-entity"
config?: {
attribute?: string
assignees?: Array<{
type: { ... }
user_id?: { ... }
group_id?: { ... }
org_id?: { ... }
partner_id?: { ... }
display_name?: { ... }
email?: { ... }
} | {
variable: { ... }
}>
write_mode?: "replace" | "append"
assignment_type?: "direct" | "sequential" | "even_distribution"
candidate_pool?: Array<{
type: { ... }
user_id?: { ... }
group_id?: { ... }
org_id?: { ... }
partner_id?: { ... }
display_name?: { ... }
email?: { ... }
}>
candidate_group?: {
type: { ... }
user_id?: { ... }
group_id?: { ... }
org_id?: { ... }
partner_id?: { ... }
display_name?: { ... }
email?: { ... }
}
reset_interval?: "daily" | "weekly" | "monthly" | "never"
workload_filter?: {
attribute?: { ... }
values?: { ... }
}
match_user_skills?: boolean
required_skill_categories?: string[]
required_skills?: string[]
required_skills_match_mode?: "require_all" | "prefer"
skill_match_mode?: "require_all" | "prefer"
fallback?: "leave_unassigned" | "assign_to_fallback"
fallback_assignees?: Array<{
type: { ... }
user_id?: { ... }
group_id?: { ... }
org_id?: { ... }
partner_id?: { ... }
display_name?: { ... }
email?: { ... }
}>
source?: {
id?: { ... }
origin?: { ... }
schema?: { ... }
}
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
AssignEntityActionโ
type AssignEntityAction = {
type?: "assign-entity"
config?: {
attribute?: string
assignees?: Array<{
type: { ... }
user_id?: { ... }
group_id?: { ... }
org_id?: { ... }
partner_id?: { ... }
display_name?: { ... }
email?: { ... }
} | {
variable: { ... }
}>
write_mode?: "replace" | "append"
assignment_type?: "direct" | "sequential" | "even_distribution"
candidate_pool?: Array<{
type: { ... }
user_id?: { ... }
group_id?: { ... }
org_id?: { ... }
partner_id?: { ... }
display_name?: { ... }
email?: { ... }
}>
candidate_group?: {
type: { ... }
user_id?: { ... }
group_id?: { ... }
org_id?: { ... }
partner_id?: { ... }
display_name?: { ... }
email?: { ... }
}
reset_interval?: "daily" | "weekly" | "monthly" | "never"
workload_filter?: {
attribute?: { ... }
values?: { ... }
}
match_user_skills?: boolean
required_skill_categories?: string[]
required_skills?: string[]
required_skills_match_mode?: "require_all" | "prefer"
skill_match_mode?: "require_all" | "prefer"
fallback?: "leave_unassigned" | "assign_to_fallback"
fallback_assignees?: Array<{
type: { ... }
user_id?: { ... }
group_id?: { ... }
org_id?: { ... }
partner_id?: { ... }
display_name?: { ... }
email?: { ... }
}>
source?: {
id?: { ... }
origin?: { ... }
schema?: { ... }
}
}
}
SendEmailActionConfigโ
type SendEmailActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "send-email"
config?: {
email_template_id?: string
language_code?: string
notify_portal_user_only?: boolean
skip_creating_entities?: boolean
wait_for_confirmation?: boolean
wait_for_journey_submission?: boolean
journey_id?: string
reply_to_sender?: boolean
reply_mode?: "reply_in_thread" | "new_email"
mark_as_done?: boolean
mark_as_read?: boolean
attachments?: Array<{
source_filter?: { ... }
}>
conditions?: Array<{
_equals?: { ... }
}>
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
SendEmailActionโ
type SendEmailAction = {
type?: "send-email"
config?: {
email_template_id?: string
language_code?: string
notify_portal_user_only?: boolean
skip_creating_entities?: boolean
wait_for_confirmation?: boolean
wait_for_journey_submission?: boolean
journey_id?: string
reply_to_sender?: boolean
reply_mode?: "reply_in_thread" | "new_email"
mark_as_done?: boolean
mark_as_read?: boolean
attachments?: Array<{
source_filter?: { ... }
}>
conditions?: Array<{
_equals?: { ... }
}>
}
}
ForwardEmailActionConfigโ
type ForwardEmailActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "forward-email"
config?: {
forward_to: Array<{
email: { ... }
name?: { ... }
}>
include_attachments?: boolean
subject_prefix?: string
language_code?: "de" | "en"
mark_as_done?: boolean
mark_as_read?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
ForwardEmailActionโ
type ForwardEmailAction = {
type?: "forward-email"
config?: {
forward_to: Array<{
email: { ... }
name?: { ... }
}>
include_attachments?: boolean
subject_prefix?: string
language_code?: "de" | "en"
mark_as_done?: boolean
mark_as_read?: boolean
}
}
ForwardEmailConfigโ
type ForwardEmailConfig = {
forward_to: Array<{
email: string // email
name?: string
}>
include_attachments?: boolean
subject_prefix?: string
language_code?: "de" | "en"
mark_as_done?: boolean
mark_as_read?: boolean
}
ReplyEmailActionConfigโ
type ReplyEmailActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "reply-email"
config?: {
email_template_id?: string
language_code?: string
reply_mode?: "reply_in_thread" | "new_email"
mark_as_done?: boolean
mark_as_read?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
ReplyEmailActionโ
type ReplyEmailAction = {
type?: "reply-email"
config?: {
email_template_id?: string
language_code?: string
reply_mode?: "reply_in_thread" | "new_email"
mark_as_done?: boolean
mark_as_read?: boolean
}
}
ReplyEmailConfigโ
type ReplyEmailConfig = {
email_template_id?: string
language_code?: string
reply_mode?: "reply_in_thread" | "new_email"
mark_as_done?: boolean
mark_as_read?: boolean
}
SendEmailConfigโ
type SendEmailConfig = {
email_template_id?: string
language_code?: string
notify_portal_user_only?: boolean
skip_creating_entities?: boolean
wait_for_confirmation?: boolean
wait_for_journey_submission?: boolean
journey_id?: string
reply_to_sender?: boolean
reply_mode?: "reply_in_thread" | "new_email"
mark_as_done?: boolean
mark_as_read?: boolean
attachments?: Array<{
source_filter?: {
limit?: { ... }
filename_regex?: { ... }
filename?: { ... }
filename_pattern?: { ... }
attribute?: { ... }
relation_tag?: { ... }
tag?: { ... }
document_type?: { ... }
self?: { ... }
}
}>
conditions?: Array<{
_equals?: {
source?: { ... }
value?: { ... }
}
}>
}
SendEmailConditionโ
type SendEmailCondition = {
_equals?: {
source?: string
value?: string
}
}
CreateDocumentActionConfigโ
type CreateDocumentActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "create-document"
config?: {
template_id?: string
filename?: string
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
CreateDocumentActionโ
type CreateDocumentAction = {
type?: "create-document"
config?: {
template_id?: string
filename?: string
}
}
CreateDocumentConfigโ
type CreateDocumentConfig = {
template_id?: string
filename?: string
}
TriggerWorkflowActionConfigโ
type TriggerWorkflowActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-workflow"
config?: {
target_workflow?: string
conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
schema?: { ... }
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: { ... }
step_name?: { ... }
user_ids?: { ... }
}>
filter_with_purposes?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
TriggerWorkflowActionโ
type TriggerWorkflowAction = {
type?: "trigger-workflow"
config?: {
target_workflow?: string
conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
schema?: { ... }
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: { ... }
step_name?: { ... }
user_ids?: { ... }
}>
filter_with_purposes?: boolean
}
}
TriggerWorkflowConfigโ
type TriggerWorkflowConfig = {
target_workflow?: string
conditions?: Array<{
source: string
comparison: "equals" | "any_of" | "not_empty" | "is_empty"
value?: string | number | string[] | number[]
schema?: string
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: string
step_name?: string
user_ids?: number[]
}>
filter_with_purposes?: boolean
}
TriggerWorkflowConditionโ
type TriggerWorkflowCondition = {
source: string
comparison: "equals" | "any_of" | "not_empty" | "is_empty"
value?: string | number | string[] | number[]
schema?: string
}
TriggerShareEntityActionConfigโ
type TriggerShareEntityActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-workflow"
config?: {
operation?: "share" | "unshare"
unshare_all_partners?: boolean
partner_org_ids?: string[]
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
TriggerShareEntityActionโ
type TriggerShareEntityAction = {
type?: "trigger-share-entity"
config?: {
operation?: "share" | "unshare"
unshare_all_partners?: boolean
partner_org_ids?: string[]
}
}
TriggerShareEntityConfigโ
type TriggerShareEntityConfig = {
operation?: "share" | "unshare"
unshare_all_partners?: boolean
partner_org_ids?: string[]
}
AssignUsersToStepโ
type AssignUsersToStep = {
step_id?: string
step_name?: string
user_ids?: number[]
}
CustomActionโ
type CustomAction = {
type?: "custom-action"
config?: {
name?: string
description?: string
app_id?: string
component_id?: string
wait_for_callback?: boolean
}
}
TriggerWebhookActionConfigโ
type TriggerWebhookActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-webhook"
config?: {
event_id?: string
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
TriggerWebhookActionโ
type TriggerWebhookAction = {
type?: "trigger-webhook"
config?: {
event_id?: string
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
}
TriggerWebhookConfigโ
type TriggerWebhookConfig = {
event_id?: string
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
InformERPActionConfigโ
type InformERPActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "inform-erp"
config?: {
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
InformERPActionโ
type InformERPAction = {
type?: "inform-erp"
config?: {
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
}
InformERPConfigโ
type InformERPConfig = {
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
TriggerEventActionConfigโ
type TriggerEventActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-event"
config?: {
event_name: string
event_inputs?: Record<string, unknown>
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
TriggerEventActionโ
type TriggerEventAction = {
type?: "trigger-event"
config?: {
event_name: string
event_inputs?: Record<string, unknown>
}
}
TriggerEventConfigโ
Configuration for triggering an event catalog event
type TriggerEventConfig = {
event_name: string
event_inputs?: Record<string, unknown>
}
FlowExecutionCancelActionConfigโ
type FlowExecutionCancelActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "cancel-flow-execution"
config?: {
selected_reasons?: Array<{
id: { ... }
title: { ... }
}>
extra_description?: string
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
loop_id?: string
}
FlowExecutionCancelActionโ
type FlowExecutionCancelAction = {
type?: "cancel-flow-execution"
config?: {
selected_reasons?: Array<{
id: { ... }
title: { ... }
}>
extra_description?: string
}
}
FlowExecutionCancelConfigโ
Configuration for cancelling a flow execution. The selected reasons are optional; a semi-automated step lets the person running it choose them when the execution starts.
type FlowExecutionCancelConfig = {
selected_reasons?: Array<{
id: string
title: string
}>
extra_description?: string
}
CancellationReasonโ
A reason for cancelling a flow execution
type CancellationReason = {
id: string
title: string
}
ConditionStatementโ
type ConditionStatement = {
id?: string // uuid
source?: {
id?: string
origin?: "trigger" | "action"
originType?: "entity" | "workflow" | "journey_block" | "event"
schema?: string
attribute?: string
attributeType?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "payment" | "relation_payment_method"
attributeRepeatable?: boolean
repeatableItemOp?: boolean
attributeOperation?: "all" | "updated" | "added" | "deleted"
}
operation?: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty" | "entity_exists" | "entity_does_not_exist"
values?: string[]
}
ActionConditionโ
type ActionCondition = {
id?: string
schedule_id?: string
evaluation_order?: "AFTER_SCHEDULE" | "BEFORE_SCHEDULE"
evaluationResult?: boolean
error_output?: {
error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"
error_reason: string
error_info?: {
details?: { ... }
}
}
allow_failure?: boolean
statements?: Array<{
id?: string // uuid
source?: {
id?: { ... }
origin?: { ... }
originType?: { ... }
schema?: { ... }
attribute?: { ... }
attributeType?: { ... }
attributeRepeatable?: { ... }
repeatableItemOp?: { ... }
attributeOperation?: { ... }
}
operation?: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty" | "entity_exists" | "entity_does_not_exist"
values?: string[]
}>
}
ActionScheduleSourceโ
The source of the schedule_at timestamp that will be used to schedule the action
type ActionScheduleSource = {
id: string
origin: "trigger" | "action" | "action_task" | "automation"
schema?: string
attribute?: string
}
ActionScheduleโ
type ActionSchedule = {
id: string
scheduleApiId?: string
numberOfUnits?: number
timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"
timeRelation?: "after" | "before"
source: {
id: string
origin: "trigger" | "action" | "action_task" | "automation"
schema?: string
attribute?: string
}
}
AutomationExecutionIdโ
type AutomationExecutionId = string
AutomationExecutionโ
type AutomationExecution = {
id: string
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
entity_id: string
activity_id?: string
entity_snapshot?: {
_id: string
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
}
org_id: string
flow_id: string
flow_name?: string
created_at?: string // date-time
updated_at?: string // date-time
current_action_id?: string
conditions?: Array<{
id?: string
schedule_id?: string
evaluation_order?: "AFTER_SCHEDULE" | "BEFORE_SCHEDULE"
evaluationResult?: boolean
error_output?: {
error_code: { ... }
error_reason: { ... }
error_info?: { ... }
}
allow_failure?: boolean
statements?: Array<{
id?: { ... }
source?: { ... }
operation?: { ... }
values?: { ... }
}>
}>
schedules?: Array<{
id: string
scheduleApiId?: string
numberOfUnits?: number
timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"
timeRelation?: "after" | "before"
source: {
id: { ... }
origin: { ... }
schema?: { ... }
attribute?: { ... }
}
}>
actions: Array<{
type?: "map-entity"
config?: {
mapping_config?: { ... }
target_schema: { ... }
use_uniqueness_criteria?: { ... }
target_unique?: { ... }
mapping_attributes?: { ... }
relation_attributes?: { ... }
linkback_relation_attribute?: { ... }
linkback_relation_tags?: { ... }
graph_context?: { ... }
}
} | {
type?: "trigger-workflow"
config?: {
target_workflow?: { ... }
conditions?: { ... }
assignees?: { ... }
assign_steps?: { ... }
filter_with_purposes?: { ... }
}
} | {
type?: "trigger-share-entity"
config?: {
operation?: { ... }
unshare_all_partners?: { ... }
partner_org_ids?: { ... }
}
} | {
type?: "trigger-webhook"
config?: {
event_id?: { ... }
entity_sources?: { ... }
target_webhook_id?: { ... }
sync?: { ... }
}
} | {
type?: "inform-erp"
config?: {
entity_sources?: { ... }
target_webhook_id?: { ... }
sync?: { ... }
}
} | {
type?: "trigger-event"
config?: {
event_name: { ... }
event_inputs?: { ... }
// ...
}
AutomationLoopStateโ
type AutomationLoopState = {
current_index: number
total: number
}
WorkflowExecutionContextโ
type WorkflowExecutionContext = {
workflow_exec_id: string
workflow_exec_task_id?: string
workflow_role: "trigger_workflow" | "run_task_automation"
_execution_chain?: {
parent_execution_id?: string
parent_task_id?: string
depth?: number
}
_automation_chain?: string[]
entity_contexts?: Array<{
entity_id?: string
entity_schema?: string
is_primary?: boolean
}>
resolved_input?: {
with_relations: boolean
also_pass: Array<{
entity_id: { ... }
entity_schema?: { ... }
}>
}
trigger_user_id?: string
run_by?: {
user_id: string
org_id?: string
}
}
WorkflowWaitContextโ
Correlation stamped when the triggering submission entity carried workflow wait claims from a journey link. Consumed by svc-workflows to resume a task waiting on this journey submission.
type WorkflowWaitContext = {
workflow_execution_id: string
workflow_task_id: string
source?: string
}
ExecutionChainโ
[Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers.
type ExecutionChain = {
parent_execution_id?: string
parent_task_id?: string
depth?: number
}
TriggerEventManualโ
type TriggerEventManual = {
type?: "manual"
org_id: string
entity_id: string
caller?: {
EpilotAuth?: {
claims?: { ... }
userId?: { ... }
organizationId?: { ... }
token?: { ... }
}
}
}
TriggerEventFlowAutomationTaskโ
type TriggerEventFlowAutomationTask = {
type?: "flow_automation_task"
org_id: string
entity_id: string
flow_execution_id: string
flow_automation_task_id: string // UUID
caller?: {
EpilotAuth?: {
claims?: { ... }
userId?: { ... }
organizationId?: { ... }
token?: { ... }
}
}
}
TriggerEventEntityActivityโ
type TriggerEventEntityActivity = {
type?: "entity_activity"
org_id: string
activity_id: string
activity_type: string
entity_id?: string
}
TriggerEventMessagingโ
type TriggerEventMessaging = {
type?: "new_email_thread" | "sent_email"
org_id: string
thread_id: string
message_id: string
entity_id: string
}
TriggerEventEntityOperationโ
type TriggerEventEntityOperation = {
type?: "entity_operation"
entity_id: string
org_id: string
activity_id: string
operation_type: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity" | "relationsAdded" | "relationsRemoved" | "relationsSoftDeleted" | "relationsRestored" | "relationsDeleted"
}
TriggerEventEventCatalogโ
Set on executions started by an Event Catalog event (see EventCatalogTrigger). The full event payload is not stored inline (it may be up to 256 KB) but by reference in payload_ref; automation workers hydrate it before every action.
type TriggerEventEventCatalog = {
type: "event_catalog"
org_id: string
entity_id: string
entity_node_id: string
event_id: string
event_name: string
event_version: string
published_version?: string
event_time?: string // date-time
trigger_source_type?: string
trigger_source?: string
payload_ref?: {
bucket: string
key: string
}
}
TriggerEventPayloadRefโ
S3 reference to the stored trigger event payload (_downgrades stripped, downgraded to the pinned version)
type TriggerEventPayloadRef = {
bucket: string
key: string
}
ApiCallerContextโ
type ApiCallerContext = {
EpilotAuth?: {
claims?: {
userId?: { ... }
sub?: { ... }
email?: { ... }
cognito:username?: { ... }
custom:ivy_user_id?: { ... }
}
userId?: string
organizationId?: string
token?: string
}
}
ExecutionStatusโ
type ExecutionStatus = "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
GetExecutionsRespโ
type GetExecutionsResp = {
total: number
results: Array<{
id: string
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
entity_id: string
activity_id?: string
entity_snapshot?: {
_id: { ... }
_title: { ... }
_org: { ... }
_schema: { ... }
_tags?: { ... }
_created_at: { ... }
_updated_at: { ... }
}
org_id: string
flow_id: string
flow_name?: string
created_at?: string // date-time
updated_at?: string // date-time
current_action_id?: string
conditions?: Array<{
id?: { ... }
schedule_id?: { ... }
evaluation_order?: { ... }
evaluationResult?: { ... }
error_output?: { ... }
allow_failure?: { ... }
statements?: { ... }
}>
schedules?: Array<{
id: { ... }
scheduleApiId?: { ... }
numberOfUnits?: { ... }
timePeriod?: { ... }
timeRelation?: { ... }
source: { ... }
}>
actions: Array<{
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
id?: { ... }
flow_action_id?: { ... }
name?: { ... }
type?: { ... }
config?: { ... }
allow_failure?: { ... }
created_automatically?: { ... }
is_bulk_action?: { ... }
reason?: { ... }
condition_id?: { ... }
schedule_id?: { ... }
loop_id?: { ... }
execution_status?: { ... }
started_at?: { ... }
updated_at?: { ... }
outputs?: { ... }
error_output?: { ... }
retry_strategy?: { ... }
iterations?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
// ...
}
SearchExecutionsReqโ
type SearchExecutionsReq = {
entity_id: string
include_flows?: boolean
size?: number
cursor?: string
}
SearchExecutionsRespโ
type SearchExecutionsResp = {
total: number
results: Array<{
id: string
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
entity_id: string
activity_id?: string
entity_snapshot?: {
_id: { ... }
_title: { ... }
_org: { ... }
_schema: { ... }
_tags?: { ... }
_created_at: { ... }
_updated_at: { ... }
}
org_id: string
flow_id: string
flow_name?: string
created_at?: string // date-time
updated_at?: string // date-time
current_action_id?: string
conditions?: Array<{
id?: { ... }
schedule_id?: { ... }
evaluation_order?: { ... }
evaluationResult?: { ... }
error_output?: { ... }
allow_failure?: { ... }
statements?: { ... }
}>
schedules?: Array<{
id: { ... }
scheduleApiId?: { ... }
numberOfUnits?: { ... }
timePeriod?: { ... }
timeRelation?: { ... }
source: { ... }
}>
actions: Array<{
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
id?: { ... }
flow_action_id?: { ... }
name?: { ... }
type?: { ... }
config?: { ... }
allow_failure?: { ... }
created_automatically?: { ... }
is_bulk_action?: { ... }
reason?: { ... }
condition_id?: { ... }
schedule_id?: { ... }
loop_id?: { ... }
execution_status?: { ... }
started_at?: { ... }
updated_at?: { ... }
outputs?: { ... }
error_output?: { ... }
retry_strategy?: { ... }
iterations?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
// ...
}
StartExecutionRequestโ
type StartExecutionRequest = {
entity_id: string
flow_id: string
workflow_context?: {
workflow_exec_id: string
workflow_exec_task_id?: string
workflow_role: "trigger_workflow" | "run_task_automation"
_execution_chain?: {
parent_execution_id?: { ... }
parent_task_id?: { ... }
depth?: { ... }
}
_automation_chain?: string[]
entity_contexts?: Array<{
entity_id?: { ... }
entity_schema?: { ... }
is_primary?: { ... }
}>
resolved_input?: {
with_relations: { ... }
also_pass: { ... }
}
trigger_user_id?: string
run_by?: {
user_id: { ... }
org_id?: { ... }
}
}
flow_execution_id?: string
flow_automation_task_id?: string
action_inputs?: {
cancel-flow-execution?: {
selected_reasons: { ... }
extra_description?: { ... }
}
send-email?: {
subject?: { ... }
body?: { ... }
attachment_entity_ids?: { ... }
}
}
}
ActionInputsโ
Internal. Run-time inputs for the actions of this execution, keyed by action type. An action reads the entry for its own type and treats it as replacing the matching configured values; an action whose type has no entry runs entirely from its configuration.
Only the workflows service may set this fi
type ActionInputs = {
cancel-flow-execution?: {
selected_reasons: Array<{
id: { ... }
title: { ... }
}>
extra_description?: string
}
send-email?: {
subject?: string
body?: string
attachment_entity_ids?: string[]
}
}
SendEmailInputsโ
Adjustments a person made to an email before sending it, replacing the rendered values the template produced. The template itself is untouched.
attachment_entity_ids is a request, not an instruction: the worker keeps only the ids that are genuinely files of the entity this execution runs on, so a
type SendEmailInputs = {
subject?: string
body?: string
attachment_entity_ids?: string[]
}
FlowExecutionCancelInputsโ
The cancellation reasons a person chose when running a semi-automated cancel step, replacing selected_reasons from the action's configuration.
type FlowExecutionCancelInputs = {
selected_reasons: Array<{
id: string
title: string
}>
extra_description?: string
}
PatchBulkJobRequestโ
type PatchBulkJobRequest = {
action: "APPROVE" | "CANCEL" | "RESTART"
task_token?: string
}
BulkTriggerRequestโ
type BulkTriggerRequest = {
flow_id: string
entities_refs: Array<{
entity_id: string
entity_schema: string
}>
trigger_context?: Record<string, string>
} | {
flow_id: string
entities_query: string
trigger_context?: Record<string, string>
} | {
flow_id: string
entities_filter: Array<{
term?: Record<string, string | number | boolean>
terms?: Record<string, string | number | boolean[]>
ids?: {
values?: { ... }
}
range?: Record<string, {
gt?: { ... }
gte?: { ... }
lt?: { ... }
lte?: { ... }
format?: { ... }
relation?: { ... }
time_zone?: { ... }
}>
exists?: {
field: { ... }
}
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
trigger_context?: Record<string, string>
}
EntityRefโ
type EntityRef = {
entity_id: string
entity_schema: string
}
BulkTriggerJobโ
type BulkTriggerJob = {
job_id: string
org_id: string
flow_id: string
status: "approval" | "querying_entities" | "entities_loaded" | "executing" | "monitoring" | "send_report" | "finished" | "failed" | "cancelled"
created_by: string
created_at: string // date-time
updated_at: string // date-time
approved_at?: string // date-time
trigger_context?: Record<string, string>
task_token?: string
report_file_entity_id?: string
last_error?: string
restart_count?: number
restarted_at?: string // date-time
entity_query?: {
type: "refs" | "query" | "filter"
data: Array<{
entity_id: { ... }
entity_schema: { ... }
}> | string | Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
exists?: { ... }
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
}
pagination_state?: {
page_size?: number
pages_processed?: number
total_processed?: number
stable_query_id?: string
search_after?: string | number[]
has_more?: boolean
}
execution_summary?: Array<{
entity_id: string
entity_schema?: string
execution_id?: string
execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
timestamp?: string // date-time
error?: string
}>
execution_stats?: {
total: number
pending?: number
starting?: number
in_progress?: number
success?: number
failed?: number
cancelled?: number
skipped?: number
paused?: number
scheduled?: number
hot?: number
}
execution_summary_truncated?: boolean
}
ExecutionStatsโ
Number of execution items of a bulk trigger job per execution status. Always complete.
type ExecutionStats = {
total: number
pending?: number
starting?: number
in_progress?: number
success?: number
failed?: number
cancelled?: number
skipped?: number
paused?: number
scheduled?: number
hot?: number
}
ExecItemโ
Execution item for bulk trigger automation. It maps each entity to its automation execution id & status
type ExecItem = {
entity_id: string
entity_schema?: string
execution_id?: string
execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
timestamp?: string // date-time
error?: string
}
JobIdโ
Job ID for tracking the status of bulk trigger automation executions
type JobId = string
EntityIdโ
type EntityId = string
ActivityIdโ
type ActivityId = string
OrganizationIdโ
type OrganizationId = string
TriggerContextโ
Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.
type TriggerContext = Record<string, string>
AutomationTriggerโ
type AutomationTrigger = {
id?: string // uuid
}
FlowsTriggerโ
type FlowsTrigger = {
id?: string // uuid
type: "flows_trigger"
configuration?: {
journey_id?: string // uuid
}
}
JourneySubmitTriggerโ
type JourneySubmitTrigger = {
id?: string // uuid
type: "journey_submission"
configuration: {
source_id: string // uuid
}
}
FrontendSubmitTriggerโ
type FrontendSubmitTrigger = {
id?: string // uuid
type: "frontend_submission"
configuration: {
source_id?: string
}
}
ApiSubmissionTriggerโ
type ApiSubmissionTrigger = {
id?: string // uuid
type: "api_submission"
configuration: {
source_id?: string
}
}
NewEmailThreadTriggerโ
Starts the flow when an email starts a new thread. The thread is the execution's entity.
For outbound threads, an email that failed to send or a bulk email does not start the flow, and neither does an email whose automation chain already contains the flow. A flow that sends emails itself (a send-em
type NewEmailThreadTrigger = {
id?: string // uuid
type: "new_email_thread"
configuration: {
shared_inbox_ids?: string[]
direction: "INBOUND" | "OUTBOUND" | "BOTH"
}
}
ReceivedEmailTriggerโ
type ReceivedEmailTrigger = {
id?: string // uuid
type: "received_email"
configuration: {
message_type?: "RECEIVED"
}
}
SentEmailTriggerโ
Starts the flow for every email sent from epilot: emails and replies sent from the inbox,
including replies sent from a draft, and emails sent by automations or Flows, except sends
that skip creating entities. The sent email is the execution's entity. The outgoing
counterpart of received_email.
O
type SentEmailTrigger = {
id?: string // uuid
type: "sent_email"
configuration: object
}
EntityOperationTriggerโ
- If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.
- The conditions on a filter follows the event bridge patterns -
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html| Comparison | Example
type EntityOperationTrigger = {
id?: string // uuid
type: "entity_operation"
configuration: {
schema?: string
operations?: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity" | "relationsAdded" | "relationsRemoved" | "relationsSoftDeleted" | "relationsRestored" | "relationsDeleted"[]
include_activities?: string[]
exclude_activities?: string[]
filter_config?: {
operation?: { ... }
activity?: { ... }
}
ecp_config?: {
origin?: { ... }
portal_id?: { ... }
file_config?: { ... }
}
}
}
ActivityTriggerโ
type ActivityTrigger = {
id?: string // uuid
type: "activity"
configuration: {
schema?: string
types?: "CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal" | string[]
}
}
EntityOperationโ
type EntityOperation = "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity" | "relationsAdded" | "relationsRemoved" | "relationsSoftDeleted" | "relationsRestored" | "relationsDeleted"
EntitySearchFilterโ
A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.
type EntitySearchFilter = Array<{
term?: Record<string, string | number | boolean>
terms?: Record<string, string | number | boolean[]>
ids?: {
values?: string[]
}
range?: Record<string, {
gt?: string | number | boolean
gte?: string | number | boolean
lt?: string | number | boolean
lte?: string | number | boolean
format?: string
relation?: "INTERSECTS" | "CONTAINS" | "WITHIN"
time_zone?: string
}>
exists?: {
field: string
}
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
EntitySearchFilterValueโ
A filter field value.
type EntitySearchFilterValue = string | number | boolean
EntityManualTriggerโ
type EntityManualTrigger = {
id?: string // uuid
type: "entity_manual"
configuration: {
schema?: string
}
}
EventCatalogTriggerโ
Starts the flow when an Event Catalog event is published for the organization. The execution runs in the context of one entity from the event's entity graph (entity_node_id), and the event payload is available to conditions and actions as the event variable context.
type EventCatalogTrigger = {
id?: string // uuid
type: "event_catalog"
configuration: {
event_name: string
event_version: string
entity_node_id: string
entity_schema: string
ignore_automation_triggered?: boolean
}
}
TriggerConditionโ
type TriggerCondition = {
source: string
comparison: "equals" | "any_of" | "not_empty" | "is_empty"
value?: string | number | string[] | number[]
}
Comparisonโ
type Comparison = "equals" | "any_of" | "not_empty" | "is_empty"
FilterConditionOnEventโ
type FilterConditionOnEvent = {
$or?: { ... }[]
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>
EqualsIgnoreCaseConditionโ
type EqualsIgnoreCaseCondition = {
equals-ignore-case?: string
}
AnythingButConditionโ
type AnythingButCondition = {
anything-but?: string[]
}
NumericConditionโ
type NumericCondition = {
numeric?: string | number[]
}
ExistsConditionโ
type ExistsCondition = {
exists?: boolean
}
PrefixConditionโ
type PrefixCondition = {
prefix?: string
}
SuffixConditionโ
type SuffixCondition = {
suffix?: string
}
WildcardConditionโ
type WildcardCondition = {
wildcard?: string
}
OrConditionโ
type OrCondition = {
$or?: Array<{ ... } | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>>
}
DiffAddedโ
type DiffAdded = {
$or?: { ... }[]
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>
DiffUpdatedโ
type DiffUpdated = {
$or?: { ... }[]
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>
DiffDeletedโ
type DiffDeleted = {
$or?: { ... }[]
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>
OrConditionForDiffโ
type OrConditionForDiff = {
$or?: unknown | unknown | unknown[]
}
EntityItemSnapshotโ
type EntityItemSnapshot = {
_id: string
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
}
RetryReqโ
type RetryReq = {
condition_id?: string
retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"
}
ResumeTokenโ
A unique token to resume a paused automation execution
type ResumeToken = string
ResumeReqโ
type ResumeReq = {
resume_token: string
}
ResumeRespโ
type ResumeResp = {
execution: {
id: string
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
entity_id: string
activity_id?: string
entity_snapshot?: {
_id: { ... }
_title: { ... }
_org: { ... }
_schema: { ... }
_tags?: { ... }
_created_at: { ... }
_updated_at: { ... }
}
org_id: string
flow_id: string
flow_name?: string
created_at?: string // date-time
updated_at?: string // date-time
current_action_id?: string
conditions?: Array<{
id?: { ... }
schedule_id?: { ... }
evaluation_order?: { ... }
evaluationResult?: { ... }
error_output?: { ... }
allow_failure?: { ... }
statements?: { ... }
}>
schedules?: Array<{
id: { ... }
scheduleApiId?: { ... }
numberOfUnits?: { ... }
timePeriod?: { ... }
timeRelation?: { ... }
source: { ... }
}>
actions: Array<{
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
id?: { ... }
flow_action_id?: { ... }
name?: { ... }
type?: { ... }
config?: { ... }
allow_failure?: { ... }
created_automatically?: { ... }
is_bulk_action?: { ... }
reason?: { ... }
condition_id?: { ... }
schedule_id?: { ... }
loop_id?: { ... }
execution_status?: { ... }
started_at?: { ... }
updated_at?: { ... }
outputs?: { ... }
error_output?: { ... }
retry_strategy?: { ... }
iterations?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
// ...
}
ErrorObjectโ
type ErrorObject = {
status?: number
error?: string
}