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

⚡ 153 views · ⚡ Personal Productivity

Description

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

Requirements to Use This Workflow

Required Google Sheets Columns:

How It Works & How To Set Up

Step 1: Configure Webhook

Step 2: Connect Google Sheets

Step 3: Validate User

Step 4: Configure AI Analysis

Step 5: Process Data

Step 6: Monitor Thresholds

Step 7: Risk Detection

Step 8: Respond to User

Step 9: Update User Data

Step 10: Daily Reset Automation

How To Customize Nodes

Add-ons (Extend Functionality)

Use Case Examples

Troubleshooting Guide

IssuePossible CauseSolution
Webhook not receiving dataIncorrect webhook URLVerify webhook path and method
User not foundPhone mismatch in SheetsEnsure phone format matches input
AI response parsing failsInvalid JSON from AIAdjust prompt to enforce strict JSON
Slack alerts not sentIncorrect Slack credentialsReconnect Slack API
Data not updating in SheetsColumn mapping issueVerify matching column (Phone)
Calories not updatingParsing or logic issueCheck code node calculations
Daily reset not workingSchedule trigger configurationVerify 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:

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

🔗 Nodes Used

Google Sheets, Slack, Webhook, Schedule Trigger, AI Agent, OpenAI Chat Model

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup