Optimize restaurant menu margins with Google Drive, Sheets and GPT-4o
Ready for 3.0What this workflow does
This AI workflow has 14 nodes and runs on Google Drive events (file created) (plus 1 other trigger). Along the way it connects Google Drive, OpenAI, Google Sheets and Gmail.
How it runs
Trigger: On Google Drive events (file created) (plus 1 other trigger).
- Download Invoice File (Google Drive): download
- Read POS Sales (Google Sheets): uses Google Sheets
- OCR Invoice with GPT-4o (OpenAI): analyze (image)
- Read Recipe Costing (Google Sheets): uses Google Sheets
- Parse Invoice Lines (Code): runs custom JavaScript code
- Read Ingredient Prices (Google Sheets): uses Google Sheets
- Log Ingredient Prices (Google Sheets): append
- Calculate Dish Margins (Code): runs custom JavaScript code
- Split Flagged Dishes (Split Out): splits a list into separate items
- Write Pricing Recommendations (OpenAI): uses OpenAI
…plus 2 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - OpenAI
@n8n/n8n-nodes-langchain.openAi - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Split Out
n8n-nodes-base.splitOut - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow ingests supplier invoice images from Google Drive, uses OpenAI GPT-4o to extract normalized ingredient unit prices into Google Sheets, then runs a weekly margin check by combining ingredient price history, recipe costing, and POS…