{
  "name": "S10 Send three test e-mails",
  "nodes": [
    {
      "parameters": {},
      "id": "4bf74065-bfc5-41d9-afe4-25a01caf59bf",
      "name": "Run once",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "// ONE e-mail per run: Execute workflow on the Gmail trigger takes only the newest matching e-mail.\n// i = 0: approve the reply.  i = 1: reject it.  i = 2: leave it until the time limit.\nconst i = 0;\nconst tests = [\n  {\n    \"plan\": \"approve\",\n    \"subject\": \"[S10 test] Cannot log in after password reset\",\n    \"body\": \"I reset my password yesterday and now the login page says \\\"invalid token\\\". I am locked out of my account. Khaled\"\n  },\n  {\n    \"plan\": \"reject\",\n    \"subject\": \"[S10 test] Refund for unused licences\",\n    \"body\": \"Good morning, we cancelled three seats last week but were still billed for them. Can you refund those three licences today? Lina, Finance\"\n  },\n  {\n    \"plan\": \"time out\",\n    \"subject\": \"[S10 test] Can we book a demo next week?\",\n    \"body\": \"Our operations team would like a 30-minute demo of the reporting features next week. Which days suit you? Nadia\"\n  }\n];\nreturn [{ json: tests[i] }];"
      },
      "id": "28de8c29-de18-4ed4-b864-599bf75d3893",
      "name": "Pick one test e-mail",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        240,
        0
      ]
    },
    {
      "parameters": {
        "sendTo": "PASTE-YOUR-TEST-GMAIL-ADDRESS-HERE",
        "subject": "={{ $json.subject }}",
        "emailType": "text",
        "message": "={{ $json.body }}",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "457b1023-33e7-44b0-93cd-7e4dbab707f8",
      "name": "Send to myself",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        480,
        0
      ]
    },
    {
      "parameters": {
        "content": "## Three test e-mails, one at a time\nPaste your test Gmail address into **Send to myself**, connect Gmail. In **Pick one test e-mail** set `i = 0`, **Execute workflow**, then run M10 and **approve**. `i = 1`: **reject**. `i = 2`: do nothing until the time limit.",
        "width": 560,
        "height": 200,
        "color": 5
      },
      "id": "6dffcfff-9756-401a-912a-6401cdcd199b",
      "name": "Note beec",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -40,
        -280
      ]
    }
  ],
  "connections": {
    "Run once": {
      "main": [
        [
          {
            "node": "Pick one test e-mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pick one test e-mail": {
      "main": [
        [
          {
            "node": "Send to myself",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1",
    "timezone": "Asia/Amman"
  },
  "meta": {}
}