Skip to main content

Automate restaurant sales & inventory forecasting with Gemini AI & Google Sheets

Workflow preview

Workflow preview
100%
Automate restaurant sales & inventory forecasting with Gemini AI & Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This automated n8n workflow performs weekly forecasting of restaurant sales and raw material requirements using historical data from Google Sheets and AI predictions powered by Google Gemini. The f...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.toolthink, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.gmail

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Oneclick AI Squad.

Original n8n.io source

1.1 Workflow description

Title
Automate restaurant sales & inventory forecasting with Gemini AI & Google Sheets
Workflow name
Automate restaurant sales & inventory forecasting with Gemini AI & Google Sheets

This automated n8n workflow performs weekly forecasting of restaurant sales and raw material requirements using historical data from Google Sheets and AI predictions powered by Google Gemini. The forecast is then emailed to stakeholders for efficient planning and waste reduction.

What is Google Gemini AI?

Google Gemini is an advanced AI model that analyzes historical sales data, seasonal patterns, and market trends to generate accurate forecasts for restaurant sales and inventory requirements, helping optimize purchasing decisions and reduce waste.

Good to Know

  • Google Gemini AI forecasting accuracy improves over time with more historical data
  • Weekly forecasting provides better strategic planning compared to daily predictions
  • Google Sheets access must be properly authorized to avoid data sync issues
  • Email notifications ensure timely review of weekly forecasts by stakeholders
  • The system analyzes trends and predicts upcoming needs for efficient planning and waste reduction

How It Works

  1. Trigger Weekly Forecast - Automatically starts the workflow every week at a scheduled time
  2. Load Historical Sales Data - Pulls weekly sales and material usage data from Google Sheets
  3. Format Input for AI Agent - Transforms raw data into a structured format suitable for the AI Agent
  4. Generate Forecast with AI - Uses Gemini AI to analyze trends and predict upcoming needs
  5. Interpret AI Forecast Output - Parses the AI's response into readable, usable JSON format
  6. Log Forecast to Google Sheets - Stores the new forecast data back into a Google Sheet
  7. Email Forecast Summary - Sends a summary of the forecast via Gmail for stakeholder review

Data Sources

The workflow utilizes Google Sheets as the primary data source:

  1. Historical Sales Data Sheet - Contains weekly sales and inventory data with columns:

    • Week/Date (date)
    • Menu Item (text)
    • Sales Quantity (number)
    • Revenue (currency)
    • Raw Material Used (number)
    • Inventory Level (number)
    • Category (text)
  2. Forecast Output Sheet - Contains AI-generated predictions with columns:

    • Forecast Week (date)
    • Menu Item (text)
    • Predicted Sales (number)
    • Recommended Inventory (number)
    • Material Requirements (number)
    • Confidence Level (percentage)
    • Notes (text)

How to Use

  • Import the workflow into n8n
  • Configure Google Sheets API access and authorize the application
  • Set up Gmail credentials for forecast report delivery
  • Create the required Google Sheets with the specified column structures
  • Configure Google Gemini AI API credentials
  • Test with sample historical sales data to verify predictions and email delivery
  • Adjust forecasting parameters based on your restaurant's specific needs
  • Monitor and refine the system based on actual vs. predicted results

Requirements

  1. Google Sheets API access
  2. Gmail API credentials
  3. Google Gemini AI API credentials
  4. Historical sales and inventory data for initial training

Customizing This Workflow

Modify the Generate Forecast with AI node to focus on specific menu categories, seasonal adjustments, or local market conditions. Adjust the email summary format to match your restaurant's reporting preferences and add additional data sources like supplier information, weather data, or special events calendar for more accurate predictions.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Workflow Explanation

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Trigger Weekly Forecast

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 3 - Load Historical Sales Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 4 - Format Input for AI Agent

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Generate Forecast with AI

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 6 - AI Think Tool

Type / Role
@n8n/n8n-nodes-langchain.toolThink - toolThink
Config choices
Version 1

Block 7 - Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 8 - Interpret AI Forecast Output

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Log Forecast to Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 10 - Email Forecast Summary

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automate restaurant sales & inventory forecasting with Gemini AI & Google Sheets
Complexity advanced
Nodes 17
Categories Document Extraction, AI Summarization
Author Oneclick AI Squad
Published 14 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5983/5983.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate restaurant sales & inventory forecasting with Gemini AI & Google Sheets do?

This automated n8n workflow performs weekly forecasting of restaurant sales and raw material requirements using historical data from Google Sheets and AI predictions powered by Google Gemini. The f...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.