HomeDocs › Connector Builder

Connector Builder Documentation

Build integration routes using visual activity blocks

Last updated: 2026-04-07 · 15 min read · ← Back to Docs

Contents

  1. What is a Connector?
  2. Base Activity Types
  3. Activity Control Flow
  4. Connector JSON Schema
  5. Quick-start Guide
  6. FAQ

1. What is a Connector?

A Connector is a named integration route that bridges an external system to the Priostack execution engine. Connectors are composed of one or more activity blocks that run in sequence, transforming data as it moves from a source to a destination.

Every connector has a direction:

Together, inbound and outbound connectors form a two-way bridge between BPMN processes and any REST-accessible external system — with no custom code required.

2. Base Activity Types

Each connector is a chain of activities. The table below lists all available activity types, their category, and what they do.

Activity Category Description
http I/O Make an HTTP request to any REST endpoint. Supports GET, POST, PUT, PATCH, DELETE. Response body is available to downstream activities as output.
oauth2 Auth Retrieve and cache OAuth2 access tokens using the client-credentials or authorization-code flow. Token is refreshed automatically before expiry.
transform Transform Map and transform fields using FEEL expressions. Use dot-notation to access nested properties and construct new payloads.
filter Transform Drop or redirect messages that do not match a FEEL predicate. Non-matching messages are silently discarded unless an else branch is configured.
aggregate Transform Collect N messages before proceeding. Maps to the Layer 2 Aggregator pattern — useful for micro-batching events before calling a downstream API.
split Transform Expand an array field into parallel branches, processing each element independently through the remaining activity chain.
cache Storage Store or retrieve arbitrary values with a TTL-keyed entry. Useful for deduplication, rate-limit counters, and intermediate state between activations.
retry Flow Wrap a set of activities in a configurable retry policy with linear or exponential backoff. Defines maximum attempt count and delay between retries.
delay Flow Pause execution for a configured ISO 8601 duration before continuing to the next activity. Useful for rate-limiting outbound calls.
conditional Flow If/else branch using a FEEL condition. The then branch and else branch each contain an independent sub-chain of activities.
Webhook (inbound) Trigger Receive HTTP POST events from external systems via a dedicated auto-generated URL. The request body is passed as the initial payload.
Schedule (inbound) Trigger Cron or interval-based trigger. Fires on the configured schedule and injects a timestamp payload into the activity chain.
Process Start (outbound) Output Start a BPMN process instance using the connector payload as variables. Specify the process definition key in the activity config.
Message Channel (outbound) Output Publish a message to a Layer 2 named channel. Downstream BPMN intermediate catch events subscribed to the channel will be activated.
Telegram Notify (outbound) Output Send a Telegram message to a configured bot and chat ID. Supports FEEL template expressions in the message body.
Email Notify (outbound) Output Send an email via SMTP to one or more recipients. Subject and body support FEEL template expressions for dynamic content.

3. Activity Control Flow

Every activity in a connector can have one or more control flow toggles enabled. These map directly to the toggles visible in the Connector Builder UI.

Asynchronous

When enabled, the activity runs in the background and the connector continues to the next activity immediately without waiting for the result. Use this for fire-and-forget notifications or non-blocking I/O calls where the response is not needed downstream.

Repetitive

The activity repeats in a loop until a FEEL condition (specified in constraints) evaluates to true. Combine with a delay activity to implement polling.

Compensation

Marks the activity as a compensation handler. If a preceding activity fails, the compensation handler is invoked to roll back its side effects (e.g., delete a record created by an earlier HTTP POST). Mirrors BPMN 2.0 compensation events.

Escalation

On error, escalate to the parent scope instead of failing the connector. Useful inside sub-chains (conditional or retry blocks) where you want the outer connector to handle the failure.

Goto

Jump to a specific activity by its id field rather than proceeding sequentially. Set the goto field to the target activity ID. Useful for implementing simple loops without nesting a repetitive block.

Timer

Delay execution of this activity by an ISO 8601 duration before it runs (e.g., PT30S for 30 seconds, PT5M for 5 minutes). Unlike the Delay activity type, the Timer toggle applies to any activity type.

Constraints

A FEEL expression evaluated as a pre-condition before the activity runs. If the expression evaluates to false, the activity is skipped. Use constraints to guard activities on payload shape or business rules (e.g., payload.amount > 0).

