Skip to main content

Track nutrition and fitness via webhook with OpenAI, Google Sheets and Slack alerts

Workflow preview

Workflow preview
100%
Track nutrition and fitness via webhook with OpenAI, Google Sheets and Slack alerts preview
Open on n8n.io

1. Workflow Overview

AI Nutrition Tracker with Webhook, OpenAI, Google Sheets & Slack Alerts This workflow is an AI powered nutrition and fitness tracking system built in n8n . It receives user input via webhook, analy...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.googlesheets, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.code, n8n-nodes-base.slack

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Track nutrition and fitness via webhook with OpenAI, Google Sheets and Slack alerts
Workflow name
Track nutrition and fitness via webhook with OpenAI, Google Sheets and Slack alerts

AI Nutrition Tracker with Webhook, OpenAI, Google Sheets & Slack Alerts

This workflow is an AI-powered nutrition and fitness tracking system built in n8n. It receives user input via webhook, analyzes food or activity using AI, updates daily calorie and protein intake in Google Sheets and sends alerts via Slack when limits or risks are detected. It also resets daily metrics automatically using a scheduled trigger.

Quick Start Guide (Fast Implementation)

  1. Connect your Google Sheets account with required columns.
  2. Configure OpenAI API credentials.
  3. Set up Slack integration for alerts.
  4. Deploy the Webhook node for receiving user input.
  5. Enable the Schedule Trigger for daily reset.
  6. Test by sending a sample message (food/activity) to the webhook.

What It Does

This workflow automates real-time nutrition tracking by processing user input such as food consumption or physical activities. When a user sends a message through a webhook, the system fetches their profile data from Google Sheets and validates their existence before continuing.

The input is then analyzed using an AI model that classifies it as food or activity. Based on this classification, it estimates calories, protein intake, calories burned and identifies potential health risks. The processed data is combined with existing user metrics to maintain an updated daily summary.

Additionally, the workflow monitors calorie thresholds and risk patterns. If a user exceeds their daily calorie target or shows unhealthy behavior patterns, alerts are sent to Slack. A scheduled process resets all users’ daily metrics, ensuring accurate tracking for each new day.

Who’s It For

  • Fitness app developers
  • Health and wellness platforms
  • Personal trainers and nutritionists
  • Automation engineers building health tracking systems
  • Businesses managing user diet and activity tracking

Requirements to Use This Workflow

  • n8n instance (self-hosted or cloud)
  • Google Sheets account with a structured sheet
  • OpenAI API credentials
  • Slack workspace with API access
  • Basic understanding of webhook usage

Required Google Sheets Columns:

  • Name
  • Phone (used as unique identifier)
  • Goal
  • Daily_Calorie_Target
  • Consumed_Calories
  • Protein
  • Last_Meal
  • Status
  • Risk_Count

How It Works & How To Set Up

Step 1: Configure Webhook

  • Node: Receive User Input
  • Set webhook path (e.g., /diet-input)
  • This endpoint will receive user messages (food/activity input).

Step 2: Connect Google Sheets

  • Node: Fetch User Data
  • Map Phone column with incoming webhook data (body.phone).
  • Ensure correct Sheet ID and Sheet Name.

Step 3: Validate User

  • Node: Validate User Exists
  • Ensures only valid users are processed.

Step 4: Configure AI Analysis

  • Node: AI Nutrition Analyzer Uses OpenAI model to:
  • Detect input type (FOOD / ACTIVITY)
  • Estimate calories & protein
  • Detect risks
  • Generate suggestions and replies
  • Node: AI Model (GPT)
  • Ensure OpenAI credentials are properly connected.

Step 5: Process Data

  • Node: Process Nutrition Data Updates: Total calories, Protein intake and Risk count.
  • Handles both food intake and activity adjustments.

Step 6: Monitor Thresholds

  • Node: Check Calorie Threshold
  • Sends Slack alert if calorie limit is exceeded.

Step 7: Risk Detection

  • Node: Check Health Risk: Sends alert if any risk is detected.
  • Node: Check Critical Risk: Sends critical alert if risk count >= 3.

