Skip to main content

Product ingredient safety analyzer with Google Gemini via WhatsApp

Workflow preview

Workflow preview
100%
Product ingredient safety analyzer with Google Gemini via WhatsApp preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Product Ingredient Safety Analyzer with AI via WhatsApp What does this workflow do? This workflow creates an intelligent WhatsApp bot that analyzes product ingredients and provides instant safety a...

Best for

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

Tools used

n8n-nodes-base.whatsapptrigger, n8n-nodes-base.switch, n8n-nodes-base.whatsapp, n8n-nodes-base.httprequest, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.outputparserstructured

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Product ingredient safety analyzer with Google Gemini via WhatsApp
Workflow name
Product ingredient safety analyzer with Google Gemini via WhatsApp

Product Ingredient Safety Analyzer with AI via WhatsApp

What does this workflow do?

This workflow creates an intelligent WhatsApp bot that analyzes product ingredients and provides instant safety assessments. Users can send either text queries (product names/brands) or images of product labels, and receive AI-powered analysis covering food, cosmetics, personal care, pharmaceuticals, and household products.

Who's it for?

  • Health-conscious consumers wanting to make informed purchasing decisions
  • Parents checking product safety for their children
  • People with allergies or sensitivities screening for harmful ingredients
  • Beauty and skincare enthusiasts verifying cosmetic product safety
  • Wellness coaches or nutritionists helping clients evaluate products
  • Small business owners offering product safety consultation services
  • Eco-conscious consumers checking for environmental toxins
  • Anyone looking to understand what's in their everyday products

What do you need to get started?

Required Accounts & APIs:

  • WhatsApp Business API - For receiving and sending messages
  • Google Cloud Account - For Document AI (OCR) service
  • Google Gemini API - For AI-powered ingredient analysis

Setup Steps:

  1. Configure WhatsApp Business API credentials
  2. Enable Google Document AI in your Google Cloud project
  3. Create a Document AI processor for OCR
  4. Set up Google Gemini API access
  5. Configure all credentials in N8N

How does this workflow work?

User Input Options:

  • Text Messages: Send product name/brand (e.g., "Dove soap", "Coca Cola")
  • Images: Upload photos of product ingredient labels
  • Conversational: Ask questions or request help

Processing Flow:

For Image Messages:

  1. WhatsApp receives image message
  2. Extracts and downloads the image
  3. Converts image to Base64 format
  4. Uses Google Document AI OCR to extract text
  5. AI analyzes extracted text + user caption
  6. Returns safety assessment via WhatsApp

For Text Messages:

  1. WhatsApp receives text query
  2. AI directly analyzes product name/ingredients
  3. Returns safety assessment via WhatsApp

AI Analysis Includes:

  • Product type identification (food, cosmetic, pharmaceutical, etc.)
  • Harmful ingredient detection (parabens, sulfates, trans fats, etc.)
  • Beneficial ingredient highlights
  • Clear safety verdict: ✅ SAFE / ⚠️ CAUTION / ❌ AVOID
  • Practical recommendations and alternatives

Response Format:

The AI provides concise, WhatsApp-friendly messages with:

  • Product category and type
  • Key ingredients found
  • Safety concerns with specific flags
  • Clear recommendation
  • Actionable advice

Use Cases

  • Health-conscious consumers checking food product ingredients
  • Beauty enthusiasts verifying cosmetic safety
  • Parents ensuring child product safety
  • People with allergies screening for harmful ingredients
  • Eco-conscious users checking for environmental toxins
  • General wellness making informed purchase decisions

Key Features

  • Dual input support: Text and image processing
  • OCR technology: Extracts text from product labels
  • Multi-category analysis: Food, cosmetics, pharmaceuticals, household items
  • Conversational AI: Handles greetings, help requests, unclear queries
  • Mobile-optimized: WhatsApp-friendly formatting
  • Instant results: Real-time safety assessments
  • Educational: Explains why ingredients are safe or harmful

Technical Highlights

  • Smart routing: Automatically detects message type (text vs image)
  • Structured output: JSON-formatted AI responses for reliability
  • Product-specific criteria: Different analysis standards per category
  • Error handling: Requests clearer images if OCR fails
  • Conversational fallback: Guides users when information is insufficient

Example Interactions

User sends image of shampoo bottle: Response: "Hair Care Product Analysis - Contains sulfates and parabens. ⚠️ USE WITH CAUTION. Consider sulfate-free alternatives for healthier hair."

User texts "Maggi noodles": Response: "Food Product Analysis - High sodium content, contains MSG and artificial colors. ❌ AVOID REGULAR CONSUMPTION. Occasional treat okay."

User texts "Hi": Response: "Hi! I'm your Product Safety Analyzer. Send me a product name or photo of ingredients to check safety!"

Benefits

  • Empowers informed decisions: Know what you're consuming/using
  • Saves research time: Instant analysis vs manual ingredient lookup
  • Accessible: Works via familiar WhatsApp interface
  • Comprehensive: Covers multiple product categories
  • Educational: Learn about ingredient safety over time
  • Convenient: Analyze products while shopping

Notes

  • OCR works best with clear, well-lit images
  • AI provides general safety information, not medical advice
  • Analysis based on commonly known ingredient safety standards
  • Users should consult professionals for specific health concerns
  • Supports conversational queries for better user experience

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

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

Block 2 - Route By Message Type

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

Block 3 - Get Image Media URL

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

Block 4 - Download Image File

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Convert Image to Base64

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

Block 6 - Extract Text via OCR

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Analyze Image Ingredients

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

Block 8 - Gemini Model (Image Branch)

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

Block 9 - JSON Parser (Image)

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

Block 10 - Send Analysis of Image

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

Block 11 - Analyze Text Query

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

Block 12 - Gemini Model (Text Branch)

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

Block 13 - JSON Parser (Text)

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

Block 14 - Send Analysis of Text

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

Block 15 - Sticky Note

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

3. Summary Table

Workflow Product ingredient safety analyzer with Google Gemini via WhatsApp
Complexity advanced
Nodes 15
Categories Support Chatbot, AI Chatbot
Author Roshan Ramani
Published 30 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9098/9098.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 Product ingredient safety analyzer with Google Gemini via WhatsApp do?

Product Ingredient Safety Analyzer with AI via WhatsApp What does this workflow do? This workflow creates an intelligent WhatsApp bot that analyzes product ingredients and provides instant safety a...

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.