⚡ Log daily mood & weather to Notion with Telegram and OpenWeatherMap

189 views · ⚡ Personal Productivity

Description

The Daily Mood & Weather Logger 🚀 is more than just a utility; it’s a hands-on n8n workflow designed to teach you core automation concepts. By setting up and exploring this template, you’ll gain practical experience with triggers, API calls, data manipulation using the Code node, and integrating with external services like Notion. It automates tracking your daily mood alongside local weather, logging it all into a Notion database.


🎯 Learning Objectives: What You’ll Master

This workflow template is specifically structured to help you understand and practice:


Why This Workflow? (Beyond Learning) 🤔

While the primary goal is educational, the workflow itself is useful for:


Core Features & How They Teach You 🧩

Let’s break down how each part of the workflow demonstrates key n8n concepts:

📅 Daily Automation Cycle & Triggers:

🌍 Fetching External Data (APIs):

⚙️ Processing Data (Code Node):

📝 Storing Data (Notion Integration):

Note: The template includes two paths for weather fetching (city name vs. lat/lon). This allows you to explore different ways to configure the HTTP Request node and manage input data.


Getting Started: Your Learning Lab Setup 🛠️

Set up your learning environment:

  1. Import the Workflow: Add the .json to n8n. This is your starting blueprint!

  2. Set Up Environment Variables in n8n:

    • OPEN_WEATHER_API_KEY: Your OpenWeatherMap API key.
    • City: (e.g., “Paris”) For city-based weather.
    • latitude: (e.g., “18.834366”) For coordinate-based weather.
    • longitude: (e.g., “35.352342”) For coordinate-based weather.
  3. Configure Node Credentials:

    • Telegram: Link your Telegram API credentials in the “Send Mood Prompt” and “Wait for Mood Response” nodes.
    • Notion: Connect your Notion API credentials in the “Retrieve Database” and “Add row into Notion” nodes.
  4. Personalize Node Settings (Experiment Here!):

    • Daily Trigger (Cron Node): Change the “Trigger Times”. How does this affect when the workflow runs?

    • Send Mood Prompt (Telegram Node):

      • Update the Chat ID (e.g., from =83495863) to your own.
      • Modify the Text of the prompt.
    • Notion Nodes:

      • Set your target Database ID (e.g., replace 20e9c592...).
      • Ensure your Notion database has properties like city, description, temperature, mood, etc., as defined in the “Add row into Notion” node. Try adding or removing properties to see what happens!
    • Weather Fetching Path:

      • Experiment with enabling one path (city name or lat/lon) and disabling the other. Observe how the HTTP Request node parameters differ. Ensure relevant environment variables are set.
  5. Activate and Test: Turn the workflow ON. Trigger it manually or wait for the Cron. Check each node’s output to understand the data flow.


How The Automation Works (A Learning Recap) ⚙️

Follow the data and actions:

  1. TRIGGER: Cron node (scheduled) or Telegram Trigger (event-based after prompt).
  2. ACTION (Prompt): Telegram node sends a message.
  3. INPUT (User): You reply to the Telegram message.
  4. API CALL: HTTP Request node fetches weather using your API key and location.
  5. CODE PROCESSING: Code node merges your mood and the weather data.
  6. DATABASE WRITE: Notion node creates a new entry with the combined data.

Use the n8n execution log to inspect the input and output of each node. This is invaluable for learning and debugging!


Next Steps in Your Learning Journey 🚀

Once you’re comfortable, try these to deepen your understanding:


Requirements (Your Learning Kit) 📋

May your mood tracking be seamless and your weather always logged!

🔗 Nodes Used

Cron, HTTP Request, Telegram, Telegram Trigger, Notion

📥 Import

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

📖 Importing guide · 🔑 Credential setup