Quickstart
This guide creates a webhook-triggered flow that receives order data, transforms it, and delivers it to a target API endpoint.
What you’ll build
Section titled “What you’ll build”A simple flow that:
- Receives incoming webhook payloads
- Transforms the data (formats fields, adds timestamps)
- Delivers to a target REST API
- Retries on failure with exponential backoff
-
Install and authenticate
Terminal window npm install -g @fyrn/clifyrn login -
Initialize a project
Terminal window mkdir my-first-flow && cd my-first-flowfyrn init -
Generate a flow with AI
Terminal window fyrn flow create "Receive order webhooks and forward to my REST API with field mapping"fyrn generates a YAML flow config and prompts you to confirm. The generated flow looks like this:
flows/order-webhook-to-api.yaml flow: order-webhook-to-apiversion: 1description: Receive order webhooks and forward to REST APIsource:connector: incoming-webhooktrigger: webhooktarget:connector: my-apiendpoint: /api/ordersmethod: POSTmapping:order_id: source.idcustomer_name: source.customer.namecustomer_email: source.customer.emailtotal: source.total_price | decimal(2)currency: source.currency | uppercasereceived_at: '"" | now'on_error:retry: 3x exponential(30s)then: dead-letterLet’s break down each section:
source— where data comes from.trigger: webhookmeans this flow activates on inbound HTTP POST requests.target— where data goes. The connector instance name, API endpoint path, and HTTP method.mapping— field-by-field transformation using pipe syntax.source.references the inbound payload. The|operator chains transform functions.on_error— retry 3 times with exponential backoff starting at 30s. After exhausting retries, send to the dead-letter queue.
-
Test locally with sample data
Create a test payload:
test-payload.json {"id": "ORD-001","customer": {"name": "Alice Johnson","email": "alice@example.com"},"total_price": 149.5,"currency": "usd"}Run the transform locally:
Terminal window fyrn flow test flows/order-webhook-to-api.yaml --sample-data test-payload.jsonOutput shows the transformed payload:
{"order_id": "ORD-001","customer_name": "Alice Johnson","customer_email": "alice@example.com","total": "149.50","currency": "USD","received_at": "2026-02-26T10:30:00.000Z"} -
Deploy
Terminal window fyrn flow deploy <flow-id>The CLI outputs the flow’s webhook URL:
✓ Deployed order-webhook-to-api v1Webhook URL: https://api.fyrn.dev/webhooks/receive/abc123 -
Send a test webhook
Terminal window curl -X POST https://api.fyrn.dev/webhooks/receive/abc123 \-H "Content-Type: application/json" \-d '{"id":"ORD-002","customer":{"name":"Bob Smith","email":"bob@example.com"},"total_price":299.99,"currency":"eur"}' -
Check the logs
Terminal window fyrn logs tail <flow-id>
Your flow is live. Every webhook POST to that URL is transformed and delivered to your target API, with automatic retries on failure.
What’s next
Section titled “What’s next”- Core Concepts — Understand flows, steps, transforms, and connectors
- Transforms Guide — All available transform functions with examples
- Creating Flows — AI assist, templates, and manual YAML authoring
- DSL Reference — Full YAML DSL specification