{
  "name": "Automate agile refinement prep with Gmail, OpenAI & Google Sheets",
  "nodes": [
    {
      "id": "188d1e63-306b-4ee9-a39c-04a50ad0045c",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        340,
        505
      ]
    },
    {
      "id": "7f741929-ecc7-4cbc-994c-e6b7b9c40e46",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        340,
        305
      ]
    },
    {
      "id": "321a045f-0e5f-4992-aa75-4b639a5a7f9b",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        680,
        400
      ]
    },
    {
      "id": "a522ba37-96a2-42da-b7e8-b4e1af223537",
      "name": "Load Calendar of Scrum Master",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        820,
        400
      ]
    },
    {
      "id": "8207984e-800c-4ed2-ab1b-7c2bf4f01cbc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "513f18e3-0dde-4a10-95f0-1f43f90e1c63",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -620,
        -220
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "a6980a1b-812a-47a9-adb4-be31349e0334",
      "name": "Check for Refinement Project A",
      "type": "n8n-nodes-base.filter",
      "position": [
        960,
        400
      ]
    },
    {
      "id": "dbf9f9b7-ec74-48da-8004-99c1184049a2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "070ef37d-0d33-4ce9-9ca3-0bdd2a210e30",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2020,
        140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "cb8006d1-64fc-4727-ab67-5b4622a1dad7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5860,
        140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "a280ba9a-8df7-4c56-abe1-9c97c6ab9e76",
      "name": "Read DoR criteria",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2340,
        580
      ]
    },
    {
      "id": "d2c2c85a-0559-4639-a02d-dbb58dda34b6",
      "name": "Loop Over Items for DoR check",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2140,
        480
      ]
    },
    {
      "id": "5383fd92-16d5-455a-be67-9f4b759d07fe",
      "name": "Compare User Story to DoR Criterium",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2560,
        440
      ]
    },
    {
      "id": "964f81bc-cdf6-40b2-8e7b-0c1a7c801481",
      "name": "Draft Email for Refinement",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        6220,
        440
      ]
    },
    {
      "id": "55acf57c-9560-46ba-ada4-8c0a4f51c6c6",
      "name": "Business Validation",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        4120,
        360
      ]
    },
    {
      "id": "ff51012c-1591-4a00-b8d1-94d2f14c4512",
      "name": "If no event do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1160,
        400
      ]
    },
    {
      "id": "c12ab6c0-571d-4111-aeaa-49ba7558bc38",
      "name": "Update Business Validation in Backlog",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4500,
        560
      ]
    },
    {
      "id": "ace506a2-5fa5-4b02-b261-368febf85298",
      "name": "Take backlog link for further referral",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1440,
        400
      ]
    },
    {
      "id": "dd821197-174f-4de5-8c32-44eb0d994bee",
      "name": "Update Technical Validation in Backlog",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5640,
        580
      ]
    },
    {
      "id": "8a730d15-166a-475a-ad41-1746f94b3252",
      "name": "Update Scrum feedback in Backlog",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3540,
        600
      ]
    },
    {
      "id": "b333f793-93b3-445c-ac2a-d9d450157e0c",
      "name": "OpenAI Business Analyst",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        4120,
        600
      ]
    },
    {
      "id": "3b6215f6-ee09-482d-a830-4a6f007e491e",
      "name": "OpenAI Technical Analyst",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        5280,
        580
      ]
    },
    {
      "id": "9da57209-6d17-414d-9e5e-28ce11aa033f",
      "name": "Select Stories Ready for Refinement from Backlog",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1660,
        300
      ]
    },
    {
      "id": "785ca288-ea0c-4e7c-8126-01f65178c0c8",
      "name": "Select Stories High Prio To Do from Backlog",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1660,
        520
      ]
    },
    {
      "id": "a0ccb135-25a4-4064-b385-c38504dad671",
      "name": "OpenAI Scrum Master Emailer",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        6220,
        660
      ]
    },
    {
      "id": "ea7c3f2b-0a6c-4f71-b75a-32af19e4bb84",
      "name": "OpenAI Scrum Master Story Feedback",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3200,
        640
      ]
    },
    {
      "id": "54415f41-f33d-4a20-a774-1008985d6f84",
      "name": "OpenAI Scrum Master DoR Check",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2560,
        620
      ]
    },
    {
      "id": "e2212d56-7eb8-4182-9807-8cc307764bcb",
      "name": "Development Team Validation",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        5280,
        380
      ]
    },
    {
      "id": "2f9867e3-2951-4446-8733-3fdce506e5b4",
      "name": "Join Potential Stories for Refinement",
      "type": "n8n-nodes-base.merge",
      "position": [
        1880,
        405
      ]
    },
    {
      "id": "576123fb-dab4-44eb-b9c7-1821c9fd60db",
      "name": "Add Scrum Feedback to Story",
      "type": "n8n-nodes-base.merge",
      "position": [
        2840,
        260
      ]
    },
    {
      "id": "cf901d64-c170-4028-8126-728bd10cf53f",
      "name": "Add Business feedback to Story",
      "type": "n8n-nodes-base.merge",
      "position": [
        4420,
        240
      ]
    },
    {
      "id": "3aeb5768-3cde-4dde-afbb-40cafd323c1c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3740,
        140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "5f52b8c0-39da-428d-a6b7-23951c4a8ccc",
      "name": "Loop Over Items Business Feedback",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        3820,
        340
      ]
    },
    {
      "id": "04794eea-55fa-4e65-b896-893495fd6aee",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4820,
        140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "c1e6ee03-02c4-463b-9103-ad5c7a12a5f4",
      "name": "Add Technical feedback to the story",
      "type": "n8n-nodes-base.merge",
      "position": [
        5540,
        180
      ]
    },
    {
      "id": "cfa35094-197e-49c6-91bf-f2e5cc7a7eea",
      "name": "Aggregate DoR check to User Story Level",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2860,
        440
      ]
    },
    {
      "id": "077821fa-de34-4fab-86d5-572c3ecf505c",
      "name": "Add DoR feedback to User Story",
      "type": "n8n-nodes-base.merge",
      "position": [
        3040,
        540
      ]
    },
    {
      "id": "67c79fda-7b07-4132-8186-1dab33168235",
      "name": "Provide Scrum Master Feedback on the story",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3220,
        440
      ]
    },
    {
      "id": "0356faaf-4b2b-4f5e-a233-0368af0a1ad1",
      "name": "Loop Over Items Technical Feedback",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4940,
        400
      ]
    },
    {
      "id": "69b422e6-9554-48e1-967b-b0c43d5059e7",
      "name": "Combine stories into one list",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        6000,
        440
      ]
    },
    {
      "id": "6797258c-5bd3-459e-8ad2-5cae5f925a3a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        -100
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "12706b00-05b1-452a-970d-77b251731b7a",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        640,
        -60
      ]
    },
    {
      "id": "e5c7fce5-a868-4ef4-abda-952af2b32191",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6540,
        140
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "687d92d0-ab1e-4562-990d-554f93924f7f",
      "name": "Ask Approval to Scrum Master",
      "type": "n8n-nodes-base.gmail",
      "position": [
        6620,
        440
      ]
    },
    {
      "id": "4e04e194-00b4-47b7-87d6-8f11d60b268e",
      "name": "Send Email to Attendees",
      "type": "n8n-nodes-base.gmail",
      "position": [
        7000,
        380
      ]
    },
    {
      "id": "a7eec739-76c3-4bbd-8603-517ad5ca3014",
      "name": "Create Draft in Scrum Master Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        7000,
        540
      ]
    },
    {
      "id": "f60a810d-1984-434e-9e87-37f74041920d",
      "name": "Make aware the draft is ready to be adjusted manually",
      "type": "n8n-nodes-base.gmail",
      "position": [
        7220,
        540
      ]
    },
    {
      "id": "380a0918-67a9-4fa8-b27f-fdb0f07494fe",
      "name": "If Email content is Approved",
      "type": "n8n-nodes-base.if",
      "position": [
        6800,
        440
      ]
    },
    {
      "id": "d184a895-96c9-4af8-ba74-67a60c04c123",
      "name": "Start Here: Set Environment Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        520,
        400
      ]
    },
    {
      "id": "d54917ca-4554-4b5a-ac37-be1eca003b41",
      "name": "Take DoR link for further referral",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1300,
        400
      ]
    },
    {
      "id": "98b08147-3ef7-4e95-937d-d30f4938afe2",
      "name": "Send Error Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        880,
        -60
      ]
    }
  ],
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Send Error Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Start Here: Set Environment Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read DoR criteria": {
      "main": [
        [
          {
            "node": "Compare User Story to DoR Criterium",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Business Validation": {
      "main": [
        [
          {
            "node": "Update Business Validation in Backlog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If no event do nothing": {
      "main": [
        [
          {
            "node": "Take DoR link for further referral",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Business Analyst": {
      "ai_languageModel": [
        [
          {
            "node": "Business Validation",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "No Operation, do nothing": {
      "main": [
        [
          {
            "node": "Load Calendar of Scrum Master",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Technical Analyst": {
      "ai_languageModel": [
        [
          {
            "node": "Development Team Validation",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Draft Email for Refinement": {
      "main": [
        [
          {
            "node": "Ask Approval to Scrum Master",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Scrum Feedback to Story": {
      "main": [
        [
          {
            "node": "Add Business feedback to Story",
            "type": "main",
            "index": 0
          },
          {
            "node": "Loop Over Items Business Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Development Team Validation": {
      "main": [
        [
          {
            "node": "Update Technical Validation in Backlog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Scrum Master Emailer": {
      "ai_languageModel": [
        [
          {
            "node": "Draft Email for Refinement",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Ask Approval to Scrum Master": {
      "main": [
        [
          {
            "node": "If Email content is Approved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Email content is Approved": {
      "main": [
        [
          {
            "node": "Send Email to Attendees",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Draft in Scrum Master Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine stories into one list": {
      "main": [
        [
          {
            "node": "Draft Email for Refinement",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Calendar of Scrum Master": {
      "main": [
        [
          {
            "node": "Check for Refinement Project A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items for DoR check": {
      "main": [
        [
          {
            "node": "Add Scrum Feedback to Story",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Read DoR criteria",
            "type": "main",
            "index": 0
          },
          {
            "node": "Add DoR feedback to User Story",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "OpenAI Scrum Master DoR Check": {
      "ai_languageModel": [
        [
          {
            "node": "Compare User Story to DoR Criterium",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Add Business feedback to Story": {
      "main": [
        [
          {
            "node": "Loop Over Items Technical Feedback",
            "type": "main",
            "index": 0
          },
          {
            "node": "Add Technical feedback to the story",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add DoR feedback to User Story": {
      "main": [
        [
          {
            "node": "Provide Scrum Master Feedback on the story",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Refinement Project A": {
      "main": [
        [
          {
            "node": "If no event do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Scrum feedback in Backlog": {
      "main": [
        [
          {
            "node": "Loop Over Items for DoR check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items Business Feedback": {
      "main": [
        [
          {
            "node": "Add Business feedback to Story",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Business Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Start Here: Set Environment Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Draft in Scrum Master Email": {
      "main": [
        [
          {
            "node": "Make aware the draft is ready to be adjusted manually",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items Technical Feedback": {
      "main": [
        [
          {
            "node": "Add Technical feedback to the story",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Development Team Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Scrum Master Story Feedback": {
      "ai_languageModel": [
        [
          {
            "node": "Provide Scrum Master Feedback on the story",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Take DoR link for further referral": {
      "main": [
        [
          {
            "node": "Take backlog link for further referral",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Technical feedback to the story": {
      "main": [
        [
          {
            "node": "Combine stories into one list",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare User Story to DoR Criterium": {
      "main": [
        [
          {
            "node": "Aggregate DoR check to User Story Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Join Potential Stories for Refinement": {
      "main": [
        [
          {
            "node": "Loop Over Items for DoR check",
            "type": "main",
            "index": 0
          },
          {
            "node": "Add Scrum Feedback to Story",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Here: Set Environment Variables": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Business Validation in Backlog": {
      "main": [
        [
          {
            "node": "Loop Over Items Business Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Take backlog link for further referral": {
      "main": [
        [
          {
            "node": "Select Stories Ready for Refinement from Backlog",
            "type": "main",
            "index": 0
          },
          {
            "node": "Select Stories High Prio To Do from Backlog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Technical Validation in Backlog": {
      "main": [
        [
          {
            "node": "Loop Over Items Technical Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate DoR check to User Story Level": {
      "main": [
        [
          {
            "node": "Add DoR feedback to User Story",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Provide Scrum Master Feedback on the story": {
      "main": [
        [
          {
            "node": "Update Scrum feedback in Backlog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Stories High Prio To Do from Backlog": {
      "main": [
        [
          {
            "node": "Join Potential Stories for Refinement",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Select Stories Ready for Refinement from Backlog": {
      "main": [
        [
          {
            "node": "Join Potential Stories for Refinement",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}