Introduction
You've got three months of sales data. You know certain dishes aren't moving. You suspect your descriptions could be better. But manually comparing every item's revenue against its cost of goods, then rewriting menu copy for the performers and cutting the losers? That's hours of spreadsheet work, followed by hours of copywriting. Most restaurants skip it entirely. The gap between having data and acting on it is where restaurants lose money. A dish costs £4.50 to produce but sells for £12, yet moves only twice a week because the description says "Pasta with sauce" instead of something that actually makes people order it. Meanwhile, another item costs £6 to make, sells for £11, and barely covers margins. You need to kill it or reprice it, but that decision gets buried in routine work. This workflow automates that entire analysis cycle. You feed in your sales data and cost sheets. AI extracts what matters, identifies the real performers and the drains, then generates new menu copy for items worth keeping. Everything runs on a schedule. No spreadsheets. No manual handoff between tools.
Prerequisites
-
Total account: You'll need an active Total subscription with access to your restaurant's sales data exports. Free tier accounts may have limited historical data (typically 30 days), so a paid plan is recommended for meaningful analysis across multiple months.
-
Sales data export capability: Your point-of-sale system must allow you to export transaction records, ideally including item-level sales volumes, dates, and prices. Check that your POS provider supports CSV or Excel exports before starting.
-
Basic spreadsheet skills: Familiarity with Excel or Google Sheets is essential, specifically sorting, filtering, and creating simple formulas (SUM, AVERAGE). You don't need advanced skills, but comfort with pivot tables will accelerate your analysis.
-
Cost data from suppliers: Gather your ingredient cost breakdowns from recent invoices or supplier quotes. You'll need unit costs (per kg, per litre, per item) for each menu component to calculate profit margins accurately.
-
Setup time: Expect 2-3 hours for data export, organisation, and initial menu categorisation, plus 1-2 hours for cost mapping depending on your menu size.
-
Optional but helpful: Access to your Total API key if you plan to automate data pulls rather than manual exports. Check Total's developer documentation for authentication requirements.
The Automated Workflow
We'll use n8n for this orchestration. It handles JSON data better than Zapier for this use case, integrates easily with most APIs, and gives you fine control over how data moves between steps without cost surprises.
The flow works like this:
-
Sales and cost data lands in a Google Sheet or CSV file.
-
n8n polls for new data on a daily schedule.
-
Accio AI receives the raw data and runs structured analysis: gross profit by item, sales velocity, cost variance.
-
The results feed into Claude Opus 4.6 (via API) for deeper pattern recognition; it flags which items are actually worth keeping based on your margin thresholds.
-
Copy.ai generates five different menu descriptions for the high-performers.
-
Results go into a new Google Sheet for your review before going live.
Why n8n specifically?
It's self-hosted or cloud-based, handles large JSON payloads without rate-limiting issues, and lets you chain API calls without hitting payment cliffs when you scale to 50+ menu items.
Setting up the trigger:
Create a webhook in n8n that accepts POST requests from your point-of-sale system or a scheduled daily pull from a CSV in Google Drive. If you use Square, Toast, or Lightspeed, they have native webhooks; use those. Otherwise, schedule an n8n Cron node to run at 2 AM.
{ "trigger": "cron", "schedule": "0 2 * * *", "action": "fetch_from_google_sheets", "sheet_id": "YOUR_SHEET_ID", "range": "A1:G1000"
}
This pulls your sales data every morning. The columns should be: Item Name, Cost per Unit, Price, Units Sold (last 30 days), Total Revenue, Total COGS, Gross Profit.
Step 2: Data cleaning and enrichment
Before sending to Accio AI, n8n should standardise the data. Remove duplicates, convert all prices to pence (avoid floating-point errors), calculate missing fields if needed.
const items = input.map(row => { return { item_name: row[0].trim(), cost_per_unit: parseFloat(row[1]) * 100, price: parseFloat(row[2]) * 100, units_sold_30d: parseInt(row[3]), total_revenue: parseFloat(row[4]) * 100, total_cogs: parseFloat(row[5]) * 100, gross_profit: parseFloat(row[6]) * 100, profit_margin_pct: ((parseFloat(row[6]) / parseFloat(row[4])) * 100).toFixed(1), sales_velocity: (parseInt(row[3]) / 30).toFixed(2) };
});
Step 3: Accio AI analysis
Accio's API endpoint accepts structured data and returns insights. You're asking it to:
-
Rank items by profit margin.
-
Flag any item with <30% margin as "repricing candidate".
-
Identify items with low velocity (fewer than 2 sales per day) regardless of margin.
-
Group items by category to spot patterns (e.g. all desserts underperforming).
POST /api/v1/analyse
Content-Type: application/json
Authorization: Bearer YOUR_ACCIO_API_KEY { "data": [ { "item_name": "Beef Wellington", "cost_per_unit": 650, "price": 1800, "units_sold_30d": 8, "gross_profit": 920, "profit_margin_pct": 51.1, "sales_velocity": 0.27 } ], "analysis_type": "menu_performance", "thresholds": { "min_margin": 30, "min_daily_velocity": 2, "analysis_period_days": 30 }
}
Accio returns a JSON object with categorised items: "high_performers", "margin_at_risk", "low_velocity", "breakeven_or_loss".
Step 4: Claude Opus 4.6 contextual analysis
Pass Accio's output to Claude via API. Claude will synthesise the data and provide recommendation: "Keep and promote", "Reprice", "Reword", "Consider removing". This adds the human-judgment layer that raw metrics lack.
POST https://api.anthropic.com/v1/messages
Content-Type: application/json
Authorization: x-api-key YOUR_ANTHROPIC_API_KEY { "model": "claude-opus-4.6", "max_tokens": 2048, "messages": [ { "role": "user", "content": "Here is menu performance data from a 30-day period:\n\n{accio_analysis_json}\n\nFor each item, provide a recommendation: Keep and Promote, Reprice, Reword, or Remove. Consider: profit margin, sales velocity, and category trends. Focus on items where small changes (better description, slight price adjustment) could shift margins by 5% or more. Output as JSON." } ]
}
Claude returns something like:
json
{ "recommendations": [ { "item_name": "Beef Wellington", "recommendation": "Reprice", "reasoning": "52% margin is healthy, but only 0.27 sales/day suggests price resistance. Test 2% reduction to £1764.", "priority": "high" }, { "item_name": "House Salad", "recommendation": "Reword", "reasoning": "14% margin, but 3.1 sales/day. Description 'Mixed greens salad' is generic. Better copy can boost perceived value.", "priority": "medium" } ]
}
Step 5: Copy.ai generation
For items flagged "Reword" or "Keep and Promote", send the item name and current description to Copy.ai. Ask for five menu descriptions focused on emotional triggers, specificity, and scarcity where applicable.
POST /api/v1/generate
Content-Type: application/json
Authorization: Bearer YOUR_COPYAI_API_KEY { "campaign_id": "menu_descriptions_march_2026", "items": [ { "item_name": "House Salad", "current_description": "Mixed greens salad", "price_gbp": 8.50, "profit_margin_pct": 14, "tone": "casual_upscale", "num_variations": 5 } ]
}
Copy.ai might return:
json
{ "variations": [ "Spring greens, heirloom tomatoes, aged balsamic, crisp parmesan", "Garden salad with seasonal leaves, house vinaigrette, toasted nuts", "Mixed leaf salad with roasted vegetables and lemon dressing", "Crisp salad of mixed greens, beetroot, goat's cheese, hazelnut oil", "Fresh mixed greens with seasonal vegetables and house-made dressing" ]
}
Step 6: Terrakotta AI for comparative analysis
(Optional): If your data is messy or you want additional pattern detection across multiple data sources (e.g. feedback from reviews, staff notes), Terrakotta can clean and cross-reference. It's less critical here but useful if you pull data from multiple POS terminals or integrate customer feedback.
Step 7: Output to review sheet
n8n writes the final recommendations to a new Google Sheet with columns: Item Name, Current Description, Recommendation, Claude Reasoning, Suggested Descriptions (Copy.ai outputs), Current Margin %, Suggested Action.
PUT /api/v1/sheets/{SHEET_ID}/values
Authorization: Bearer YOUR_GOOGLE_API_KEY { "range": "Results!A2:H100", "values": [ [ "Beef Wellington", "Tender beef with pastry", "Reprice", "52% margin is healthy, but only 0.27 sales/day...", "N/A", "51.1", "Test 2% price reduction" ] ]
}
Your team reviews the sheet, approves changes, and updates the live menu. The entire cycle runs unattended.
The Manual Alternative
If you prefer more control or want to pilot this before full automation, run each step manually. Export your sales data to a CSV. Upload it to Accio AI's dashboard, review the analysis, and copy-paste the high-level findings into Claude (via ChatGPT or Claude.ai). Feed Claude's recommendations to Copy.ai, then manually compile results into a shared doc for your team. This takes 2-3 hours instead of zero, but it lets you validate assumptions before automating.
Pro Tips
1. Set margin thresholds conservatively
Start with 25% minimum margin, not 40%. Low-margin items can still be worthwhile if they drive foot traffic or pair-sell higher-margin dishes. Claude should flag these for your judgment.
2. Account for inventory cycle
If you run a 30-day analysis but some items are seasonal or newly added, you'll get noisy data. Add a "days in stock" filter; ignore items with fewer than 10 sales in the period.
3. Rate limits and cost
Accio AI allows 100 requests per minute on free tier; n8n's cloud plan handles 4,000 API calls per month included. Copy.ai charges per word generated; set a cap in your n8n node to avoid surprises. Claude Opus 4.6 costs roughly £0.015 per 1k input tokens; this workflow uses ~800 tokens per run, so daily execution costs less than 15p.
4. Handle API failures gracefully
If Accio AI times out, n8n should retry after 30 seconds and alert you after three failures. Don't let a temporary outage break the whole flow.
5. Version your descriptions
When Copy.ai generates new menu text, store the old version alongside. If the new description doesn't lift sales after two weeks, you can revert quickly. Log all changes in a separate audit sheet for accountability.
Cost Breakdown
| Tool | Plan Needed | Monthly Cost | Notes |
|---|---|---|---|
| n8n | Cloud Pro | £30 | Includes 4,000 API calls; self-hosting is free but requires infrastructure. |
| Accio AI | Professional | £20 | 100+ requests/minute, priority support. |
| Claude Opus 4.6 (via API) | Pay-as-you-go | £3–£5 | ~£0.015 per 1k tokens; one daily run costs roughly 12p. |
| Copy.ai | Team | £48 | 150k words/month. One menu analysis (5 descriptions × 50 words avg) uses ~250 words. |
| Google Sheets API | Free | £0 | Included in Google Workspace; no additional cost. |
| Total | £101–£103 | All costs assume daily execution. For weekly runs, reduce by ~60%. |
This workflow pays for itself the first time you identify and remove a single underperforming dish that was draining £200 a month in ingredient costs.