Workflows overview

Understand workflow building blocks, data flow, functions, testing, and SDK methods.

PrerequisitesCore concepts

Canvas and user interactions

  • Drag and drop: Place nodes from the sidebar onto the canvas.
  • Smart connections: Draw lines to connect steps; the system validates logical errors.
  • Duplicate and copy-paste: Clone configured nodes or move them between workflows.
  • Mini-map: Navigate large workflows with a bird's-eye view.

Nodes and steps

1. Triggers
  • Webhook / API request: Defines inputs (Body, Query, Headers).
  • Scheduler: Runs on a CRON schedule.
2. Connector actions
  • Schema definition: Required and optional fields are known to the builder.
  • Purpose: Fill a form instead of guessing payload structures.
3. Core actions and logic
  • Transformers: JavaScript/TypeScript to manipulate data when needed.
  • Condition (If/Else): Branching logic.
  • Loops: Iterate over lists.
  • Variables: Define and update temporary state.
  • Validators: Assert criteria; fail with a custom error when needed.
  • API request: Raw HTTP calls to any URL not covered by a connector.

Variables and data flow

  • Variable picker: Select data from previous steps without memorizing JSON paths.
  • Dynamic reference: Syntax like {{steps.trigger.body.userId}} injects values.

Testing and debugging

  • Step-by-step testing: Test a single node in isolation.
  • Real-time results: See output in the side panel.
  • Selection purpose: Test results become available to subsequent steps in the variable picker.

Visual query builder

  • SQL builder: Select, join, and filter visually.
  • Mongo aggregation: Build multi-stage pipelines visually.
  • Safety: Parameterized inputs reduce syntax errors and injection risk.

Functions#

Functions are reusable callable sub-workflows with input and output schemas. Create them in Dev Mode under the Functions tab, then invoke them from workflows. Use them for shared validation, formatting, and business rules so logic is defined once and reused deliberately.


This guide covers creating workflows, pushing them to the server, and running them via the Cliodot SDK.

Prerequisites#

  • FlowSync API access with workflows_enabled feature
  • API credentials: apiKey and apiSecret
  • JWT obtained via POST /api-core/cliodot/user/login-with-api-key

API Base Path#

https://your-api-domain.com/api-core/cliodot/workflows

SDK Workflow Methods#

Method Description
client.workflows.push(workflow) Create or update workflow (by _id)
client.workflows.pull(groupId) Fetch workflow as IWorkflow
client.workflows.list(options?) List workflow groups with pagination
client.workflows.run(groupId, triggerId, payload) Run workflow by trigger ID (payload may include environment: "dev" | "prod")
client.workflows.runByWebhook(webhookPath, method, payload) Run workflow by webhook path (payload may include environment)
client.workflows.promote(groupId) Promote dev workflow to production