Scan Food Labels via WhatsApp

OpenAI

Lets users send food label images on WhatsApp via Superchat, then uses an AI agent to extract and reply with detailed nutrition information.

WhatsAppSuperchatNutrition AnalysisFood Labels

Overview

This workflow enables a WhatsApp-based nutrition label scanner powered by Superchat and an AI agent. Users send a photo of a food label to your WhatsApp number, and the workflow automatically extracts all nutrient values from the image and replies with a clear, readable summary — all within the WhatsApp conversation.

How It Works

  1. Webhook Trigger — A Superchat webhook fires whenever a user sends a message (image) to your WhatsApp number.
  2. Fetch the Image — An HTTP GET request retrieves the uploaded file from Superchat's API using the file ID from the incoming webhook payload. (Note: The URL should dynamically reference the file ID from the webhook data rather than using a hard-coded value.)
  3. AI Analysis — The image URL is passed to an AI agent node that analyzes the food label and extracts all nutrient values, including serving size, calories, fats, carbohydrates, protein, vitamins, and minerals.
  4. Identify the Sender — A parallel code node extracts the sender's identifier from the webhook payload so the reply goes to the right user.
  5. Merge Results — A merge node combines the AI analysis output and the sender information.
  6. Send Reply — An HTTP POST request sends the formatted nutrition breakdown back to the user on WhatsApp via Superchat's messaging API.

Workflow Nodes

NodeTypePurpose
Webhook TriggerTriggerReceives incoming WhatsApp messages from Superchat
HTTP GET (Fetch File)HTTP RequestRetrieves the food label image file from Superchat
AI AgentAI ModelAnalyzes the label image and extracts nutrient values
Code (Sender Info)CodeExtracts the sender's identifier for the reply
MergeControlCombines AI output and sender data
HTTP POST (Reply)HTTP RequestSends the nutrition summary back via WhatsApp

Prerequisites

Before setting up this workflow, make sure you have:

  • A Superchat account with an active WhatsApp number
  • Your SUPERCHAT_API_KEY, found in Superchat Settings
  • Your SUPERCHAT_CHANNEL_ID, found under your WhatsApp number settings in Superchat

Setup Steps

  1. Add the SUPERCHAT_API_KEY and SUPERCHAT_CHANNEL_ID as variables in your Needle workspace.
  2. Copy the webhook URL from the Webhook Trigger node in Needle.
  3. Paste the webhook URL into the Superchat webhook configuration so that incoming WhatsApp messages are forwarded to this workflow.
  4. Ensure the HTTP GET node dynamically references the file ID from the webhook payload (replace any hard-coded file ID placeholder like <file-id> with the actual expression pointing to the incoming data).
  5. Test by sending a photo of a food label to your WhatsApp number — you should receive a detailed nutrition breakdown within seconds.

What Gets Extracted

The AI agent reads the food label image and returns values including:

  • Serving size
  • Calories
  • Total Fat (saturated fat, trans fat)
  • Cholesterol
  • Sodium
  • Total Carbohydrates (dietary fiber, sugars)
  • Protein
  • Vitamins and minerals
  • Any other nutrients shown on the label

The response is formatted as plain text, optimized for readability in WhatsApp conversations.

Want to showcase your own workflows?

Become a Needle workflow partner and turn your expertise into recurring revenue.

Ready to vibe automate?

Join thousands of people who have transformed their workflows.

Workflows

Automations with AI agents

Collections

All your data, searchable

Chat Widget

Drop-in widget for your website

Developer API

Build AI-powered apps with ease

    We use cookies to enhance your experience on Needle and keep your data secure. Privacy Policy