Workflow recipe files

Install agent inbox workflows from TOML.

Recipes turn common Gent workflow setups into reviewable files. Paste TOML, supply environment-specific values, inspect the normalized API payloads, then let the dashboard create the live resources with the regular Gent APIs.

How it works

The dashboard is the installer, not a second workflow engine.

01

Paste or upload TOML

Start from a shared recipe file or write a new one. Recipes describe inputs and resources, not secrets. Secret values are supplied only when validating or installing resources.

02

Validate before installing

POST/v1/workflows/recipes/validate/

Validation parses TOML, resolves declared inputs, checks sequence, work-route, and workflow payloads, and reports diagnostics. It does not create anything.

03

Preview normalized payloads

The dashboard shows the API payloads it will send next. This is where an operator checks scopes, conditions, route recipients, webhooks, and approval behavior before creating anything.

04

Install through existing APIs

The dashboard creates sequences first, then work routes, then workflow rules. Placeholders such as {{ resources.followup.sequence_id }} are replaced with IDs returned by resources created earlier.

05

Keep the recipe with your runbook

Store the recipe and validation response with your deployment notes. Live API resources remain the source of truth; the TOML file is the repeatable setup plan.

Records

What to keep after install.

  • Keep the original .toml recipe in your own repository, Files folder, or implementation notes.
  • Keep the validation response when you need a record of the normalized payloads and diagnostics reviewed before install.
  • Do not store secrets in recipe files. Declare secret inputs, then provide values only when validating or creating resources.
  • To change or remove live behavior later, manage the created sequence, work-route, and workflow resources directly through the API or dashboard.

With other APIs

Use APIs for setup. Use TOML for the repeatable automation.

Recipes are intentionally narrow in v1: they install sequences, concrete work routes, and workflow rules. Domain, inbox, token, label, file, template, forwarding, sender-rule, and AI setup still happens through the regular API or dashboard, then the recipe references those IDs as inputs.

A

Lead intake and follow-up

Set up the inbox, token, and labels once. Then install a TOML recipe that routes lead mail to a CRM webhook and starts a follow-up sequence.

Prerequisite API setup
Do this through the dashboard or regular API before installing the recipe.
POST /v1/domains/
POST /v1/inboxes/
POST /v1/tokens/
POST /v1/labels/
Recipe shape
The recipe receives the prepared inbox, label, and webhook URL as inputs. It creates the sequence and workflow rule.
schema_version = "2026-06-18"
kind = "gent.workflow_recipe"
name = "Lead intake with follow-up"
description = "Route new lead mail to CRM and start a reply-aware sequence."
category = "lead_response"

[inputs.inbox_id]
type = "inbox"
required = true
label = "Lead inbox"

[inputs.lead_label_id]
type = "label"
required = true
label = "Lead label"

[inputs.crm_webhook_url]
type = "url"
required = true
label = "CRM webhook URL"

[[resources.sequence]]
key = "lead_followup"
name = "Lead follow-up"
sender_inbox_id = "{{ inputs.inbox_id }}"
exit_on_reply = true
emails = [
  { delay_days = 1, subject = "Following up", body = "Checking whether this is still useful." }
]

[[resources.workflow]]
key = "lead_intake"
name = "Route and follow up on leads"
inbox_id = "{{ inputs.inbox_id }}"
trigger = "email_received"
conditions = [
  { field = "to_address", op = "contains", value = "leads@" }
]
writes = [
  { source = { from = "trigger.email" }, target = { type = "email.add_label", label_id = "{{ inputs.lead_label_id }}" } },
  { source = { from = "trigger.email" }, target = { type = "webhook", url = "{{ inputs.crm_webhook_url }}" } },
  { source = { from = "trigger.email" }, target = { type = "sequence.enroll", sequence_id = "{{ resources.lead_followup.sequence_id }}" } }
]
B

Invoice intake with approval routing

Set up finance labels and a Files folder or spreadsheet register outside the recipe. Then install a recipe that labels invoice mail and sends the source event to your parser. If the parser detects an exception, have that service start a finance review route with the Work Route API.

Prerequisite API setup
This keeps durable records and business-specific fields out of the recipe installer.
POST /v1/labels/
POST /v1/files/folders/
POST /v1/files/
POST /v1/work-routes/  # only when an exception needs human review
Recipe shape
The recipe uses prepared IDs and a parser endpoint as inputs. It creates the workflow rule; exception-specific approvals are started by your parser through the Work Route API.
schema_version = "2026-06-18"
kind = "gent.workflow_recipe"
name = "Invoice intake with finance review"
description = "Label invoice mail, notify a parser, and route exceptions for approval."
category = "finance"

[inputs.inbox_id]
type = "inbox"
required = true
label = "Invoice inbox"

[inputs.invoice_label_id]
type = "label"
required = true
label = "Invoice label"

[inputs.parser_webhook_url]
type = "url"
required = true
label = "Parser webhook URL"

[[resources.workflow]]
key = "invoice_intake"
name = "Route invoice mail"
inbox_id = "{{ inputs.inbox_id }}"
trigger = "email_received"
conditions = [
  { field = "has_attachments", op = "eq", value = true }
]
writes = [
  { source = { from = "trigger.email" }, target = { type = "email.add_label", label_id = "{{ inputs.invoice_label_id }}" } },
  { source = { from = "event.payload" }, target = { type = "webhook", url = "{{ inputs.parser_webhook_url }}", event_type = "invoice.email_received" } }
]

Use when

Recipes are best for repeatable setups.

  • Agency or consultant teams installing the same inbox workflow for multiple clients.
  • Operators who want to review workflow behavior before enabling it.
  • Teams that want recipe files they can share, audit, and version outside the dashboard.
  • Developers who want a simpler handoff format than a long sequence of API calls.