Skip to main content

Overview

The Flows API allows you to create, update, retrieve, and delete automation flows. Flows are the core building blocks of Activepieces automations, containing triggers and actions that define your workflow logic.

Base Endpoint

Create Flow

Create a new flow in your project.

Request Body

string
required
Name of the flow that will be displayed in the UI
string
required
ID of the project where the flow will be created
string
ID of the folder to place the flow in. If provided, folderName is ignored
string
Name of the folder to create or use. Only used if folderId is not provided
string
ID of a template to use as a starting point for the flow
object
Custom metadata to attach to the flow. Useful for storing additional information

Response

string
Unique identifier for the flow
string
ID of the project containing the flow
string
External identifier for the flow (used for git sync)
string
ID of the user who created the flow
string
ID of the folder containing the flow
enum
Current status of the flow: ENABLED or DISABLED
string
ID of the currently published version of the flow
object
The flow version object containing triggers and actions
string
ISO 8601 timestamp of when the flow was created
string
ISO 8601 timestamp of when the flow was last updated
Response Example

List Flows

Retrieve a paginated list of flows in a project.

Query Parameters

string
required
Filter flows by project ID
string
Filter flows by folder ID
array
Filter by flow status: ENABLED, DISABLED
string
Search flows by name (partial match)
enum
Filter by version state: DRAFT, LOCKED
array
Filter flows by external IDs (for git sync)
array
Filter flows that use specific connections
array
Filter flows that use specific agents
number
default:"10"
Number of flows to return (1-100)
string
Pagination cursor from previous response

Response

Get Flow

Retrieve a specific flow by ID.

Path Parameters

string
required
The flow ID

Query Parameters

string
Optional version ID to retrieve a specific version instead of the latest

Response

Returns the full flow object with the populated version.

Update Flow (Operations)

Apply operations to modify a flow. This endpoint handles various operations like changing status, importing flow definitions, and more.

Flow Operations

Enable or disable a flow.
enum
required
New status: ENABLED or DISABLED
The flow cannot be modified if it was updated by another user within the last minute. This prevents concurrent editing conflicts.

Count Flows

Get the count of flows in a folder or project.

Query Parameters

string
required
Project ID
string
Optional folder ID to count flows in a specific folder

Response

Export Flow as Template

Export a flow as a reusable template.

Response

Returns a SharedTemplate object that can be imported into other flows or shared.

Delete Flow

Permanently delete a flow.

Path Parameters

string
required
The flow ID to delete

Response

Returns 204 No Content on successful deletion.
Deleting a flow is permanent and cannot be undone. All flow runs and history will be preserved, but the flow definition will be deleted.

Flow Status Management

Enabling Flows

When enabling a flow:
  • The flow must have a valid trigger configured
  • Platform active flow limits are checked
  • Webhooks are registered if using webhook triggers
  • Scheduled triggers are set up if using schedule triggers

Disabling Flows

When disabling a flow:
  • Active runs continue to completion
  • New runs are prevented
  • Webhooks are unregistered
  • Scheduled triggers are paused

Active Flows Limit

Your platform has a limit on the number of active (enabled) flows based on your plan. Attempting to enable a flow when at the limit will return an error.

Error Responses

Flow In Use (409)

Flow Not Found (404)

Best Practices

  • Use folders to organize flows by team, department, or use case
  • Create folders with descriptive names
  • Leverage folderName parameter for automatic folder creation
  • Store custom tags, categories, or identifiers in metadata
  • Use metadata for integration with external systems
  • Keep metadata size reasonable (< 1KB recommended)
  • Use externalId for git synchronization
  • Export flows as templates for backup
  • Test flows in disabled state before enabling
  • Use pagination cursors for large flow lists
  • Filter by folder or status to reduce response size
  • Cache flow definitions when possible

Code Examples

Flow Runs

Execute and monitor flow runs

Connections

Manage connections used in flows