Saddle Quickstart
Saddle is LittleHorse's managed workflow and streaming platform. In this quickstart, you will build a workflow that sends a Slack message, expose it through a webhook, and trigger it from a webhook event.
The complete runnable example, configuration template, and screenshots are in the Saddle quickstart in the LittleHorse Developer Hub.
What You Will Build
- A
send-slackTaskDefdeployed as a Saddle Job or run by a local Java worker. - A
WfSpecnamedquickstart-wfbuilt with the Saddle Workflow Builder. - A JSON webhook that publishes requests to a Streamlet.
- A Workflow Trigger that starts
quickstart-wffor each webhook request.
Prerequisites
- Access to a Saddle environment.
- A Saddle user who can configure clients, secrets, jobs, workflows, webhooks, and triggers.
- Java 21 or newer if you run the local mock worker.
- Docker only if you use the optional local development tooling.
1. Start The Task Worker
The workflow uses a task named send-slack. Choose one of these options:
Use A Saddle Job
Use the prebuilt saddle-bag-slack worker if you have a Slack bot token:
- Create a Slack app with the
chat:writescope and install it to your workspace. - Invite the app to the channel where it will post messages.
- In Saddle, open Configure > Secrets and create
slack-tokenwith the bot token. - Open Deploy > Saddle Jobs, click Add Saddle Job, select
saddle-bag-slack, and configure its Slack token to use theslack-tokensecret. - Click Create Job. The job registers the
send-slackTaskDef.
Run The Local Mock Worker
The Developer Hub includes a worker that prints the message instead of calling Slack. From the Developer Hub repository root:
cp examples/saddle/00-quickstart/.env.example examples/saddle/00-quickstart/.env
In Saddle, open Configure > Clients, create a Kernel Client, and put its generated credentials in .env. Then start the worker:
./gradlew :examples:saddle:java:00-quickstart:run
The worker registers send-slack and remains running while it polls for tasks.
2. Build The Workflow
In Saddle, open Orchestrate > Workflows, click Add Workflow, and create a workflow named quickstart-wf.
Add two STR variables:
channelmessage
Drag a Task node onto the canvas and select send-slack. Map its channel and message parameters to the workflow variables. Add an Exit node and connect Start > send-slack > Exit.
Click Deploy WfSpec, then Register Workflow.
3. Create The Webhook
Open Connect > Webhooks, click Add Webhook, and configure:
- Name:
quickstart-webhook - Path:
/quickstart - Body: JSON
Use this body schema:
{
"$id": "https://example.com/schemas/quickstart-webhook.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"channel": { "type": "string" },
"message": { "type": "string" }
},
"required": ["channel", "message"],
"additionalProperties": false
}
Validate the schema and create the webhook. Saddle creates the wh.quickstart-webhook Streamlet for its requests.
4. Create The Workflow Trigger
Open Stream > Workflow Triggers, click Add Trigger, and configure:
- Name:
quickstart-trigger - Type: Workflow Spec
- Workflow:
quickstart-wf - Major Version:
0.0 - Streamlet:
wh.quickstart-webhook
Leave the wfRunId mapping empty so LittleHorse generates an ID for each run. Map the webhook body to the workflow variables:
message:$.value.body.messagechannel:$.value.body.channel
Create the trigger.
5. Test The Workflow
Open the quickstart-webhook details page and copy its generated listener URL. Send a request:
curl --request POST '<WEBHOOK_LISTENER_URL>' \
--header 'Content-Type: application/json' \
--data '{
"channel": "<CHANNEL>",
"message": "Hello from Saddle!"
}'
Replace the placeholders with the listener URL and a channel value. Confirm that a new quickstart-wf run completes in Saddle. The Slack worker posts the message to Slack; the local mock worker prints it in its terminal.
For the full walkthrough and screenshots, continue to the Developer Hub Saddle quickstart.