{
  "name": "Daily affirmations & weekly gratitude digest with Notion, Email & Telegram",
  "nodes": [
    {
      "id": null,
      "name": "README",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1080,
        -60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": null,
      "name": "Cron: Daily Affirmation",
      "type": "n8n-nodes-base.cron",
      "position": [
        -1060,
        240
      ]
    },
    {
      "id": null,
      "name": "Cron: Weekly Digest",
      "type": "n8n-nodes-base.cron",
      "position": [
        -1060,
        520
      ]
    },
    {
      "id": null,
      "name": "Sticky: Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1080,
        60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": null,
      "name": "Set: User Config",
      "type": "n8n-nodes-base.set",
      "position": [
        -830,
        240
      ]
    },
    {
      "id": null,
      "name": "Set: Digest Config",
      "type": "n8n-nodes-base.set",
      "position": [
        -830,
        520
      ]
    },
    {
      "id": null,
      "name": "Fn: Build Affirmation Message",
      "type": "n8n-nodes-base.function",
      "position": [
        -580,
        240
      ]
    },
    {
      "id": null,
      "name": "IF: Send Email?",
      "type": "n8n-nodes-base.if",
      "position": [
        -360,
        120
      ]
    },
    {
      "id": null,
      "name": "IF: Send Telegram?",
      "type": "n8n-nodes-base.if",
      "position": [
        -360,
        360
      ]
    },
    {
      "id": null,
      "name": "Email: Send Affirmation",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -140,
        120
      ]
    },
    {
      "id": null,
      "name": "Telegram: Send Affirmation",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -140,
        360
      ]
    },
    {
      "id": null,
      "name": "Notion: Log Affirmation",
      "type": "n8n-nodes-base.notion",
      "position": [
        80,
        240
      ]
    },
    {
      "id": null,
      "name": "Fn: Set Week Window",
      "type": "n8n-nodes-base.function",
      "position": [
        -830,
        610
      ]
    },
    {
      "id": null,
      "name": "Notion: Query Gratitude (7d)",
      "type": "n8n-nodes-base.notion",
      "position": [
        -580,
        520
      ]
    },
    {
      "id": null,
      "name": "Fn: Filter & Format Gratitude (7d)",
      "type": "n8n-nodes-base.function",
      "position": [
        -360,
        520
      ]
    },
    {
      "id": null,
      "name": "Fn: Build Digest Message",
      "type": "n8n-nodes-base.function",
      "position": [
        -140,
        520
      ]
    },
    {
      "id": null,
      "name": "Email: Send Weekly Digest",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        80,
        460
      ]
    },
    {
      "id": null,
      "name": "Telegram: Send Weekly Digest",
      "type": "n8n-nodes-base.telegram",
      "position": [
        80,
        580
      ]
    },
    {
      "id": null,
      "name": "On Error: Any Node",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -1080,
        900
      ]
    },
    {
      "id": null,
      "name": "Set: Alert Config",
      "type": "n8n-nodes-base.set",
      "position": [
        -830,
        900
      ]
    },
    {
      "id": null,
      "name": "Fn: Build Alert Message",
      "type": "n8n-nodes-base.function",
      "position": [
        -600,
        900
      ]
    },
    {
      "id": null,
      "name": "Wait 5s",
      "type": "n8n-nodes-base.wait",
      "position": [
        -380,
        900
      ]
    },
    {
      "id": null,
      "name": "IF: Slack?",
      "type": "n8n-nodes-base.if",
      "position": [
        -140,
        820
      ]
    },
    {
      "id": null,
      "name": "IF: Discord?",
      "type": "n8n-nodes-base.if",
      "position": [
        -140,
        980
      ]
    },
    {
      "id": null,
      "name": "Slack: Post Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        80,
        820
      ]
    },
    {
      "id": null,
      "name": "Discord: Post Alert",
      "type": "n8n-nodes-base.discord",
      "position": [
        80,
        980
      ]
    }
  ],
  "connections": {
    "Wait 5s": {
      "main": [
        [
          {
            "node": "IF: Slack?",
            "type": "main",
            "index": 0
          },
          {
            "node": "IF: Discord?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: Slack?": {
      "main": [
        [
          {
            "node": "Slack: Post Alert",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "IF: Discord?": {
      "main": [
        [
          {
            "node": "Discord: Post Alert",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "IF: Send Email?": {
      "main": [
        [
          {
            "node": "Email: Send Affirmation",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Set: User Config": {
      "main": [
        [
          {
            "node": "Fn: Build Affirmation Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set: Alert Config": {
      "main": [
        [
          {
            "node": "Fn: Build Alert Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: Send Telegram?": {
      "main": [
        [
          {
            "node": "Telegram: Send Affirmation",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "On Error: Any Node": {
      "main": [
        [
          {
            "node": "Set: Alert Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set: Digest Config": {
      "main": [
        [
          {
            "node": "Fn: Set Week Window",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cron: Weekly Digest": {
      "main": [
        [
          {
            "node": "Set: Digest Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fn: Set Week Window": {
      "main": [
        [
          {
            "node": "Notion: Query Gratitude (7d)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cron: Daily Affirmation": {
      "main": [
        [
          {
            "node": "Set: User Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fn: Build Alert Message": {
      "main": [
        [
          {
            "node": "Wait 5s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fn: Build Digest Message": {
      "main": [
        [
          {
            "node": "Email: Send Weekly Digest",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram: Send Weekly Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion: Query Gratitude (7d)": {
      "main": [
        [
          {
            "node": "Fn: Filter & Format Gratitude (7d)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fn: Build Affirmation Message": {
      "main": [
        [
          {
            "node": "IF: Send Email?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "IF: Send Telegram?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notion: Log Affirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fn: Filter & Format Gratitude (7d)": {
      "main": [
        [
          {
            "node": "Fn: Build Digest Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}