---
title: "searchFlowTemplates"
method: POST
path: "/v2/flows/templates:search"
tags: ["Flows V2"]
---

# searchFlowTemplates

`POST /v2/flows/templates:search`

Search for flow templates by name, trigger type, enabled status, and more.

## Request body

- SearchFlowTemplates
  - `name` string
  - `definition_id` string
  - `trigger_type` 'journey_submission' | 'manual' | 'automation'
  - `enabled` boolean
  - `from` integer
  - `size` integer
  - `sort_by` 'created_at' | 'updated_at' | 'name' | 'enabled' | 'id'
  - `sort_order` 'asc' | 'desc'

## Response `200`

Success - flow templates loaded with success. Empty array if customer has no flows defined.

- object
  - `hits` number
  - `results` FlowTemplate[]
    - `id` string — Unique identifier for the flow template, generated by the system.
    - `org_id` string — Organization identifier that owns this flow template.
    - `name` string, required — Display name for the workflow, shown to users in the UI.
    - `description` string — Optional detailed description of the workflow's purpose and behavior.
    - `trigger` union
      - ManualTrigger
        - `id` string
        - `type` 'manual', required
        - `entity_schema` string
      - AutomationTrigger
        - `id` string
        - `type` 'automation', required
        - `automation_id` string — Id of the automation config that triggers this workflow
        - `input_entity` 'thread' | 'first_email' | 'last_email' — For email thread triggers, specifies which entity from the triggered email thread to use as the primary input for automation and decision tasks. Defaults to `thread` when not specified.
        - `trigger_config` object[] — Transient field. Trigger configurations for creating or updating the trigger automation flow. Each item follows the automation API trigger schema. Processed by the backend during create/update and stripped before storage.
          - `type` string, required — The trigger type (e.g. entity_operation, activity)
          - `configuration` object — Trigger-specific configuration
      - JourneySubmissionTrigger
        - `id` string
        - `type` 'journey_submission', required
        - `journey_id` string, required — ID of the journey that will trigger this flow
        - `journey_name` string — Name of the journey that will trigger this flow
        - `automation_id` string
      - JourneyAutomationTrigger
        - `id` string
        - `type` 'journey_automation', required
        - `entity_schema` string — Schema of the main entity where flow will be triggered. The entity will be picked from automation context.
    - `enabled` boolean — Whether the workflow is enabled or not
    - `version` 'v1' | 'v2' | 'v3' — Version of the workflow schema. - `v1` – *Deprecated*. The initial version of workflows with limited structure and automation capabilities. - `v2` – Linear workflows. Supports sequential task execution with basic automation triggers. - `v3` – Advanced workflows. Adds support for branching logic (conditions), parallel paths, and enhanced automation features such as dynamic triggers and flow control.
    - `created_at` string — ISO String Date & Time
    - `updated_at` string — ISO String Date & Time
    - `due_date` string
    - `due_date_config` DueDateConfig — Set due date for the task based on a dynamic condition
      - `duration` number, required
      - `unit` 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'years', required
      - `type` 'WORKFLOW_STARTED' | 'TASK_FINISHED' | 'PHASE_FINISHED' | 'A_PRECEDING_TASK_COMPLETED' | 'ALL_PRECEDING_TASKS_COMPLETED', required
      - `task_id` string
      - `phase_id` string
    - `assigned_to` union[]
      - union
        - string
        - VariableAssignment — Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.
          - `variable` string, required — The variable expression, e.g., "{{entity.owner}}"
          - `value` string[] — The resolved values after variable evaluation (populated during execution)
    - `available_in_ecp` boolean — Indicates whether this workflow is available for End Customer Portal or not. By default it's not.
    - `additional_triggers` Trigger[] — Additional trigger configurations that can also start this flow. Useful for flows that should be startable via multiple methods (e.g., both automation AND manual).
      - union
        - ManualTrigger
          - `id` string
          - `type` 'manual', required
          - `entity_schema` string
        - AutomationTrigger
          - `id` string
          - `type` 'automation', required
          - `automation_id` string — Id of the automation config that triggers this workflow
          - `input_entity` 'thread' | 'first_email' | 'last_email' — For email thread triggers, specifies which entity from the triggered email thread to use as the primary input for automation and decision tasks. Defaults to `thread` when not specified.
          - `trigger_config` object[] — Transient field. Trigger configurations for creating or updating the trigger automation flow. Each item follows the automation API trigger schema. Processed by the backend during create/update and stripped before storage.
            - `type` string, required — The trigger type (e.g. entity_operation, activity)
            - `configuration` object — Trigger-specific configuration
        - JourneySubmissionTrigger
          - `id` string
          - `type` 'journey_submission', required
          - `journey_id` string, required — ID of the journey that will trigger this flow
          - `journey_name` string — Name of the journey that will trigger this flow
          - `automation_id` string
        - JourneyAutomationTrigger
          - `id` string
          - `type` 'journey_automation', required
          - `entity_schema` string — Schema of the main entity where flow will be triggered. The entity will be picked from automation context.
    - `phases` Phase[]
      - `id` string, required
      - `name` string, required
      - `due_date` string
      - `due_date_config` DueDateConfig — Set due date for the task based on a dynamic condition
        - `duration` number, required
        - `unit` 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'years', required
        - `type` 'WORKFLOW_STARTED' | 'TASK_FINISHED' | 'PHASE_FINISHED' | 'A_PRECEDING_TASK_COMPLETED' | 'ALL_PRECEDING_TASKS_COMPLETED', required
        - `task_id` string
        - `phase_id` string
      - `assigned_to` union[]
        - union
          - string
          - VariableAssignment — Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.
            - `variable` string, required — The variable expression, e.g., "{{entity.owner}}"
            - `value` string[] — The resolved values after variable evaluation (populated during execution)
      - `taxonomies` string[] — Taxonomy ids that are associated with this workflow and used for filtering
    - `tasks` Task[], required
      - union
        - ManualTask
          - `id` string, required
          - `name` string, required
          - `description` StepDescription — Longer information regarding Task
            - `enabled` boolean
            - `value` string
          - `journey` StepJourney
            - `id` string
            - `journeyId` string
            - `name` string
            - `complete_task_automatically` boolean — If true, the task be auto completed when the journey is completed. By default it is true.
          - `due_date` string
          - `due_date_config` DueDateConfig — Set due date for the task based on a dynamic condition
            - `duration` number, required
            - `unit` 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'years', required
            - `type` 'WORKFLOW_STARTED' | 'TASK_FINISHED' | 'PHASE_FINISHED' | 'A_PRECEDING_TASK_COMPLETED' | 'ALL_PRECEDING_TASKS_COMPLETED', required
            - `task_id` string
            - `phase_id` string
          - `requirements` EnableRequirement[] — requirements that need to be fulfilled in order to enable the task while flow instances are running
            - `task_id` string — The id of the task that it points to
            - `phase_id` string — The id of the phase that it points to
            - `when` 'TASK_FINISHED' | 'PHASE_FINISHED', required
          - `assigned_to` union[]
            - union
              - …
          - `ecp` ECPDetails — Details regarding ECP for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
            - `journey` StepJourney
              - …
          - `installer` ECPDetails — Details regarding ECP for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
            - `journey` StepJourney
              - …
          - `partner` PartnerDetails — Details regarding partner for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
          - `taxonomies` string[] — Taxonomy ids that are associated with this workflow and used for filtering
          - `phase_id` string
          - `task_type` 'MANUAL' | 'AUTOMATION' | 'DECISION' | 'AI_AGENT', required
        - AutomationTask
          - `id` string, required
          - `name` string, required
          - `description` StepDescription — Longer information regarding Task
            - `enabled` boolean
            - `value` string
          - `journey` StepJourney
            - `id` string
            - `journeyId` string
            - `name` string
            - `complete_task_automatically` boolean — If true, the task be auto completed when the journey is completed. By default it is true.
          - `due_date` string
          - `due_date_config` DueDateConfig — Set due date for the task based on a dynamic condition
            - `duration` number, required
            - `unit` 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'years', required
            - `type` 'WORKFLOW_STARTED' | 'TASK_FINISHED' | 'PHASE_FINISHED' | 'A_PRECEDING_TASK_COMPLETED' | 'ALL_PRECEDING_TASKS_COMPLETED', required
            - `task_id` string
            - `phase_id` string
          - `requirements` EnableRequirement[] — requirements that need to be fulfilled in order to enable the task while flow instances are running
            - `task_id` string — The id of the task that it points to
            - `phase_id` string — The id of the phase that it points to
            - `when` 'TASK_FINISHED' | 'PHASE_FINISHED', required
          - `assigned_to` union[]
            - union
              - …
          - `ecp` ECPDetails — Details regarding ECP for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
            - `journey` StepJourney
              - …
          - `installer` ECPDetails — Details regarding ECP for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
            - `journey` StepJourney
              - …
          - `partner` PartnerDetails — Details regarding partner for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
          - `taxonomies` string[] — Taxonomy ids that are associated with this workflow and used for filtering
          - `phase_id` string
          - `task_type` 'MANUAL' | 'AUTOMATION' | 'DECISION' | 'AI_AGENT', required
          - `automation_config` AutomationConfig, required — Configuration for automation execution to run
            - `flow_id` string — Id of the configured automation to run
            - `action_config` object — Transient field. The full automation action configuration following the automation API action schema. Processed by the backend during create/update and stripped before storage. When present without a flow_id, a new automation flow is created. When present with a flow_id, the existing automation flow is updated.
              - …
            - `duplicated_flow_id` string — Transient field. When present, the backend clones the automation flow referenced by this ID and assigns the new flow_id to the task. Used when duplicating an automation task to give it an independent automation. Stripped before storage.
            - `input_context` AutomationInputContext — Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
              - …
          - `trigger_mode` 'manual' | 'automatic'
          - `schedule` union
            - ImmediateSchedule
              - …
            - DelayedSchedule
              - …
            - RelativeSchedule
              - …
          - `created_automatically` boolean — Indicates whether this task was created automatically by journeys or manually by an user
        - DecisionTask
          - `id` string, required
          - `name` string, required
          - `description` StepDescription — Longer information regarding Task
            - `enabled` boolean
            - `value` string
          - `journey` StepJourney
            - `id` string
            - `journeyId` string
            - `name` string
            - `complete_task_automatically` boolean — If true, the task be auto completed when the journey is completed. By default it is true.
          - `due_date` string
          - `due_date_config` DueDateConfig — Set due date for the task based on a dynamic condition
            - `duration` number, required
            - `unit` 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'years', required
            - `type` 'WORKFLOW_STARTED' | 'TASK_FINISHED' | 'PHASE_FINISHED' | 'A_PRECEDING_TASK_COMPLETED' | 'ALL_PRECEDING_TASKS_COMPLETED', required
            - `task_id` string
            - `phase_id` string
          - `requirements` EnableRequirement[] — requirements that need to be fulfilled in order to enable the task while flow instances are running
            - `task_id` string — The id of the task that it points to
            - `phase_id` string — The id of the phase that it points to
            - `when` 'TASK_FINISHED' | 'PHASE_FINISHED', required
          - `assigned_to` union[]
            - union
              - …
          - `ecp` ECPDetails — Details regarding ECP for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
            - `journey` StepJourney
              - …
          - `installer` ECPDetails — Details regarding ECP for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
            - `journey` StepJourney
              - …
          - `partner` PartnerDetails — Details regarding partner for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
          - `taxonomies` string[] — Taxonomy ids that are associated with this workflow and used for filtering
          - `phase_id` string
          - `task_type` 'MANUAL' | 'AUTOMATION' | 'DECISION' | 'AI_AGENT', required
          - `trigger_mode` 'manual' | 'automatic', required
          - `conditions` Condition[], required
            - `id` string, required
            - `branch_name` string, required — The name of the branch
            - `logical_operator` 'AND' | 'OR', required
            - `statements` Statement[], nullable, required
              - …
          - `allow_parallel_execution` boolean — When true, all branches with met conditions execute in parallel. When false, only the first branch with a met condition is executed. Defaults to true for backwards compatibility.
          - `schedule` union
            - DelayedSchedule
              - …
            - RelativeSchedule
              - …
          - `loop_config` object
            - `loop_branch_id` string, required — The id of the branch that will be looped
            - `exit_branch_id` string, required — The id of the branch that will be used to exit the loop
            - `max_iterations` integer, required — Maximum number of iterations for the loop branch
        - AiAgentTask
          - `id` string, required
          - `name` string, required
          - `description` StepDescription — Longer information regarding Task
            - `enabled` boolean
            - `value` string
          - `journey` StepJourney
            - `id` string
            - `journeyId` string
            - `name` string
            - `complete_task_automatically` boolean — If true, the task be auto completed when the journey is completed. By default it is true.
          - `due_date` string
          - `due_date_config` DueDateConfig — Set due date for the task based on a dynamic condition
            - `duration` number, required
            - `unit` 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'years', required
            - `type` 'WORKFLOW_STARTED' | 'TASK_FINISHED' | 'PHASE_FINISHED' | 'A_PRECEDING_TASK_COMPLETED' | 'ALL_PRECEDING_TASKS_COMPLETED', required
            - `task_id` string
            - `phase_id` string
          - `requirements` EnableRequirement[] — requirements that need to be fulfilled in order to enable the task while flow instances are running
            - `task_id` string — The id of the task that it points to
            - `phase_id` string — The id of the phase that it points to
            - `when` 'TASK_FINISHED' | 'PHASE_FINISHED', required
          - `assigned_to` union[]
            - union
              - …
          - `ecp` ECPDetails — Details regarding ECP for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
            - `journey` StepJourney
              - …
          - `installer` ECPDetails — Details regarding ECP for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
            - `journey` StepJourney
              - …
          - `partner` PartnerDetails — Details regarding partner for the workflow step
            - `enabled` boolean
            - `label` string
            - `description` string
          - `taxonomies` string[] — Taxonomy ids that are associated with this workflow and used for filtering
          - `phase_id` string
          - `task_type` 'MANUAL' | 'AUTOMATION' | 'DECISION' | 'AI_AGENT', required
          - `agent_config` AgentConfig — Configuration for AI Agent to run
            - `agent_id` string, required — Id of the configured AI Agent to run
    - `edges` Edge[], required
      - `id` string, required
      - `from_id` string, required
      - `to_id` string, nullable
      - `condition_id` string
      - `none_met` boolean — Indicates a default case for a decision task. Only decision task edges can have this field and the flow advances using this edge if no conditions are met.
    - `closing_reasons` ClosingReason[]
      - `id` string
      - `title` string
      - `status` 'ACTIVE' | 'INACTIVE'
      - `lastUpdateTime` string
      - `creationTime` string
    - `entity_sync` EntitySync[]
      - `trigger` object, required — Trigger configuration that determines when entity sync occurs. Contains the event type and optional filter to target specific tasks/phases.
        - `event` 'FlowStarted' | 'FlowCompleted' | 'FlowCancelled' | 'FlowReopened' | 'FlowDeleted' | 'FlowAssigned' | 'FlowDueDateChanged' | 'FlowContextsChanged' | 'TaskUpdated' | 'CurrTaskChanged' | 'TaskCompleted' | 'TaskSkipped' | 'TaskMarkedInProgress' | 'TaskMarkedOnHold' | 'PhaseUpdated' | 'PhaseCompleted' | 'PhaseSkipped' | 'PhaseMarkedInProgress', required — Event or condition that triggers the entity sync. Direct triggers match EventBridge event names (PascalCase). Status triggers are deduced from event + entity status combination.
        - `filter` object — Optional filter to target specific tasks or phases. Specify either task_template_id OR phase_template_id (mutually exclusive). If omitted, trigger applies to all tasks/phases.
          - `task_template_id` string — Target a specific task by its template ID (stable across executions)
          - `phase_template_id` string — Target a specific phase by its template ID (stable across executions)
      - `value` object, required
        - `source` 'workflow_name' | 'workflow_status' | 'workflow_assigned_to' | 'task_name' | 'task_status' | 'task_assigned_to' | 'phase_name' | 'phase_status' | 'phase_assigned_to' | 'custom_value', required
        - `value` string
      - `target` object, required
        - `entitySchema` string, required
        - `entityAttribute` string, required
    - `taxonomies` string[] — Taxonomy ids that are associated with this workflow and used for filtering
    - `singleClosingReasonSelection` boolean — Whether only a single closing reason can be selected
    - `_manifest` string[] — The manifest IDs associated with this workflow
    - `linear` boolean — When true, this is a linear flow: task enablement is computed at runtime from the graph — a task is enabled only when all of its direct predecessor tasks in its branch are done. This fully overrides any explicit per-task requirements.
    - `limit_warnings` FlowLimitWarning[] — Non-blocking warnings for configuration limits the flow exceeds. Returned on read (get-flow) and on create/update responses. Size/count limits are soft: a flow exceeding them is still accepted and stored, and the violations are reported here so the UI can surface an informational banner. The flow is still fully editable and usable.
      - `i18nKey` string, required — i18n key identifying the exceeded limit (e.g. errors.task_max_incoming_edges).
      - `message` string, required — Human-readable description of the exceeded limit.
      - `max` number, required — The configured maximum for this limit.
      - `current` number — The actual value the flow currently has for this limit (e.g. the actual number of incoming connections).
      - `node_id` string — ID of the task/node the limit applies to, when applicable.
      - `task_name` string
      - `branch_name` string
      - `param_name` string — Name of the AI-agent parameter the limit applies to, when applicable.
      - `path` unknown[], required — JSON path within the flow to the offending value.
        - unknown
    - `keep_task_automations_in_sync` boolean — Persisted preference for how the flow's task automations relate to the flow's `enabled` state. When `true`, task automations always mirror the flow: their enabled state is re-synced on every update and new task automations are created with the flow's current enabled state. When `false`, task automations are managed independently: updates never change their enabled state and new task automations are always created enabled, so a flow that is built or edited while disabled does not accumulate automations that stay off after the flow is re-enabled. When unset, legacy behavior applies: new task automations inherit the flow's enabled state and updates leave existing ones untouched. Safety: on updates that do NOT change `enabled`, the in-sync mode never re-enables automations that were disabled by the system (e.g. infinite-loop protection) — only a deliberate `enabled` flip on the flow re-arms those.

## Other responses

- `500` — Other errors

---

[API](https://skmtc.net/epilot/apis/workflows-definitions.md) · [All operations](https://skmtc.net/epilot/apis/workflows-definitions/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/epilot/workflows-definitions/versions/74e4de17e9b5/schema)
