Workflow library
Email workflows, from common to Gent-only.
Start with familiar inbox automation patterns. Then see the workflows that need Gent's agent inbox, authority, context, approval, and audit model.
Prerequisite
Get to a working agent inbox first.
Every recipe below assumes the agent already has a verified domain, an inbox, and a scoped token. This is the setup sequence that used to live in the API quickstart.
Start with a verified domain
Register the customer-owned domain or subdomain that will hold agent inboxes. If you omit domain_use, Gent treats it as an existing domain and starts DMARC at quarantine.
{
"domain": "mail.yourco.com"
}
{
"domain": "agents.yourco.com",
"domain_use": "dedicated_subdomain"
}
Verify DNS
After adding the records at your registrar, verify the domain before creating inboxes.
GET /v1/domains/mail.yourco.com/check/
Create the agent inbox
Give the agent its own address on the verified domain.
{
"address": "agent@yourco.com"
}
Issue an agent token
Create a scoped credential for the agent instead of handing it a user session.
{
"inbox_id": "<inbox_id>",
"scopes": ["email:read", "email:send"],
"label": "my-agent"
}
Send and read mail
Use the agent token to send the first message, then list messages to confirm the inbox is live.
{
"to": [{ "email": "hello@example.com" }],
"subject": "Hello from gent.mx",
"text_body": "Sent via the API."
}
GET /v1/messages/?limit=5
Recipe files
Install repeatable workflows from TOML.
Use TOML when you want a workflow recipe that can be reviewed, shared, versioned, and installed from the dashboard without writing a long integration runbook first.
Write a recipe as TOML, paste it into the dashboard, validate the normalized API payloads, then install live resources through the same sequence, work-route, and workflow APIs documented in this library.
schema_version = "2026-06-18"
kind = "gent.workflow_recipe"
name = "Route leads to CRM"
description = "Send inbound lead email events to a CRM webhook."
category = "lead_response"
[inputs.inbox_id]
type = "inbox"
required = true
label = "Agent inbox"
[inputs.crm_webhook_url]
type = "url"
required = true
label = "CRM webhook URL"
[[resources.workflow]]
key = "lead_route"
name = "Route leads to CRM"
inbox_id = "{{ inputs.inbox_id }}"
trigger = "email_received"
conditions = [
{ field = "to_address", op = "contains", value = "leads@" }
]
writes = [
{ source = { from = "trigger.email" }, target = { type = "webhook", url = "{{ inputs.crm_webhook_url }}" } }
]
Common use cases
The workflows people already know they need.
These map ordinary email operations into concrete API calls: inbox setup, routing, triage, approvals, follow-up, files, tasks, and client workspaces.
Agent inbox setup
Create an agent inbox
Give an agent its own address, domain, token, and operating boundary before it starts handling mail.
View recipeInbound routing
Route inbound email to a webhook
Receive a message, classify it, and send the event to the service that should own the next step.
View recipeInbound triage
Triage inbound email with rules and AI
Classify inbound mail, suggest labels, score priority, prepare safe replies, and surface only the work that needs a person.
View recipeHuman review
Hold agent replies for approval
Let an agent draft or request a send action while a human approves sensitive mail before it leaves.
View recipeWork routing
Route an email request for sign-off
Send an email-based approval, acknowledgement, or text-response request to several people and record their replies.
View recipeOutbound follow-up
Run an email follow-up sequence
Enroll a contact or thread into a controlled sequence, stop on reply, and keep the history attached to the inbox.
View recipeFiles and intake
Save email attachments to Files
Promote inbound attachments into structured Files API records with folders, versions, collaborators, and source history.
View recipeFiles and intake
Process an invoice email into a spreadsheet
Capture invoice mail, store the source record, and append extracted invoice fields to a spreadsheet for finance review.
View recipeTask automation
Turn an email into a task
Convert inbound mail into a tracked action item with labels, status, context, and optional follow-up.
View recipeAgency operations
Create a client project inbox
Give a client, tenant, project, or workstream its own inbox, token boundary, labels, and operational record.
View recipeAPI foundations
Ship a production API integration
Use schemas, scoped auth, idempotency, error handling, and rate-limit behavior before moving an agent workflow to production.
View recipeUniquely Gent
Workflows that need more than an email API.
These depend on Gent's model of delegated correspondence: each agent has its own address, scoped authority, shared context, human review, and durable history.
Outbound follow-up
Send relationship-aware outreach
Use relationship history, contact enrichment, templates, and sequence prompts so outreach references the real record.
View recipeTeam collaboration
Run a team inbox with one contact graph
Fan shared-address mail into member inboxes, share contact cards, add thread notes, and preserve relationship context across the team.
View recipeAgent memory
Retrieve inbox context before an agent acts
Assemble messages, contacts, files, activity, and audit entries before drafting, routing, or escalating an email.
View recipeRetrieval
Answer repeated customer questions from approved sources
Use a retrieval source bucket to draft or support email answers for common customer questions without creating a separate chat surface.
View recipeGovernance
Configure AI consent, region, and audit controls
Set tenant and inbox controls before AI features process customer content, then keep export and deletion paths ready.
View recipeDelivery controls
Configure sender rules, forwarding, and templates
Set the operating guardrails around who can reach the inbox, where copies go, and how repeated replies are shaped.
View recipeGovernance
Pause an agent and take over
Pause, rotate, or revoke a token, then hand back the conversation to a human.
View recipeUsage controls
Track usage and set caps
Measure inbox growth, workflow volume, approvals, files, and storage before applying flexible or enforced limits.
View recipeCoverage
Built around the same primitives as the API.
The library covers the core surfaces that turn email into delegated work: inboxes, messages, tokens, approvals, routes, files, context, activity, and usage controls.