Skip to main content
Krosyn is launching soon. Join the waitlist for early access.Join waitlist

Documentation

Learn how to use Krosyn to connect your applications.

Core Concepts

Understand the building blocks of Krosyn: connectors, the three-step pipeline, expressions, and endpoints.

Connectors

A connector is the core unit in Krosyn. It defines how incoming data should be evaluated, transformed, and forwarded to an external service. Each connector has:

  • A name to identify the connector
  • An example payload (sample JSON) used for autocomplete and testing
  • A status (active or disabled)
  • Three configuration steps: Trigger, Process, and Perform
  • One or more endpoints for receiving API requests

The Three-Step Pipeline

When a connector receives an incoming request, it executes three steps in order. Each step is optional and configured separately.

Step 1: Trigger

Evaluates a condition expression against the incoming payload. If the condition is false, the connector skips execution and logs a "skipped" event. If no trigger is configured, the connector always runs.

Example: equals($payload.event_type, "order.created")

Step 2: Process

Optionally fetches additional data from an external API (a "lookup") and maps/transforms fields using expressions. The fetched data is available as $lookup, and processed fields are available as $processed for the Perform step.

Example field: full_name = concat($payload.first_name, " ", $payload.last_name)

Step 3: Perform

Builds a request body from expressions and sends an HTTP request to a target API. You configure the target URL, HTTP method (POST, PUT, PATCH, DELETE), optional custom headers, and the request body fields. The request is sent with retry logic and circuit breaker protection.

Example field: email = $payload.user.email.lowercase

Execution Context

During execution, each expression has access to a context containing available data. The context grows as the pipeline progresses:

VariableAvailable InDescription
$payloadAll stepsThe incoming JSON request body
$secretAll stepsOrganization secrets (e.g. $secret.API_KEY)
$lookupProcess, PerformData returned from the Process step external API call
$processedProcess (later fields), PerformFields computed during the Process step
$processProcess (later fields), PerformAlias for $processed

Expressions

Expressions are the language used to reference, transform, and combine data throughout the pipeline. They support:

  • Field references: $payload.user.email
  • Chained accessors: $payload.name.uppercase.trim
  • Functions: concat($payload.first, " ", $payload.last)
  • Nested functions: uppercase(concat($first, " ", $last))
  • String interpolation: Hello $payload.name, your order is $payload.order_id
  • Array access: $payload.items[0].name

See the Expression Language reference for the full list of functions and syntax details.

Endpoints

Each connector has an endpoint that provides a unique URL for receiving incoming API requests. Endpoints include:

  • A bearer token for Authorization: Bearer <token> authentication
  • A secret token for X-Secret-Token header authentication
  • An allowed URLs whitelist for origin validation
  • Optional webhook signature verification (HMAC-SHA256)
  • Optional token expiry dates

See the API & Endpoints page for detailed setup instructions.

Events

Every time a connector executes, Krosyn creates an event record that captures:

  • Execution status: started, completed, skipped, or failed
  • The incoming payload
  • The outbound request (URL, method, headers, body)
  • The response (status code, headers, body)
  • Duration in milliseconds
  • Error messages if the execution failed

Secret values are automatically redacted from stored request/response data.