Overlapping polls, nothing counted twice: Retailbox Automation's n8n template that tracks LLM token spend per workflow, explained node by node
This shared template monitors the cost of n8n workflows: it polls executions, deduplicates model calls, compares daily spend with workflow budgets and sends Slack alerts or optionally pauses over-budget runs.
Overlapping polls, nothing counted twice: Retailbox Automation's n8n template that tracks LLM token spend per workflow, explained node by node
Not my template: it is Retailbox Automation's, published on n8n.io in October 2026. The video stops on each step: a Schedule Trigger fires every 15 minutes, and an Edit Fields node holds the settings: a price per 1M input and output tokens for each model, a daily budget ($5 by default), per-workflow budget overrides, and a pause switch that is off. An n8n node reads the last 100 executions of active workflows through the n8n API. A Code node walks each execution's run data, finds every chat model call, takes its token usage (or n8n's own estimate when the provider returned none), matches the model to the price list by its longest prefix, and outputs one row per call with a cost in USD.
Two Data Table nodes follow: the first keeps a call only if its callKey is not in the table yet, the second inserts the new rows. A third reads back every row finished since midnight. Another Code node sums the spend per workflow, compares it with the budget, and uses workflow static data so each workflow is flagged at most once a day. An If node follows the pause switch: true unpublishes the workflow through the n8n API, then both paths end on a Slack message with the workflow's name, today's spend, the budget and the number of calls.
What I like: the poll deliberately overlaps (the same 100 executions come back every 15 minutes), and the "row does not exist" check on a unique call key is what makes that safe. No cursor to store, nothing counted twice.
Overlapping polls, nothing counted twice: Retailbox Automation's n8n template that tracks LLM token spend per workflow, explained node by node
This shared template monitors the cost of n8n workflows: it polls executions, deduplicates model calls, compares daily spend with workflow budgets and sends Slack alerts or optionally pauses over-budget runs.
Overlapping polls, nothing counted twice: Retailbox Automation's n8n template that tracks LLM token spend per workflow, explained node by node
Not my template: it is Retailbox Automation's, published on n8n.io in October 2026. The video stops on each step: a Schedule Trigger fires every 15 minutes, and an Edit Fields node holds the settings: a price per 1M input and output tokens for each model, a daily budget ($5 by default), per-workflow budget overrides, and a pause switch that is off. An n8n node reads the last 100 executions of active workflows through the n8n API. A Code node walks each execution's run data, finds every chat model call, takes its token usage (or n8n's own estimate when the provider returned none), matches the model to the price list by its longest prefix, and outputs one row per call with a cost in USD.
Two Data Table nodes follow: the first keeps a call only if its callKey is not in the table yet, the second inserts the new rows. A third reads back every row finished since midnight. Another Code node sums the spend per workflow, compares it with the budget, and uses workflow static data so each workflow is flagged at most once a day. An If node follows the pause switch: true unpublishes the workflow through the n8n API, then both paths end on a Slack message with the workflow's name, today's spend, the budget and the number of calls.
What I like: the poll deliberately overlaps (the same 100 executions come back every 15 minutes), and the "row does not exist" check on a unique call key is what makes that safe. No cursor to store, nothing counted twice.
Uses Higgsfield for Airbnb photo and walkthrough packages, pitching free samples before a paid bundle; a second offer finds businesses in Meta’s Ad Library and proposes 12 ads for $2,000 monthly.
A Claude skill produces science and mystery Shorts with scripts, visuals, narration and captions; Zapier uploads them to YouTube, connecting production with channel monetization.
Uses Claude Code for animation, editing and motion graphics in a new YouTube channel, reviewing the creator’s 14-day experiment from publishing to monetization.
Use a revenue agent to review old proposals, emails and customer activity for follow-up opportunities, with humans closing deals; Morgan also sells training and setup services around her agent methods.
Compares AI files, PDFs, shopping Shorts, SaaS and website work, emphasizing how templates, custom development and workflow services become products or client orders.
Creates vertical dramas with Kling 4.0, planning keyframes and consistent characters through references, then calculates episode costs to assess commercial production.
Finds brands, makes an AI UGC sample for a product and uses outreach to sell finished ads; the creator proposes up to $500 per ad and uses Zapier for email replies.
Presents lead-response agents, AI copywriting and ecommerce stores as starting options tied to customer acquisition, marketing deliverables and product sales.
Targets seasonal audiences such as Christmas-music listeners, creates original AI music and YouTube videos, and builds a consistent channel toward Partner Program income.
Uses Claude to analyze competitors’ Meta ads and Higgsfield to create brand visuals, pitches with Loom over LinkedIn and proposes a $2,000 monthly creative retainer.
Uses ChatGPT business-idea and outbound-list skills to define a one-person offer and identify prospects, turning after-work time into customer acquisition and service setup.
Creates ebooks and iPad planners with Claude, sells through Gumroad and Topmate to Indian and US buyers, and tests Instagram, Pinterest and Meta ads for acquisition.
Finds designers, clinics and other businesses through Google Maps and Instagram, researches them with Claude, builds sites with Hostinger and pitches the finished websites.
Explores AI video production as a YouTube-channel business and provides topic-finding and finished-video resources, connecting niche research with publishing.
Uses Claude Code with a Higgsfield connector to accelerate video production, reducing repetitive editing for small YouTube creators so they can focus on content and channel growth.
Uses Claude and Higgsfield to analyze reference shots and make brand samples, then emails agencies and production studios with a portfolio; the creator reports a $2,000 production order.
Uses ChatGPT Astra and Higgsfield to produce stick-figure animations at scale, turning scripts into repeatable YouTube output for a channel that needs no on-camera host.
Audience contentYouTube channels
32842
Showing 18 / of 77All shown
Overlapping polls, nothing counted twice: Retailbox Automation's n8n template that tracks LLM token spend per workflow, explained node by node · AISIDE