Retry

Configure a maximum retry count (retry_max) and backoff strategy (retry_backoff: linear or exponential). The activity is re-attempted automatically on transient errors (HTTP 5xx, network timeout) up to the limit. Execution is aborted and the error is logged once the limit is exceeded.

4. Connector JSON Schema

The example below shows a complete connector definition as returned by GET /api/connectors/{id}/export. You can import this JSON on any account using POST /api/connectors/import.

{
  "id": "con_1712345678000000000",
  "name": "Stripe → Start Billing Process",
  "description": "Receive Stripe checkout.session.completed events and start a BPMN billing workflow",
  "type": "inbound",
  "trigger_type": "webhook",
  "webhook_url": "/api/connector/con_1712345678000000000/inbound",
  "status": "active",
  "version": 2,
  "created_at": "2026-04-01T10:00:00Z",
  "updated_at": "2026-04-07T08:30:00Z",
  "activities": [
    {
      "id": "a1",
      "type": "filter",
      "label": "Only completed checkouts",
      "config": {},
      "constraints": "payload.type = \"checkout.session.completed\""
    },
    {
      "id": "a2",
      "type": "transform",
      "label": "Extract customer data",
      "config": {
        "mapping": {
          "customerId": "payload.data.object.customer",
          "amount":     "payload.data.object.amount_total / 100",
          "currency":   "payload.data.object.currency"
        }
      }
    },
    {
      "id": "a3",
      "type": "http",
      "label": "Enrich from CRM",
      "config": {
        "method": "GET",
        "url": "https://crm.example.com/api/customers/{{output.customerId}}"
      },
      "retry_max": 3,
      "retry_backoff": "exponential"
    },
    {
      "id": "a4",
      "type": "output",
      "label": "Start billing process",
      "config": {
        "output_type": "process_start",
        "process_key": "billing_workflow",
        "variables": {
          "customerId": "output.customerId",
          "amount":     "output.amount",
          "crmData":    "output"
        }
      }
    }
  ]
}

5. Quick-start: First Connector Deployment

  1. Sign up and get your API key.

    Create a free account at priostack.com. Your API key and 500 free credits are issued immediately. No credit card required.

  2. Open the Connector Builder in the Console.

    Navigate to Console and click New Connector. Choose Inbound (Webhook) or Outbound depending on your integration direction.

  3. Add and configure activity blocks.

    Drag activity blocks from the sidebar into the canvas. Configure each block — set the HTTP URL, FEEL expression, or output target. Use the control flow toggles in the right panel to add retries, conditions, or compensation logic.

  4. Publish and test your connector.

    Click Publish to activate the connector. For inbound connectors, copy the generated webhook URL and paste it into your external system. Send a test event and watch the execution log appear in real time.

Each connector execution costs 0.5 credits. Your first 100 executions per month are free. Free credits refresh every month.

6. FAQ

How do I store OAuth2 secrets?
Use the oauth2 activity type in your connector. Configure the client ID, client secret, and token endpoint in the activity config panel. Secrets are encrypted at rest using AES-256-GCM and never appear in export payloads or execution logs. Tokens are cached in memory and refreshed automatically before they expire.
What happens if an activity fails?
By default, an activity failure marks the connector execution as error and halts the chain. If you have configured the Retry toggle on the failing activity, it will be re-attempted up to retry_max times before the error is final. All failures — including intermediate retries — are recorded in the connector's execution trace, viewable under the Logs tab in the Console.
Can I use connectors without BPMN?
Yes. Inbound connectors can publish directly to a Layer 2 named channel without needing a BPMN process. Use a Message Channel (outbound) activity as the final step, or simply log or forward the event. Connectors are fully standalone — BPMN integration is optional.
How are connector executions counted?
Each connector execution costs 0.5 credits. Your account receives 100 free executions per month (50 credits). Beyond the free tier, credits are consumed at 0.5 per execution regardless of chain length or activity count. Free credits refresh every month. A 402 response is returned when your balance reaches zero.
Can I export and share connectors?
Yes. Use the Export button on any connector in the Console to download a connector.json file. The export strips execution logs and leaves all activity configuration intact. On another account, use the Import button (or POST /api/connectors/import) to recreate the connector in draft status, ready to configure secrets and publish.