aiintermediate15 min setupby Mantle
AI support agent with order lookup
A webhook hands a customer message to a tool-using agent that can look up the order over HTTP, then the answer is emailed back.
Drag to pan, pinch to zoom. This is the real graph the template installs.
How it works
What it does
- Support request — a webhook (
/hooks/<tenant>/support-agent) receives{message, email, order_id?}. - Support agent — an
ai.agentwith an HTTP tool (get_order) reasons over the message, calling the order API only when it needs to. Every model turn and tool call is recorded in the run trace. - Email the answer — the agent's final text is emailed to the customer.
Setup
- Pick an Anthropic (or OpenAI / Google) connection on the Support agent node and set the model if you prefer another.
- Point the
get_ordertoolurlat your order API; addheadersfor auth if needed. - Pick a SendGrid / SMTP connection on Email the answer.
- Publish, then POST to the webhook URL shown on the trigger node.
Nodes 3
- 01Support requesttrigger.webhookTrigger
- 02Support agentai.agentAI
- 03Email the answermail.sendDestination
View template JSON
{
"format": "mantle-workflow/v1",
"id": "ai-support-agent-email",
"name": "AI support agent with order lookup",
"graph": {
"nodes": [
{
"id": "webhook",
"type": "trigger.webhook",
"label": "Support request",
"config": {
"slug": "support-agent",
"input_schema": {
"required": [
"message",
"email"
],
"properties": {
"message": {
"type": "string"
},
"email": {
"type": "string"
},
"order_id": {
"type": "string"
}
}
}
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 60,
"y": 220
}
},
{
"id": "agent",
"type": "ai.agent",
"label": "Support agent",
"config": {
"model": "claude-sonnet-4-5",
"system_prompt": "You are a concise, friendly support agent for an online store. Use the get_order tool when the customer mentions an order id. Never invent order details. Answer in plain text, under 150 words.",
"prompt": "Customer email: {{ $json.email }}\nOrder id (may be empty): {{ $json.order_id }}\n\nMessage:\n{{ $json.message }}",
"tools": [
"now",
{
"kind": "http",
"name": "get_order",
"description": "Fetch an order by its id.",
"method": "GET",
"url": "https://api.example.com/orders/{order_id}",
"parameters": {
"type": "object",
"required": [
"order_id"
],
"properties": {
"order_id": {
"type": "string"
}
}
}
}
],
"max_iterations": 6,
"temperature": 0.2,
"max_tokens": 800,
"output": {
"mode": "text"
},
"tool_timeout_seconds": 20
},
"connection_id": null,
"worker_type": "ai-worker",
"position": {
"x": 380,
"y": 220
}
},
{
"id": "send_reply",
"type": "mail.send",
"label": "Email the answer",
"config": {
"to": "{{ steps.webhook.email }}",
"subject": "Re: your support request",
"body_text": "{{ steps.agent.text }}"
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 700,
"y": 220
}
}
],
"edges": [
{
"from": "webhook",
"to": "agent"
},
{
"from": "agent",
"to": "send_reply"
}
]
}
}Use it, then make it yours.
Templates install as drafts. Change anything, and Workflow Health re-checks the graph on every save.