{
  "name": "Generate weekly dinner meal plans and shopping lists using Mealie",
  "nodes": [
    {
      "id": "2de76183-3907-4ff2-9afb-bfb2121915dc",
      "name": "Generate Random Meal in Mealie",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        704,
        1008
      ]
    },
    {
      "id": "7cee36dc-aa29-430d-ad5b-dfee585c22e1",
      "name": "Get Recipe From Mealie By Slug",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1168,
        1008
      ]
    },
    {
      "id": "1b52bdc4-8872-4be1-adff-7200990e3b08",
      "name": "Normalize Mealie Recipe Data",
      "type": "n8n-nodes-base.code",
      "position": [
        2272,
        1008
      ]
    },
    {
      "id": "bf165bc3-aec0-410f-9a49-1209f5f4477b",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        256,
        1008
      ]
    },
    {
      "id": "5ca174ed-1ec2-4b61-959a-6af00cb047e2",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        0
      ],
      "parameters": {
        "width": 460,
        "height": 1200,
        "content": "## Try It Out!\n\n### This n8n template demonstrates how to automatically generate a full week of dinner meal plans in your self hosted Mealie instance and create a corresponding shopping list based on "
      }
    },
    {
      "id": "f9925679-4535-48a4-a978-d2cfc0fc1e52",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 416,
        "height": 496,
        "content": "## Pre-Requisite\nBefore using this workflow, you need a running **Mealie** instance with API access enabled.\n\nIf you have not installed Mealie yet, follow the official setup guide in the Mealie docume"
      }
    },
    {
      "id": "7faf476e-97a3-47ab-a2ef-a0b0f3aaafab",
      "name": "Create New Shopping List in Mealie",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1760,
        1008
      ]
    },
    {
      "id": "b8ee6180-2764-4869-a120-dcc2b578fef6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        656
      ],
      "parameters": {
        "width": 432,
        "height": 480,
        "content": "## 1. Generate Dates for the Full Week and Request Random Dinners\n\nThese two nodes generate the next 7 calendar days starting from today and prepare them for meal planning. For each date, a request is"
      }
    },
    {
      "id": "55494358-8897-4329-a709-3d3aef68462f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2208,
        656
      ],
      "parameters": {
        "width": 448,
        "height": 480,
        "content": "## 4. Normalize Recipe Data and Add Ingredients to the Shopping List\n\nThis step prepares each recipe for shopping list creation and then pushes the data back to Mealie.\n\nThe Code node collects all fet"
      }
    },
    {
      "id": "1b7d9ae7-30a0-49ac-a064-b9d1fab18fa9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        656
      ],
      "parameters": {
        "width": 432,
        "height": 480,
        "content": "## 2. Fetch Full Recipe Details from Mealie\n\nOnce each random dinner is created, this node retrieves the complete recipe data using the recipe’s slug. It sends an authenticated request to your Mealie "
      }
    },
    {
      "id": "e338881f-04a1-46b9-8d8d-58a0478d7855",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        656
      ],
      "parameters": {
        "width": 432,
        "height": 480,
        "content": "## 3. Create a New Weekly Shopping List in Mealie\n\nThis node creates a new shopping list in your Mealie instance for the planned week. The list is dynamically named using the first date from the gener"
      }
    },
    {
      "id": "d02581bb-ef49-42ed-995c-dfda7c96faa8",
      "name": "Add Recipe(s) Ingredients To Shopping List in Mealie",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2480,
        1008
      ]
    },
    {
      "id": "97d2d432-0f2a-4820-bcde-e922d7b7c198",
      "name": "Generate Next 7 Days",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        1008
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Generate Next 7 Days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Next 7 Days": {
      "main": [
        [
          {
            "node": "Generate Random Meal in Mealie",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Mealie Recipe Data": {
      "main": [
        [
          {
            "node": "Add Recipe(s) Ingredients To Shopping List in Mealie",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Random Meal in Mealie": {
      "main": [
        [
          {
            "node": "Get Recipe From Mealie By Slug",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Recipe From Mealie By Slug": {
      "main": [
        [
          {
            "node": "Create New Shopping List in Mealie",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create New Shopping List in Mealie": {
      "main": [
        [
          {
            "node": "Normalize Mealie Recipe Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}