⚡ Analyze food ingredients from Telegram photos using Gemini and Airtable

244 views · ⚡ Personal Productivity

Description

Analyze food ingredients from Telegram photos using Gemini and Airtable

telegram_demo.png

🛡️ Personal Ingredient Bodyguard

Turn your Telegram bot into an intelligent food safety scanner. This workflow analyzes photos of ingredient labels sent via Telegram, extracts the text using AI, and cross-references it against your personal database of “Good” and “Bad” ingredients in Airtable.

It solves the problem of manually reading tiny, complex labels for allergies or dietary restrictions. Whether you are Vegan, Halal, allergic to nuts, or just avoiding specific additives, this workflow acts as a strict, personalized bodyguard for your diet. It even features a customizable “Persona” (like a Sarcastic Bodyguard) to make safety checks fun.

🎯 Who is it for?

🚀 How it works

  1. Trigger: You send a photo of a product label to your Telegram Bot.
  2. Fetch Rules: The workflow retrieves your active “Watchlist” (Ingredients to avoid/prefer) and “Persona” settings from Airtable.
  3. Vision & Logic: It uses an AI Vision model to extract text from the image (OCR) and Google Gemini to analyze the text against your strict veto rules (e.g., “Safe” only if ZERO bad items are found).
  4. Response: The bot replies instantly on Telegram with a Safe/Unsafe verdict, highlighting detected ingredients using HTML formatting.
  5. Log: The result is saved back to Airtable for your records. Screenshot 20251123 142943.png

⚙️ How to set up

This workflow relies on a specific Airtable structure to function as the “Brain.”

  1. Set up Airtable
  2. Set up Telegram
    • Message @BotFather on Telegram to create a new bot and get your API Token.
    • Add your Telegram credentials in n8n.
  3. Configure AI
    • Add your Google Gemini API credentials.
    • Note on OCR: This template is configured to use a local LLM for OCR to save costs (via the OpenAI-compatible node). If you do not have a local model running, simply swap the “OpenAI Chat Model” node for a standard GPT-4o or Gemini Vision node.

📋 Requirements

🎨 How to customize

⚠️ Disclaimer

This tool is for informational purposes only.

  1. Not Medical Advice: Do not rely on this for life-threatening allergies.
  2. AI Limitations: OCR can misread text, and AI can hallucinate.
  3. Verify: Always double-check the physical product label.

Use at your own risk.

🔗 Nodes Used

Airtable, Telegram, Telegram Trigger, AI Agent, OpenAI Chat Model, Google Gemini Chat Model

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup