Personalized Hydration Reminder and Tracking System - n8n Workflow

Automate water tracking using n8n. This n8n workflow template uses a scheduled n8n trigger, Google Sheets, OpenAI for personalized reminders, and interactive Slack buttons to manage hydration goals.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Individuals aiming to improve daily hydration consistency.
Teams looking for innovative n8n templates for health and wellness tracking.
Users who need an automated system to link Slack interactions to structured data storage (Google Sheets).
Automation specialists seeking complex examples of n8n workflows combining AI, scheduling, and custom webhook logic.

Overview

Maintaining consistent hydration can be challenging. This comprehensive n8n workflow solves this by providing a highly personalized and interactive tracking system. Instead of generic alerts, the system uses an n8n node integrating OpenAI to craft empathetic, health-focused reminders based on your last logged water intake and daily progress, ensuring maximum motivation. The n8n workflow leverages a scheduled n8n trigger to check intake periodically. When a reminder is sent to Slack, the user can log their intake directly via interactive buttons. This action triggers a dedicated n8n webhook, which instantly records the data in Google Sheets and provides a special link back to an iOS Shortcut to log the data into the user's Health app. This sophisticated n8n template demonstrates how n8n can bridge communication platforms (Slack), data storage (Google Sheets), and advanced logic (OpenAI, scheduling) seamlessly.

How it Works

This n8n workflow operates via two main parallel paths:

1. The Scheduled Reminder Path (Automated Trigger)

The automation begins with the Schedule Trigger n8n node, which activates multiple times per hour between 8 AM and 11 PM.


  1. Data Retrieval: The workflow simultaneously fetches the user's daily water target from the 'setting' Google Sheet and retrieves all current day's water log entries from the main log sheet using the Google Sheets - Get Today Water Log n8n node.

  2. Data Processing: The Limit n8n node isolates the timestamp of the last drink, while the Summarize n8n node calculates the total consumed volume. This data is merged into a single item using the combine data n8n node.

  3. Progress Calculation: The Edit Fields-Set progress n8n node calculates the progress percentage and generates a visual progress bar using emojis, providing context for the reminder.

  4. Conditional Delay: The If n8n node checks if the user drank water within the last 30 minutes. If they did, the workflow is routed to the Wait n8n node, introducing a random delay (21-31 minutes) to avoid immediate nagging.

  5. AI Generation: The flow proceeds to the OpenAI n8n node, where the consumption data (last drink time, count, current time) is fed into a prompt. A custom 'Chinese medicine practitioner' persona generates a persuasive, brief, and health-focused reminder message in JSON format.

  6. Notification: Finally, the Slack send drink notification n8n node sends the AI-generated message and the interactive '100ml', '150ml', etc., action buttons to the target Slack channel, completing the scheduled n8n workflow loop.

2. The Interactive Logging Path (Webhook Trigger)

This path is initiated when a user clicks one of the action buttons in the Slack message, utilizing the slack drink webhook n8n trigger.


  1. Payload Extraction: The slackactionpayload n8n node extracts the necessary action data, including the water value and the original message timestamp (messagets).

  2. Data Preparation: The slackactiondrinkdata n8n node structures the data, specifically constructing a complex, URL-encoded string containing the logged value and timestamp, designed to be passed to an external iOS Shortcut application.

  3. Logging: The Google Sheets - log water value to sheet n8n node records the current date, time, and logged value to the main log sheet.

  4. Confirmation: The Send to Slack with confirm n8n node responds to the original thread, confirming the log and providing the crucial 'iOS Health' button containing the Shortcut URL, completing the action within this n8n workflow.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import: Copy the provided JSON and import it into your n8n instance as a new n8n template.

  2. Google Sheets Setup: You will need two sheets within one Google Spreadsheet: one for the daily log (e.g., 'Sheet1') and one for settings (e.g., 'setting') that holds the daily target goal. Update the Google Sheets n8n node credentials and Document IDs in the workflow.

  3. OpenAI Credentials: Set up your OpenAI credential using an API Key in the OpenAI n8n node. Ensure the selected model (e.g., GPT-4o-mini) is available.

  4. Slack Setup: Create a Slack credential and ensure the OAuth scope includes the ability to post messages and respond to interactions (via the Webhook n8n trigger).

  5. Webhook Configuration: Note the path of the slack drink webhook n8n trigger. You must configure Slack's interactive components settings to point to this specific n8n webhook URL. This is crucial for the logging path of the n8n workflow to function.

  6. iOS Shortcut (Optional): If integrating with the Health app, ensure the corresponding 'darrell_water' iOS Shortcut exists on your device to receive the URL-encoded JSON data sent by the final Slack confirmation n8n node.

  7. Activate: Save and activate the n8n workflow.

Node Details

Schedule Trigger: This core n8n trigger initiates the reminder part of the n8n workflow at randomized intervals between 8 AM and 11 PM to prevent repetitive timing.
slack drink webhook (n8n trigger): This dedicated n8n webhook trigger listens for interactive events (button clicks) originating from the Slack notifications.
Google Sheets (Get Target & Log Water): These n8n nodes handle all persistence. One node retrieves the daily goal, another filters to get today's log entries, and the logging n8n node appends new data when the user interacts via Slack.
Summarize: A critical n8n node that aggregates the 'value' column from the log entries to calculate the total water consumed today.
If: This n8n node implements flow control logic, diverting the n8n workflow path to a Wait n8n node if a recent drink was logged (within 30 minutes).
OpenAI: Uses the gpt-4o-mini model with custom prompt engineering to generate personalized, empathetic hydration reminder messages, improving user engagement with the n8n workflow.
Slack send drink notification: This n8n node sends the AI message and the interactive buttons to the user. It utilizes Slack Block Kit functionality for rich formatting.
slackactiondrink_data (Set n8n node): Manages data transformation for the logging path, specifically creating the complex URL-encoded string required to trigger an external iOS Shortcut with dynamic data, which is essential for this complete n8n workflow.

Related n8n Workflows

Free

Nodes: 12 Nodes
Updated: December 26 2025
View all
Created by

Martech Engineer with automation. here is my website: https://www.darrelltw.com/

Featured*