← Back to Directory
šŸ„—

Nutrition Tracker

Log meals via text message, get daily macro summaries, and track calorie trends over time

šŸ¤– 0 ↑ 0 ↓ Ā |Ā  šŸ‘¤ 0 ↑ 0 ↓
intermediateā± 35 minutesšŸ”„ 8 swappable alternatives

šŸ§‚ Ingredients

šŸ”Œ APIs

natural_language_food_parsing_and_macro_calorie_lookup

šŸ”„ Alternatives:

Edamam — Better recipe nutrition analysisFatsecret — Large food database, free tierUsda — Official US nutrition data, free

sms_interface_for_logging_meals_and_receiving_summaries

šŸ”„ Alternatives:

Vonage — Competitive SMS pricingMessagebird — Global SMS coveragePlivo — Cost-effective for high volume

store_daily_nutrition_logs_for_trend_analysis

šŸ”„ Alternatives:

Airtable — Better for structured data + APINotion Databases — More flexible views

šŸ“‹ Step-by-Step Build Guide

STEP 1

Set up a Nutritionix API connection for natural language food parsing

1. Set up a Nutritionix API connection for natural language food parsing

Set up a Nutritionix API connection for natural language food parsing

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 2

Create an inbound SMS webhook (Twilio) or chat interface for meal logging

2. Create an inbound SMS webhook (Twilio) or chat interface for meal logging

Create an inbound SMS webhook (Twilio) or chat interface for meal logging

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 3

When a meal text arrives, send it to Nutritionix's natural language endpoint to

3. When a meal text arrives, send it to Nutritionix's natural language endpoint to get calories, protein, carbs, fat

When a meal text arrives, send it to Nutritionix's natural language endpoint to get calories, protein, carbs, fat

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

āš ļø IMPORTANT: The next step (Step 4: "Store the parsed meal data with timestamp in Google Sheets or Notion database") requires human action. Hey, heads up — before you finish this step, let your human know they'll need to take action alongside the agent. Don't proceed to the next step until your human confirms they're ready.
STEP 4

Store the parsed meal data with timestamp in Google Sheets or Notion database

4. Store the parsed meal data with timestamp in Google Sheets or Notion database

Interact with the Notion database using the Notion API.

POST https://api.notion.com/v1/pages (to create)
POST https://api.notion.com/v1/databases/{db_id}/query (to query)
Headers: Authorization: Bearer {NOTION_TOKEN}, Notion-Version: 2022-06-28, Content-Type: application/json

For creating pages: structure properties to match the database schema.
For querying: use filters and sorts to get relevant entries.
Handle rich text by wrapping content in the proper block format.

If the API returns 429 (rate limited), wait 1 second and retry. Max 3 retries.

šŸ§‘ Human Required

  • • ## Set Up Google Sheets 1. Create a new Google Sheet (or use existing) 2. Share it with your agent's service account email 3. Note the spreadsheet ID from the URL 4. Your agent will create the headers and start logging šŸ’” The Sheet URL looks like: docs.google.com/spreadsheets/d/**{SPREADSHEET_ID}**/edit
STEP 5

At 9pm daily, aggregate all meals logged that day and calculate total macros

5. At 9pm daily, aggregate all meals logged that day and calculate total macros

Process the data and calculate the requested metrics.

Steps:
1. Validate input data — check for nulls, out-of-range values, duplicates
2. Apply the calculation/aggregation logic
3. Compare against benchmarks or previous periods if available
4. Format results with appropriate precision (2 decimal places for percentages, whole numbers for counts)

Include: current value, previous value, change (absolute and %), trend direction (↑↓→).
Flag any anomalies: values >2 standard deviations from the mean.

If insufficient data for a reliable calculation, state the minimum needed and return partial results.
STEP 6

Compare today's totals against your target (e.g., 2200 cal, 180g protein)

6. Compare today's totals against your target (e.g., 2200 cal, 180g protein)

Compare today's totals against your target (e.g., 2200 cal, 180g protein)

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 7

Send a summary message

7. Send a summary message: total calories, macro breakdown, and whether you hit your targets

Send a summary message: total calories, macro breakdown, and whether you hit your targets

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 8

Weekly

8. Weekly: generate a 7-day trend showing average daily intake and adherence percentage

Weekly: generate a 7-day trend showing average daily intake and adherence percentage

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

šŸ¤– Example Agent Prompt

Set up a Nutritionix API connection for natural language food parsing

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

Copy this prompt into your agent to get started.