Skip to main content

What are workflows?

Workflows are the automations you build in Flowra: they combine an AI agent (which can chat and decide what to do) with tools (Slack, Gmail, your custom code, etc.) and optional knowledge (RAG). A workflow might be “customer support bot” or “summarize my emails and post to Slack”. You define the system prompt, pick the model and tools, and optionally attach knowledge collections. Then you run the workflow (manually or via a trigger) — it gets an input, the agent reasons and calls tools, and you get an output or a stream of messages. In short: a workflow is the “recipe” (name, prompt, model, tools, connections); an agent is the AI that runs inside it. In Flowra one flow can mix fixed steps and agent steps. For the full distinction, see Workflow vs agent on the intro page.

Example use cases

  • Support bot — Create a workflow with a friendly system prompt, Slack + knowledge base tools. Run it when a user sends a message; the agent answers using your docs and can create tickets or escalate.
  • Scheduled summary — A trigger runs the workflow every morning; the workflow uses Gmail and Slack tools to summarize unread emails and post to a channel.
  • Run from your app — Your backend calls POST /workflow/manager/execute/{id} with a payload; you get a thread ID, poll for status, and optionally resume if the workflow pauses for user input.

How it works

  • Create / update — Set name, system prompt, model (from AI models), tools, knowledge collections, and connection settings. You can do this in the Dashboard chat or via the API.
  • RunPOST /workflow/manager/execute/{id} starts a run. You get a thread ID; use it to poll status, get the result, or resume if the run is paused.
  • Executions — List runs, get one run’s details (inputs, outputs, steps), cancel or resume. Useful for dashboards and debugging.
The API gives you full control: list workflows, create, update, delete, change active status, switch which connected account is used for a toolkit, run, and inspect executions.

API endpoints

List workflows

GET /api/v1/workflow/manager/list returns a paginated list of your workflows with optional filters.
Query parameterDescription
page, limit, offsetPagination
sortBy, sortOrderSort (e.g. createdAt, DESC)
qSearch by name
activeStatusFilter by active/inactive
cursorCursor-based pagination
curl -X GET "https://flowra.dev/api/v1/workflow/manager/list?limit=20" \
  -H "x-api-key: YOUR_API_KEY"

Create workflow

POST /api/v1/workflow/manager/create creates a new workflow (agent) with name, tools, system prompt, and model. Request body: CreateAgentDto (see API reference). The workflow runs in your project’s workspace.

Get workflow detail

GET /api/v1/workflow/manager/detail/{id} returns full configuration for one workflow: name, tools, prompt, model, and connection settings.

Update and delete

  • PATCH /api/v1/workflow/manager/update/{id} — Update name, tools, prompt, or model. Send only the fields you want to change.
  • DELETE /api/v1/workflow/manager/delete/{id} — Permanently remove a workflow.
  • PATCH /api/v1/workflow/manager/activeStatus/{id} — Turn a workflow on (active) or off (inactive). Inactive workflows cannot be run or triggered.
  • PATCH /api/v1/workflow/manager/change-connection/{id} — Change which connected account (OAuth) is used for a toolkit in this workflow. Body: { "toolkitSlug": "...", "connectionId": "..." }.

Run a workflow

POST /api/v1/workflow/manager/execute/{id} starts a workflow run with an optional input payload. Request body: TriggerWorkflowDto. The response includes a thread ID you can use to poll status or resume if the workflow pauses.

Executions

  • GET /api/v1/workflow/manager/executions — List past runs of any workflow with filters (status, date, workflow ID) and pagination.
  • GET /api/v1/workflow/manager/executions/{id} — Full details of one execution: inputs, outputs, steps, status.
  • GET /api/v1/workflow/manager/executions/thread/{threadId}/status — Check if a run is in progress, completed, or failed.
  • POST /api/v1/workflow/manager/executions/thread/{threadId}/resume — Resume a paused run (e.g. after user input). Body: ResumeWorkflowExecutionDto.
  • GET /api/v1/workflow/manager/{id}/executions — List executions for one specific workflow.