{
  "name": "Generate Google Sheets test script from Pega Agile Studio user stories with AI",
  "nodes": [
    {
      "id": "07e6e7d9-e483-4e22-8035-04ec9a9b4f58",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -416,
        432
      ]
    },
    {
      "id": "276a3134-8861-4cdc-bb7c-95512127bf17",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -144
      ],
      "parameters": {
        "width": 480,
        "height": 272,
        "content": "## 1. Add numbers to acc crit\nBecause the acceptance criteria do not have the numbers attached in the data, we have to iterate over them and add them ourselves."
      }
    },
    {
      "id": "8d5ed71f-5991-44a6-b58b-ff0159593932",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        32,
        1056
      ]
    },
    {
      "id": "8868e0ca-eb87-44e8-a693-e2fba157b7ff",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        848
      ]
    },
    {
      "id": "06189d54-da36-4a40-9778-4565c21875e9",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        608,
        848
      ]
    },
    {
      "id": "bbc60d14-6945-4ae0-817d-8ff5fc20f816",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        720
      ],
      "parameters": {
        "width": 448,
        "height": 288,
        "content": "## 3. Convert AI testcases to Google Spreadsheets\nProcess the raw AI data into JSON and iterate over it so each testcase is mapped in Google Spreadsheets."
      }
    },
    {
      "id": "52b628fb-56c7-439d-9a29-a1574effc0d2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        144
      ],
      "parameters": {
        "width": 480,
        "height": 432,
        "content": "## 2. Add column headers for the sheets\nThe sheets do not have column headers, so we will have to add them manually so the AI will know where to insert them later."
      }
    },
    {
      "id": "f9532770-2703-4b1b-a41f-1b8f8fc5779e",
      "name": "AddNumbersToAccCrit",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        -32
      ]
    },
    {
      "id": "44bbc0b3-a03f-4a81-9ceb-4e9c8c397842",
      "name": "IterateOverAccCrit",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        496,
        -32
      ]
    },
    {
      "id": "171a1a4f-142b-40c3-ad75-c4017b911ad4",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        992,
        96
      ]
    },
    {
      "id": "d7572759-ffbb-41bf-a1c7-34c5b35c92c1",
      "name": "Merge2",
      "type": "n8n-nodes-base.merge",
      "position": [
        720,
        336
      ]
    },
    {
      "id": "52e3b733-aff1-42e5-b4d8-5bd3216eb5f0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1104,
        -64
      ],
      "parameters": {
        "width": 608,
        "height": 704,
        "content": "## Generate Google Spreadsheets Testscript with AI using Pega Agile Studio\nWhen working as a functional Pega Software tester, this workflow will create a Google Spreadsheet with acceptance criteria an"
      }
    },
    {
      "id": "27500d90-5c8c-44e8-81a0-2dbd5eeb6e81",
      "name": "Create spreadsheet for the testscript",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        96,
        432
      ]
    },
    {
      "id": "91d429eb-e842-48c0-8715-a8685f2e9665",
      "name": "Retrieve the US from Pega Agile Studio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -192,
        432
      ]
    },
    {
      "id": "7e211832-39a9-4ae8-a503-30f4b00d2348",
      "name": "Add acceptance criteria to the Google Spreadsheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1216,
        96
      ]
    },
    {
      "id": "ee2aeeeb-287c-4642-81da-142328b55777",
      "name": "Add column headers for the first sheet",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        496,
        240
      ]
    },
    {
      "id": "1e550cd2-da52-4ecf-9837-f1ff837e31b7",
      "name": "Add column headers for the second sheet",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        496,
        432
      ]
    },
    {
      "id": "9a6c1a6d-d80c-4a67-b6ab-137fe3f84ab5",
      "name": "AI: Create testcases",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        32,
        848
      ]
    },
    {
      "id": "858c54f5-1681-475d-a07c-cd4bc421cfb1",
      "name": "Merge: Get SpreadsheetID",
      "type": "n8n-nodes-base.merge",
      "position": [
        832,
        768
      ]
    },
    {
      "id": "9a83745b-0d5d-47ce-9016-ba65fcd91650",
      "name": "Add testcases to the correct columns",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1056,
        768
      ]
    },
    {
      "id": "dd94c959-2818-46b1-8848-7da996ec2d38",
      "name": "Clear Google Spreadsheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1504,
        768
      ]
    },
    {
      "id": "4af4550e-fa7c-4174-80e7-676cb6b0b4e2",
      "name": "Code to remove redundant data",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        768
      ]
    },
    {
      "id": "572597f6-aeaa-4f8f-8f35-3dca31c38c4c",
      "name": "Add the cleaned testcases back in the Google Spreadsheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1728,
        768
      ]
    },
    {
      "id": "31b0d80b-388e-4b44-af70-211cbf2ec80c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        656
      ],
      "parameters": {
        "width": 912,
        "height": 320,
        "content": "## 4. Add testcases and remove duplicate values in rows\nIn these steps we will add the testcases, check which rows have duplicate values, and remove those values. Then we will append the data again in"
      }
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Add acceptance criteria to the Google Spreadsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Merge: Get SpreadsheetID",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "IterateOverAccCrit": {
      "main": [
        [
          {
            "node": "AddNumbersToAccCrit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AddNumbersToAccCrit": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Create testcases": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clear Google Spreadsheet": {
      "main": [
        [
          {
            "node": "Add the cleaned testcases back in the Google Spreadsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Create testcases",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge: Get SpreadsheetID": {
      "main": [
        [
          {
            "node": "Add testcases to the correct columns",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Retrieve the US from Pega Agile Studio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code to remove redundant data": {
      "main": [
        [
          {
            "node": "Clear Google Spreadsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add testcases to the correct columns": {
      "main": [
        [
          {
            "node": "Code to remove redundant data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create spreadsheet for the testscript": {
      "main": [
        [
          {
            "node": "Add column headers for the first sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Add column headers for the second sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge: Get SpreadsheetID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add column headers for the first sheet": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve the US from Pega Agile Studio": {
      "main": [
        [
          {
            "node": "IterateOverAccCrit",
            "type": "main",
            "index": 0
          },
          {
            "node": "AI: Create testcases",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create spreadsheet for the testscript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add column headers for the second sheet": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}