Step 8: Respond to User

  • Node: Send API Response Returns: AI-generated reply, calories consumed and daily total.

Step 9: Update User Data

  • Node: Update User Data
  • Writes updated metrics back to Google Sheets.

Step 10: Daily Reset Automation

  • Node: Daily Reset Trigger
  • Node: Fetch All Users → Reset Daily Stats Resets: Calories = 0, Protein = 0, Risk Count = 0, Status = NEW_DAY.

How To Customize Nodes

  • AI Prompt (AI Nutrition Analyzer): Modify calorie logic, risk definitions or add new dietary rules.
  • Calorie Threshold: Change comparison logic based on different fitness goals.
  • Slack Messages: Customize alert messages and formatting.
  • Google Sheets Mapping: Add more fields like carbs, fats or water intake.
  • Webhook Input Structure: Adjust input format if integrating with mobile apps or chatbots.

Add-ons (Extend Functionality)

  • Add WhatsApp/SMS notifications for user alerts.
  • Integrate with mobile apps for real-time tracking.
  • Add meal history logging.
  • Include weekly/monthly analytics dashboards.
  • Add AI meal recommendations based on user goals.
  • Integrate wearable data (steps, workouts).

Use Case Examples

  • Fitness App Backend: Automatically track user diet and activity in real time.
  • Personal Trainer Dashboard: Monitor client calorie intake and risks.
  • Corporate Wellness Programs: Track employee health metrics and send alerts.
  • Diet Coaching Automation: Provide AI-based suggestions and feedback.
  • Health Monitoring Systems: Detect unhealthy patterns and escalate alerts.

Troubleshooting Guide

Issue Possible Cause Solution
Webhook not receiving data Incorrect webhook URL Verify webhook path and method
User not found Phone mismatch in Sheets Ensure phone format matches input
AI response parsing fails Invalid JSON from AI Adjust prompt to enforce strict JSON
Slack alerts not sent Incorrect Slack credentials Reconnect Slack API
Data not updating in Sheets Column mapping issue Verify matching column (Phone)
Calories not updating Parsing or logic issue Check code node calculations
Daily reset not working Schedule trigger configuration Verify interval settings

Need Help?

If you need assistance setting up this workflow, customizing AI logic or building advanced automation features, our n8n development team at WeblineIndia is here to help.

We specialize in:

  • n8n workflow automation
  • AI-powered business solutions
  • Custom integrations and scaling systems

📩 Reach out to WeblineIndia to accelerate your automation journey and build powerful, production-ready workflows tailored to your needs.

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 - Sticky Note

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

Block 2 - Receive User Input

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 3 - Fetch User Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 4 - Validate User Exists

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 5 - AI Nutrition Analyzer

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

Block 6 - AI Model (GPT)

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 7 - Process Nutrition Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Check Calorie Threshold

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - Alert: Calorie Limit Exceeded

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 10 - Check Health Risk

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 11 - Alert: Health Risk

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 12 - Check Critical Risk

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 13 - Alert: Critical Health Issue

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 14 - Send API Response

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 15 - Update User Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 16 - Daily Reset Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 17 - Fetch All Users

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 18 - Reset Daily Stats

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 19 - Sticky Note1

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

Block 20 - Sticky Note2

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

Block 21 - Sticky Note3

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

Block 22 - Sticky Note4

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

Block 23 - Sticky Note5

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

Block 24 - Sticky Note6

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

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Track nutrition and fitness via webhook with OpenAI, Google Sheets and Slack alerts
Complexity advanced
Nodes 25
Categories Personal Productivity, AI Chatbot
Author WeblineIndia
Published 07 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14858/14858.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 Track nutrition and fitness via webhook with OpenAI, Google Sheets and Slack alerts do?

AI Nutrition Tracker with Webhook, OpenAI, Google Sheets & Slack Alerts This workflow is an AI powered nutrition and fitness tracking system built in n8n . It receives user input via webhook, analy...

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 Personal Productivity, AI Chatbot use case.