- Design n8n as an integration layer for agents.
- Separate triggers, tools, approvals, and logs.
- Prepare a workflow compatible with local or cloud models.
Base workflow in n8n
Webhook or Email Trigger -> Normalize input -> AI Agent or HTTP Request to LangGraph -> Switch by risk -> Create draft / request approval / reject -> Save log -> Notify result
Tool contracts
Each tool must define input, output, and limits. Example:
tool: create_email_draft input: to: email subject: string body: string output: draft_id: string forbidden: - send_without_approval - attach_private_files