No-Code AI Nutrition Agent
A Telegram agent that reads a photo of someone's diet, finds a nutritionally close food substitute using real USDA data, and explains the trade-offs, built end to end in Make as a hands-on AI agent exercise.
A diet substitution, answered without waiting for the nutritionist
Someone on a prescribed diet sends a photo of that diet plus a caption naming the food they don't have on hand. The agent reads the photo, looks up real nutrition data, and replies with a substitute close enough to the original, the adjusted quantity, and what's different. It's informative, not prescriptive: it flags meaningful differences and tells the person to confirm the swap with their nutritionist.
The brief
Help someone mid-diet swap a food they don't have at home for a nutritionally close one, instantly, over chat.
What changed in practice
The brief specified WhatsApp. Meta's WhatsApp Business API required business verification even in the sandbox environment, so the channel became Telegram instead, same logic, different transport.
Four services, one orchestrator
The scenario runs on Make, coordinating a Telegram bot, Google Gemini AI, and the USDA FoodData Central API across eight steps.
Receive the message
The scenario triggers when text or a photo reaches the bot.
Decide the path
With a photo, it reads the diet. Text only, and the bot asks for the photo instead.
Download the photo
Fetches the sent file at its largest available size.
Upload it to Gemini
Makes the image available for the model to read.
Read the diet
Extracts the missing food, the meal, the prep, the quantity, the sides, and two candidate substitutes into structured fields.
Check real nutrition data
Three USDA FoodData Central lookups: the original food and both candidates.
Choose the substitute
Compares the real values, converts to the prescribed portion, and settles on a primary swap plus a backup.
Reply to the user
Sends the recommended swap, the comparison, the differences, and a reminder to confirm with the nutritionist.
The swap in step 7 is decided from the numbers USDA actually returned in step 6, not values the model recalls from memory. When those numbers don't support a good swap, the agent says so: in one test run, both candidates came back as fruit, and the reply stated there was no equivalent protein option instead of forcing one.From testing
A working scenario, tested with a real diet photo
The full flow, built and published in Make, open to view:
View the scenario on Make
A real exchange from testing, diet photo in, substitute out:
The user sends the diet photo with "Não tenho filé de frango" ("I don't have chicken breast"); the agent replies with the tilapia swap, a backup option, and the nutritionist reminder.
"To replace 150g of grilled chicken breast (226.5 kcal, 45.75g protein, 4.76g fat, 0g carbs), the best option is tilapia. Recommended swap: about 175g grilled tilapia, with 224 kcal, 45.85g protein, 4.64g fat and 0g carbs. Backup: 150g ribeye, with 312 kcal and 15.45g fat, noticeably higher in calories and fat than the prescription. Your nutritionist may have their own substitution list; confirm the swap with them."Another test run (the same agent; Gemini's substitute pick varies by run)
What ran it, and what it taught
- →Telegram Bot — message in, message out, no business verification gate.
- →Google Gemini AI — reads the photo, extracts structured data, drafts the final reply.
- →USDA FoodData Central — the real nutrition values the decision is actually based on.
- →Make — orchestrates all three into one scenario.
Real data beats model memory
Grounding the decision in a live USDA lookup, not what the model recalls, is what let it catch a bad candidate instead of confidently proposing fruit as a protein swap.
A scope change is still a real constraint
WhatsApp's business verification requirement forced a mid-project channel change to Telegram, the same lesson any client integration teaches: channels have their own approval gates.
Non-determinism needs a guardrail
Gemini suggests different substitutes on different runs. The agent is designed to say when the data doesn't support a good swap rather than force one through.
Scope boundaries matter in health contexts
The agent stays informative and defers to the nutritionist by design. Dietary restrictions beyond what's typed in the caption are still untested.