Skip to main content

Analyze product ingredient photos with Telegram & Gemini 2.5 Flash

Workflow preview

Workflow preview
100%
Analyze product ingredient photos with Telegram & Gemini 2.5 Flash preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Analyze Ingredient Photos using Telegram & Gemini AI Who’s it for Skincare enthusiasts who want to know if a product is safe. Food or supplement buyers checking ingredient safety. Parents reviewing...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.telegramtrigger, @n8n/n8n-nodes-langchain.googlegemini, n8n-nodes-base.telegram, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.switch, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Parth Pansuriya.

Original n8n.io source

1.1 Workflow description

Title
Analyze product ingredient photos with Telegram & Gemini 2.5 Flash
Workflow name
Analyze product ingredient photos with Telegram & Gemini 2.5 Flash

Analyze Ingredient Photos using Telegram & Gemini AI

Who’s it for

  • Skincare enthusiasts who want to know if a product is safe.
  • Food or supplement buyers checking ingredient safety.
  • Parents reviewing kids’ products.
  • Anyone wanting quick ingredient analysis before using/buying a product.

How it works / What it does

  1. Telegram Input – User sends a photo of a product label or a text list of ingredients.
  2. Photo Handling – Workflow checks if the message contains a photo.
    • If yes → retrieves the file, extracts ingredients using Google Gemini AI.
    • If no → handles text/greetings/off-topic queries.
  3. Caption Branching
    • With caption → Gives Use / Do Not Use recommendation + reason.
    • Without caption → Gives Advantages, Disadvantages, Recommended For, Not Recommended For (3 points each).
  4. Response on Telegram – Sends a friendly, structured response back to the user.

How to set up

  1. Import this workflow JSON into n8n.
  2. Create and connect a Telegram bot via BotFather → paste the API token in Telegram credentials.
  3. Add Google Gemini (PaLM) API credentials inside n8n.
  4. Activate the workflow and send your first product photo via Telegram!

Requirements

  1. n8n instance (self-hosted or cloud).
  2. Telegram bot token.
  3. Google Gemini API credentials.

How to customize the workflow

  • Change AI Instructions – Update system messages to tweak tone (more technical, casual, or medical).
  • Adjust Output Format – Edit Telegram response nodes for shorter/longer answers.
  • Expand Analysis – Add extra categories (e.g., allergens, environmental impact).
  • Multi-language Support – Modify prompts to output in the user’s preferred language.
  • Add Database Logging – Connect to MySQL, PostgreSQL to save conversations (user queries + AI responses).

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 - Google Gemini Chat Model

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

Block 2 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 3 - Google Gemini Chat Model1

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

Block 4 - Structured Output Parser1

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 5 - Google Gemini Chat Model2

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

Block 6 - Get a Message photo/text

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

Block 7 - Analyzes product images using Google Gemini

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

Block 8 - Retrieves photo file from Telegram

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

Block 9 - Analyzes ingredients with user caption (Use/Do Not Use decision)

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

Block 10 - Sends Use/Do Not Use recommendation

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

Block 11 - Analyzes ingredients without caption (detailed analysis)

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

Block 12 - Sends detailed ingredient analysis

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

Block 13 - Routes based on caption presence

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 14 - Handles text messages and greetings

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

Block 15 - Sends conversational responses

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

Block 16 - Checks if message contains photo

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 17 - Sticky Note

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

3. Summary Table

Workflow Analyze product ingredient photos with Telegram & Gemini 2.5 Flash
Complexity advanced
Nodes 17
Categories Support Chatbot, AI Chatbot
Author Parth Pansuriya
Published 30 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9112/9112.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 Analyze product ingredient photos with Telegram & Gemini 2.5 Flash do?

Analyze Ingredient Photos using Telegram & Gemini AI Who’s it for Skincare enthusiasts who want to know if a product is safe. Food or supplement buyers checking ingredient safety. Parents reviewing...

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 Support Chatbot, AI Chatbot use case.