{
  "name": "Hourly",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        816,
        -304
      ],
      "id": "22b55036-bfec-41c0-bd13-4b17d256395d",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "cityName": "Kolkata"
      },
      "type": "n8n-nodes-base.openWeatherMap",
      "typeVersion": 1,
      "position": [
        1040,
        -496
      ],
      "id": "b70439f6-fff5-4f99-97f7-094aa1bbc27b",
      "name": "OpenWeatherMap",
      "credentials": {
        "openWeatherMapApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "https://icanhazdadjoke.com/",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1040,
        -304
      ],
      "id": "c64fd0c8-35d7-445e-b7ae-e3dfb9f6d78f",
      "name": "Get Joke"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "85836ed9-6a2a-4f84-90ab-a63d4f869b3d",
              "name": "emailSubject",
              "value": "Hourly \u23f3",
              "type": "string"
            },
            {
              "id": "495c5408-19e1-4cba-8c72-3a98b43d8b6b",
              "name": "emailBody",
              "value": "=<div style=\"font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; padding: 15px; max-width: 600px; margin: 0 auto; line-height: 1.5; font-size: 13px;\">\n\n  <div style=\"border-bottom: 2px solid; padding-bottom: 10px; margin-bottom: 25px;\">\n    <h2 style=\"margin: 0; font-size: 20px; text-transform: uppercase;\">Hourly Briefing Report</h2>\n  </div>\n\n  <div style=\"margin-bottom: 25px;\">\n    <h3 style=\"font-size: 14px; text-transform: uppercase; margin: 0 0 10px 0;\">[WEATHER STATS]</h3>\n    <ul style=\"padding-left: 20px; margin: 0;\">\n      <li>Conditions: {{ $json.weather.description }}</li>\n      <li>Temp      : {{ $json.weather.temp }}\u00b0C</li>\n      <li>Feels Like: {{ $json.weather.feels_like }}\u00b0C</li>\n      <li>Min/Max   : {{ $json.weather.temp_min }}\u00b0C / {{ $json.weather.temp_max }}\u00b0C</li>\n      <li>Humidity  : {{ $json.weather.humidity }}%</li>\n      <li>Pressure  : {{ $json.weather.pressure }} hPa</li>\n      <li>Visibility: {{ $json.weather.visibility / 1000 }} km</li>\n      <li>Wind      : {{ $json.weather.speed }} m/s ({{ $json.weather.deg }}\u00b0)</li>\n    </ul>\n  </div>\n\n  <div style=\"margin-bottom: 25px;\">\n    <h3 style=\"font-size: 14px; text-transform: uppercase; margin: 0 0 10px 0;\">[HOURLY HUMOR]</h3>\n    <div style=\"border-left: 3px solid; padding-left: 12px;\">\"{{ $json.joke }}\"</div>\n  </div>\n\n  <div>\n    <h3 style=\"font-size: 14px; text-transform: uppercase; margin: 0 0 10px 0;\">[TOP INDUSTRY NEWS]</h3>\n    <ol style=\"padding-left: 20px; margin: 0;\">\n      {{ $json.hacker_news_top_5.map(item => `<li>${item.title} (<i>@${item.author}</i>)</li>`).join('') }}\n    </ol>\n  </div>\n\n</div>",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1712,
        -304
      ],
      "id": "535ce1dd-109d-45e9-a3ef-3f0435b36ecf",
      "name": "Compose Email"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1jyU5-IP8cOx0174zPt3synlhj2Mv8PXLmDhEahqQZ9U",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Sheet1",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "TOP INDUSTRY NEWS": "={{ $('Format Payload').item.json.hacker_news_top_5.map((item, index) => `${index + 1}. ${item.title} (@${item.author})`).join('\\n') }}",
            "TIMESTAMP": "={{ $('Schedule Trigger').item.json[\"Readable date\"] }}",
            "WEATHER STATS": "={{ $('Format Payload').item.json.weather.description }}",
            "HOURLY HUMOR": "={{ $('Format Payload').item.json.joke }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "TIMESTAMP",
              "displayName": "TIMESTAMP",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "WEATHER STATS",
              "displayName": "WEATHER STATS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "HOURLY HUMOR",
              "displayName": "HOURLY HUMOR",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "TOP INDUSTRY NEWS",
              "displayName": "TOP INDUSTRY NEWS",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        2160,
        -304
      ],
      "id": "fca83fc3-6e21-4e18-ba7c-a23e5d653c21",
      "name": "Add Data",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "all",
        "limit": 5,
        "additionalFields": {
          "tags": [
            "front_page"
          ]
        }
      },
      "type": "n8n-nodes-base.hackerNews",
      "typeVersion": 1,
      "position": [
        1040,
        -112
      ],
      "id": "a26c3ea2-c229-4bb9-9ffe-fb012b99794b",
      "name": "Hacker News"
    },
    {
      "parameters": {
        "sendTo": "saptarshiroy404@gmail.com",
        "subject": "={{ $json.emailSubject }}",
        "message": "={{ $json.emailBody }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        1936,
        -304
      ],
      "id": "ebb2fde8-c1ed-48c4-9075-904a091fe175",
      "name": "Send Email",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// 1. Extract Weather Data\nconst weatherNode = $('OpenWeatherMap').first().json;\nconst weather = {\n  description: weatherNode.weather[0].description,\n  temp: weatherNode.main.temp,\n  feels_like: weatherNode.main.feels_like,\n  temp_min: weatherNode.main.temp_min,\n  temp_max: weatherNode.main.temp_max,\n  pressure: weatherNode.main.pressure,\n  humidity: weatherNode.main.humidity,\n  visibility: weatherNode.visibility,\n  speed: weatherNode.wind.speed,\n  deg: weatherNode.wind.deg\n};\n\n// 2. Extract Joke Data\nconst jokeNode = $('Get Joke').first().json;\nconst joke = jokeNode.joke;\n\n// 3. Extract Top 5 Hacker News Stories\nconst hnItems = $('Hacker News').all();\nconst hacker_news_top_5 = hnItems.slice(0, 5).map(item => ({\n  title: item.json.title,\n  author: item.json.author,\n}));\n\nreturn [\n  {\n    json: {\n      weather,\n      joke,\n      hacker_news_top_5\n    }\n  }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1488,
        -304
      ],
      "id": "dca2b165-2adc-49a3-902f-fa11d988da70",
      "name": "Format Payload"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "numberInputs": 3,
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1264,
        -320
      ],
      "id": "91b7a72b-082f-4974-a609-9ce4a32ad42b",
      "name": "Merge"
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "OpenWeatherMap",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Joke",
            "type": "main",
            "index": 0
          },
          {
            "node": "Hacker News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenWeatherMap": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Joke": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Compose Email": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hacker News": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Send Email": {
      "main": [
        [
          {
            "node": "Add Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Payload": {
      "main": [
        [
          {
            "node": "Compose Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Format Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "0c8f7273-62d0-4b3e-aa98-fab6d129e220",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodeGroups": [],
  "id": "E6lHd7cOHOX0Z5PI",
  "tags": [
    {
      "updatedAt": "2026-07-27T04:15:05.756Z",
      "createdAt": "2026-07-27T04:15:05.756Z",
      "id": "5Au0G4XE89D7ajjM",
      "name": "@saptarshiroy39"
    }
  ]
}