Advanced Workflows
This page describes a feature that is new in 0.3.1. It does not exist in 0.2.65. If you switch to 0.2.65 using the version switcher above, you will be redirected to the 0.2.65 home page.
The Grengin workflow engine lets you build automated, multi-step AI pipelines without writing glue code. Workflows run server-side and can be triggered via the UI, API, or a schedule.
What is a workflow?
A workflow is a directed graph of steps. Each step can:
- Call an AI model with a prompt
- Transform or filter data from a previous step
- Call an external HTTP endpoint
- Branch based on conditions
Workflows are defined visually in the Workflow Builder or as YAML for programmatic management.
Creating a workflow
- Go to Workflows in the top navigation
- Click New Workflow
- Give it a name and optional description
- Add steps using the drag-and-drop builder
- Click Deploy
Once deployed, the workflow gets a unique endpoint you can call via the API.
Example: summarise and route
This workflow takes a support ticket, summarises it with Claude, then routes it to a Slack channel based on sentiment:
name: ticket-triage
steps:
- id: summarise
type: ai
model: claude-sonnet-4
prompt: |
Summarise this support ticket in one sentence and classify
sentiment as POSITIVE, NEUTRAL, or NEGATIVE.
Ticket: {{trigger.body.text}}
- id: route
type: condition
on: summarise.output
branches:
- when: contains("NEGATIVE")
then: notify-urgent
- default:
then: notify-standard
- id: notify-urgent
type: http
url: https://hooks.slack.com/services/...
body:
text: "🚨 Urgent ticket: {{summarise.output}}"
- id: notify-standard
type: http
url: https://hooks.slack.com/services/...
body:
text: "📩 New ticket: {{summarise.output}}"
Triggering a workflow via API
curl https://app.grengin.com/v1/grengin/workflows/ticket-triage/run \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "My invoice is incorrect and I need it fixed urgently."}'
Scheduling workflows
Workflows can be scheduled with a cron expression:
- Open your workflow
- Go to Triggers → Schedule
- Enter a cron expression (e.g.
0 9 * * 1for every Monday at 9am) - Click Save
Limits
| Plan | Workflow runs / month | Max steps per workflow |
|---|---|---|
| Starter | 1,000 | 10 |
| Pro | 50,000 | 50 |
| Enterprise | Unlimited | Unlimited |