What is a workflow?

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

  1. Go to Workflows in the top navigation
  2. Click New Workflow
  3. Give it a name and optional description
  4. Add steps using the drag-and-drop builder
  5. 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:

  1. Open your workflow
  2. Go to Triggers → Schedule
  3. Enter a cron expression (e.g. 0 9 * * 1 for every Monday at 9am)
  4. Click Save

Limits

PlanWorkflow runs / monthMax steps per workflow
Starter1,00010
Pro50,00050
EnterpriseUnlimitedUnlimited