Automate nutritional tracking with this advanced n8n workflow. It analyzes food photos sent via iMessage using GPT-4 Vision, maintains history in a Postgres database, and replies with detailed, conversational summaries. Leverage this n8n template today.
Download this n8n workflow template and start using it instantly.
Keeping a reliable food log can be tedious. This sophisticated n8n workflow solves this by turning a simple iMessage photo into a detailed nutritional report, instantly. It leverages the multimodal capabilities of GPT-4 Vision to visually analyze food images, estimate portions, and calculate caloric and nutrient totals. Critically, it utilizes a Postgres database for memory, allowing the AI to generate not just a single meal analysis, but also comprehensive daily, weekly, and monthly reports based on past submissions. This n8n automation serves as an excellent example of combining communication services, cloud storage operations, and powerful AI within a single, seamless n8n workflow. This particular n8n template streamlines the entire tracking process, making nutritional analysis as easy as sending a text message.
This powerful n8n workflow begins when the Receive Message (From Blooio) webhook n8n trigger captures an incoming message (e.g., an iMessage containing a photo).
Don't respond to yourself) ensures the automation doesn't loop by responding to its own messages.If has images, download them n8n node checks if the message includes attachments (photos).Loop Over Items n8n node then iterates through these URLs, and an HTTP Request n8n node downloads the binary image data into the n8n workflow context, ready for AI analysis.AI Agent n8n node takes the user's text and the binary image data. It utilizes the OpenAI Chat Model (GPT-4.1-mini) for multimodal analysis. Crucially, the Postgres Chat Memory n8n node provides historical context by fetching past conversation data using the message's conversation ID as the session key, enabling the generation of daily/weekly/monthly reports.Aggregate n8n node collects the results from the AI analysis, ensuring all generated data is combined into a single item.AI Agent1 n8n node uses its own OpenAI Chat Model1 to take the aggregated nutrition data and format it into a friendly, conversational iMessage-style response, following the specified output protocol.Send Message n8n node, configured as an HTTP Request to the Blooio API, transmits the final, formatted nutrition summary back to the original sender's phone number.To deploy and use this n8n template, follow these steps:
YOURAPITOKEN in the Authorization header with your actual token.OpenAI Chat Model and OpenAI Chat Model1 n8n node instances are connected to a valid OpenAI API credential. Note that GPT-4 Vision capabilities require a model like gpt-4-turbo or similar vision-enabled models (the JSON specified gpt-4.1-mini, which must support multimodal input for this n8n workflow to function as intended).Postgres Chat Memory n8n node, pointing it to your database instance (e.g., Neon or a self-hosted Postgres) where the n8ncalorietracker table will store the memory history.Receive Message (From Blooio) n8n trigger. You must configure this webhook URL within your Blooio account settings to ensure message events are sent to this n8n endpoint. Receive Message (From Blooio) (Webhook n8n trigger):
Function: Serves as the starting point, listening for incoming iMessage or SMS events from the Blooio platform.
Key Configuration: Path is set to /receive-event; Method is POST.
If has images, download them (If n8n node):
Function: Controls the flow based on the presence of attachments (food photos).
Key Configuration: Checks if the length of the attachments array ($json.body.message.attachments) is greater than 0.
Code (n8n node):
Function: Prepares the data structure by extracting the attachment URLs from the input JSON for download.
Key Configuration: Custom JavaScript to iterate and create new items containing only the url.
HTTP Request (n8n node):
Function: Downloads the image binary data from the extracted URL, essential for the AI Agent to perform visual analysis.
Key Configuration: Uses the dynamic URL ={{ $json.url }}.
AI Agent (n8n node):
Function: The central intelligence unit. It processes the text and downloaded image using GPT-4 Vision to perform detailed nutritional analysis and generates the report.
Key Configuration: Uses the OpenAI Chat Model and includes specific system instructions for nutritional analysis, confidence scoring, health rating, and requesting daily/weekly/monthly reports. It passes binary images through (passthroughBinaryImages: true).
Postgres Chat Memory (n8n node):
Function: Provides statefulness to the conversation by storing historical interactions in a PostgreSQL table (n8ncalorietracker), allowing the AI Agent to provide cumulative reports.
Key Configuration: Session Key is dynamically set using the Blooio conversation ID (={{ $('Receive Message (From Blooio)').item.json.body.message.conversation.id }}).
Send Message (HTTP Request n8n node):
Function: The final action, sending the AI-generated nutritional summary back to the user via the Blooio API.
* Key Configuration: Uses the recipient identifier (={{ $('Receive Message (From Blooio)').item.json.body.message.sender }}) and the AI output (={{ $json.output }}) in the request body.
A secure n8n workflow designed to dynamically fetch and return the public IP address(es) of the hosting n8n instance using a Header-Authenticated n8n trigger. Ideal for DevOps teams.

Use this advanced n8n workflow to expose over 30 eBay Account API operations (policies, payments, taxes, fulfillment) as tools for an external AI Agent using the specialized n8n trigger.

Automate complex eBay fulfillment, refunds, and dispute management using AI agents. This powerful n8n workflow exposes the Fulfillment API as custom AI tools, enhancing your e-commerce operations.

Master advanced n8n workflow techniques. This n8n template shows how to use the itemMatching() function in a Python code n8n node to restore original data fields after preceding data transformations.

Use this robust n8n workflow to automate complex job scraping from LinkedIn and Indeed via Bright Data. Trigger searches via an n8n form and save the aggregated job listings directly to Google Sheets for comparison.








































