{
  "name": "Generate weekly grocery lists in Notion with automated email notifications",
  "nodes": [
    {
      "id": "c9419408-69ff-4a74-bba7-568633b6617c",
      "name": "README – Template Description",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        0
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "51f1ed9d-ba40-4f05-874b-fbcf3d08bb8e",
      "name": "Cron: Weekly Meal Plan (Sun 6 PM)",
      "type": "n8n-nodes-base.cron",
      "position": [
        -864,
        448
      ]
    },
    {
      "id": "b2e86a43-dc0a-454a-9e44-4396fd8ee13a",
      "name": "Set: Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        448
      ]
    },
    {
      "id": "aaade1ef-c090-4c13-a0a2-f99b7b3c9efa",
      "name": "Code: Generate Grocery Items",
      "type": "n8n-nodes-base.code",
      "position": [
        -192,
        448
      ]
    },
    {
      "id": "f6208598-ef71-4233-8539-51d2c63162a4",
      "name": "Notion: Add to Grocery List",
      "type": "n8n-nodes-base.notion",
      "position": [
        32,
        448
      ]
    },
    {
      "id": "7288a4a3-3cfe-4053-b6b7-fd2a75eaa7dd",
      "name": "IF: Telegram Enabled?",
      "type": "n8n-nodes-base.if",
      "position": [
        480,
        352
      ]
    },
    {
      "id": "342b2a5c-8484-4ded-816b-ca71daf29493",
      "name": "Email: Send Grocery List",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        256,
        328
      ]
    },
    {
      "id": "08b75965-a564-4934-bc34-b5054b2b60d3",
      "name": "Telegram: Confirmation",
      "type": "n8n-nodes-base.telegram",
      "position": [
        704,
        352
      ]
    },
    {
      "id": "f9705add-d781-48e2-b181-64de111be8d3",
      "name": "Setup Tips",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "cae9cd00-0605-4d52-9c17-380e1abe9e75",
      "name": "Notion: Validate Database Connection",
      "type": "n8n-nodes-base.notion",
      "position": [
        -416,
        448
      ]
    },
    {
      "id": "39d75fb3-c322-4e6f-9e0c-14b563a0e8ce",
      "name": "Catch: Error Handling",
      "type": "n8n-nodes-base.set",
      "position": [
        704,
        544
      ]
    },
    {
      "id": "3020db74-fdf7-4633-b7b6-c1e040d6bbaa",
      "name": "Email: Send Error Notification",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1152,
        544
      ]
    },
    {
      "id": "c854bddb-ac88-4d48-b124-40a63bf9b38e",
      "name": "Email: Send Success Notification",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        480,
        160
      ]
    },
    {
      "id": "2af14a15-4442-47e9-8c4b-0a485d3b1a39",
      "name": "Log: Workflow Execution",
      "type": "n8n-nodes-base.set",
      "position": [
        -720,
        -96
      ]
    },
    {
      "id": "0c3ca0a5-da6e-4dfe-9b20-d7e08b63239d",
      "name": "Format: Error Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        928,
        544
      ]
    },
    {
      "id": "25aacfc2-14ce-4825-b286-2bb96852c2f9",
      "name": "IF: Telegram Enabled (Error)?",
      "type": "n8n-nodes-base.if",
      "position": [
        1152,
        736
      ]
    },
    {
      "id": "b2afc239-0a18-43b6-be34-62500a5da118",
      "name": "Telegram: Error Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1376,
        736
      ]
    },
    {
      "id": "fa604269-843c-4a91-9771-66d852c01e2e",
      "name": "IF: Log to Notion?",
      "type": "n8n-nodes-base.if",
      "position": [
        704,
        160
      ]
    },
    {
      "id": "86f13624-de11-4f3e-9c34-14a82029767c",
      "name": "Notion: Append Log Entry (Success)",
      "type": "n8n-nodes-base.notion",
      "position": [
        928,
        160
      ]
    },
    {
      "id": "57e2a84d-1d70-4260-b712-452791ad9de3",
      "name": "Notion: Append Log Entry (Error)",
      "type": "n8n-nodes-base.notion",
      "position": [
        1152,
        352
      ]
    }
  ],
  "connections": {
    "IF: Log to Notion?": {
      "main": [
        [
          {
            "node": "Notion: Append Log Entry (Success)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set: Configuration": {
      "main": [
        [
          {
            "node": "Notion: Validate Database Connection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Catch: Error Handling": {
      "main": [
        [
          {
            "node": "Format: Error Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format: Error Payload": {
      "main": [
        [
          {
            "node": "Email: Send Error Notification",
            "type": "main",
            "index": 0
          },
          {
            "node": "IF: Telegram Enabled (Error)?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notion: Append Log Entry (Error)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: Telegram Enabled?": {
      "main": [
        [
          {
            "node": "Telegram: Confirmation",
            "type": "main",
            "index": 0
          },
          {
            "node": "Catch: Error Handling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email: Send Grocery List": {
      "main": [
        [
          {
            "node": "IF: Telegram Enabled?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Email: Send Success Notification",
            "type": "main",
            "index": 0
          },
          {
            "node": "Catch: Error Handling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion: Add to Grocery List": {
      "main": [
        [
          {
            "node": "Email: Send Grocery List",
            "type": "main",
            "index": 0
          },
          {
            "node": "Catch: Error Handling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Generate Grocery Items": {
      "main": [
        [
          {
            "node": "Notion: Add to Grocery List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: Telegram Enabled (Error)?": {
      "main": [
        [
          {
            "node": "Telegram: Error Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email: Send Success Notification": {
      "main": [
        [
          {
            "node": "IF: Log to Notion?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cron: Weekly Meal Plan (Sun 6 PM)": {
      "main": [
        [
          {
            "node": "Set: Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion: Validate Database Connection": {
      "main": [
        [
          {
            "node": "Code: Generate Grocery Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}