Track food calories via Telegram with GPT-4 Vision and Google Sheets
Needs changesWhat this workflow does
This workflow has 7 nodes and runs on Telegram events (message). Along the way it connects Telegram, Openai and Google Sheets.
How it runs
Trigger: On Telegram events (message).
- Sticky Note: Acknowledge (Telegram): uses Telegram
- Download Telegram Image (Telegram): download (file)
- Prepare Binary Image (Function): runs custom JavaScript (legacy Function node)
- GPT-4 Vision Analyze (Openai): uses Openai
- Log to Google Sheet (Google Sheets): uses Google Sheets
- Send GPT Result (Telegram): uses Telegram
Services it uses
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- Function (legacy) in Prepare Binary Image: replace with Code node, mode 'Run Once for All Items'.
- OpenAI (legacy) in GPT-4 Vision Analyze: replace with OpenAI node (AI section).
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| Function (legacy) Prepare Binary Image | Code node, mode 'Run Once for All Items' |
| OpenAI (legacy) GPT-4 Vision Analyze | OpenAI node (AI section) |
Rarely used nodes in this template: n8n-nodes-base.openai
Nodes used (5)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Telegram
n8n-nodes-base.telegram - Function
n8n-nodes-base.function - Openai
n8n-nodes-base.openai - Google Sheets
n8n-nodes-base.googleSheets
From the author
This workflow enables users to submit food images to a Telegram bot, which uses OpenAI’s GPT-4 Vision to identify the item and estimate its caloric value. The results are stored in Google Sheets and sent back to the user. What it does: 1. Triggers on a photo…