{
  "name": "Weekly Gratitude Pulse",
  "nodes": [
    {
      "id": "trigger-sunday-6pm",
      "name": "Every Sunday at 6 PM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "notes": "\ud83d\udd52 Weekly Trigger\n\nFires every Sunday at 6:00 PM.\n\n\ud83d\udd39 Adjust timezone in Make/n8n settings.\n\nThis is the heartbeat of the gratitude cycle.",
      "position": [
        250,
        300
      ],
      "parameters": {},
      "typeVersion": 1,
      "notesAlignment": "top"
    },
    {
      "id": "get-slack-messages",
      "name": "Get Slack Channel Messages",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "\ud83d\udce5 Fetch Last 7 Days of Messages\n\nPulls all messages from the community channel.\n\n\ud83d\udd27 Requires:\n- SLACK_BOT_TOKEN\n- SLACK_CHANNEL_ID\n\nUsed to identify active members.",
      "position": [
        500,
        250
      ],
      "parameters": {},
      "notesAlignment": "top"
    },
    {
      "id": "extract-active-users",
      "name": "Extract Active Users",
      "type": "n8n-nodes-base.function",
      "notes": "\ud83d\udc65 Extract Unique User IDs\n\nFinds all users who:\n- Posted a message\n- Added a reaction\n\nFilters out bots and duplicates.\n\nOutput: List of user IDs for DMs.",
      "position": [
        750,
        300
      ],
      "parameters": {},
      "notesAlignment": "top"
    },
    {
      "id": "get-user-info",
      "name": "Get User Info",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "\ud83c\udff7\ufe0f Get Username & Profile\n\nResolves user ID to:\n- Display name\n- Real name (optional)\n\nUsed to personalize the DM.",
      "position": [
        1000,
        300
      ],
      "parameters": {},
      "notesAlignment": "top"
    },
    {
      "id": "open-dm-channel",
      "name": "Open DM Channel",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "\ud83d\udce8 Open Direct Message Channel\n\nCreates a 1:1 DM channel between bot and user.\n\nRequired before sending private messages in Slack.",
      "position": [
        1250,
        300
      ],
      "parameters": {},
      "notesAlignment": "top"
    },
    {
      "id": "send-gratitude-dm",
      "name": "Send Gratitude DM",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "\ud83d\udc8c Send Personalized DM\n\nWarm, no-pressure message of appreciation.\n\n\ud83d\udca1 Customize the text to match your voice.\n\nNever demands a response \u2014 just honors presence.",
      "position": [
        1500,
        300
      ],
      "parameters": {},
      "notesAlignment": "top"
    },
    {
      "id": "log-in-airtable",
      "name": "Log in Airtable",
      "type": "n8n-nodes-base.airtable",
      "notes": "\ud83d\udcca Log Sent Gratitude\n\nRecords the gesture in Airtable for reflection.\n\nNot for tracking \u2014 for honoring.\n\nUse to see patterns, not pressure.",
      "position": [
        1750,
        300
      ],
      "parameters": {},
      "notesAlignment": "top"
    }
  ],
  "active": false,
  "settings": {
    "callerPolicy": "none",
    "saveDataError": "all",
    "executionOrder": "parallel",
    "saveDataSuccess": "all"
  },
  "connections": {
    "Get User Info": {
      "main": [
        [
          {
            "node": "Open DM Channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Open DM Channel": {
      "main": [
        [
          {
            "node": "Send Gratitude DM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Gratitude DM": {
      "main": [
        [
          {
            "node": "Log in Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every Sunday at 6 PM": {
      "main": [
        [
          {
            "node": "Get Slack Channel Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Active Users": {
      "main": [
        [
          {
            "node": "Get User Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Slack Channel Messages": {
      "main": [
        [
          {
            "node": "Extract Active Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}