Templates / Run budget-capped client AI agents with OpenAI and n8n data tables

Run budget-capped client AI agents with OpenAI and n8n data tables

Ready for 3.0

by Alexander Englund ✓ · 4 views · created 2026-10-02 · CRM, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 44 nodes and runs when an HTTP POST request hits its webhook URL (plus 3 other triggers). Along the way it connects OpenAI Chat Model.

How it runs

Trigger: When an HTTP POST request hits its webhook URL (plus 3 other triggers).

  1. Settings (Edit Fields (Set)): sets 10 fields: system_message, max_output_tokens, max_iterations…
  2. Sweep settings (Edit Fields (Set)): sets 1 field: reservation_ttl_minutes
  3. Monthly settings (Edit Fields (Set)): sets 3 fields: keep_months, summary_email_to, summary_email_from
  4. Load clients (Data table): get
  5. Validate request (Code): runs custom JavaScript code
  6. Find open reservations (Data table): get
  7. Load last month's ledger (Data table): get
  8. Load ledger for period (Data table): get
  9. Valid request? (If): checks a condition and branches into true / false
  10. Pick stale reservations (Code): runs custom JavaScript code

…plus 28 more steps. See the full node list below.

Services it uses

OpenAI Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (12)

From the author

Quick overview For agencies and freelancers who run one AI agent for several paying clients. Each client has a monthly budget, a pause switch and its own instructions in an n8n Data table. A run starts only if the client can afford it, and the tokens used are…

Excerpt from Alexander Englund's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.