Skip to main content

Predict restaurant food waste with Gemini AI and Google Sheets reporting

Workflow preview

Workflow preview
100%
Predict restaurant food waste with Gemini AI and Google Sheets reporting 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 daily forecasting of sales and raw material needs for a restaurant. By analyzing historical data and predicting future usage with AI, businesses can minimize fo...

Best for

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

Tools used

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

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
Predict restaurant food waste with Gemini AI and Google Sheets reporting
Workflow name
Predict restaurant food waste with Gemini AI and Google Sheets reporting

This automated n8n workflow performs daily forecasting of sales and raw material needs for a restaurant. By analyzing historical data and predicting future usage with AI, businesses can minimize food waste, optimize inventory, and improve operational efficiency. The forecast is stored in Google Sheets and sent via email for easy review by staff and management.

What is AI Forecast Generator?

The AI Forecast Generator is a machine learning component that analyzes historical sales data, weather patterns, and seasonal trends to predict future food demand and recommend optimal inventory levels to minimize waste.

Good to Know

  • AI forecasting accuracy improves over time with more historical data
  • Weather and seasonal factors significantly impact food demand predictions
  • Google Sheets access must be properly authorized to avoid data sync issues
  • Email notifications help ensure timely review of daily forecasts
  • The system works with two main data sources: historical food wastage data and predicted low-waste food requirements

How It Works

  1. Daily Trigger - Initiates the workflow every day to perform food waste prediction
  2. Fetch Historical Sales Data - Reads past food usage & sales data from Google Sheets to understand trends
  3. Format Data for AI Forecasting - Cleans and organizes raw data into a structured format for AI processing
  4. AI Forecast Generator - Uses Gemini AI to forecast food demand and recommend waste reduction strategies
  5. Clean & Structure AI Output - Parses AI response into structured and actionable format for reporting
  6. Log Forecast to Google Sheets - Stores AI-generated forecast back into Google Sheets for historical tracking
  7. Create Email Summary - Creates a concise, human-friendly summary of the forecast findings
  8. Send Email Forecast Report - Delivers the forecast report via email to decision makers and management

Data Sources

The workflow utilizes two Google Sheets:

  1. Food Wastage Data Sheet - Contains historical data with columns:

    • Date (date)
    • Food Item (text)
    • Quantity Wasted (number)
    • Cost Impact (currency)
    • Category (text)
    • Reason for Waste (text)
  2. Predicted Food Data Sheet - Contains AI predictions with columns:

    • Date (date)
    • Food Item (text)
    • Predicted Demand (number)
    • Recommended Order Quantity (number)
    • Waste Risk Level (text)
    • Optimization Notes (text)

How to Use

  • Import the workflow into n8n
  • Configure Google Sheets API access and authorize the application
  • Set up email credentials for forecast report delivery
  • Create the two required Google Sheets with the specified column structures
  • Configure the AI model credentials (Gemini API key)
  • Test with sample historical 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. Email service credentials (Gmail, SMTP, etc.)
  3. AI model API credentials (Gemini AI)
  4. Historical food wastage data for initial training

Customizing This Workflow

Modify the AI Forecast Generator prompts to focus on specific food 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 or menu planning data.

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 - Daily Trigger

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

Block 2 - Fetch Historical Sales Data

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

Block 3 - Format Data for AI Forecasting

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

Block 4 - AI Forecast Generator

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

Block 5 - Clean & Structure AI Output

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

Block 6 - Log Forecast to Google Sheets

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

Block 7 - Create Email Summary

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

Block 8 - Send Email Forecast Report

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

Block 9 - Sticky Note

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

Block 10 - Sticky Note1

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

Block 11 - Sticky Note2

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

Block 12 - Sticky Note3

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

Block 13 - Sticky Note4

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

Block 14 - Sticky Note5

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

Block 15 - Sticky Note6

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

Block 16 - Sticky Note7

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

Block 17 - Sticky Note8

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

Block 18 - Chat Model

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

Block 19 - Mind

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

Block 20 - Chat Model for Query

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

Block 21 - Mind For Think

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

3. Summary Table

Workflow Predict restaurant food waste with Gemini AI and Google Sheets reporting
Complexity advanced
Nodes 21
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/5982/5982.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 Predict restaurant food waste with Gemini AI and Google Sheets reporting do?

This automated n8n workflow performs daily forecasting of sales and raw material needs for a restaurant. By analyzing historical data and predicting future usage with AI, businesses can minimize fo...

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.