{
 "id": "reviewrequest",
 "name": "AutomateRecipes \u2013 review-request",
 "nodes": [
  {
   "parameters": {},
   "name": "Manual Trigger",
   "type": "n8n-nodes-base.manualTrigger",
   "typeVersion": 1,
   "position": [
    0,
    0
   ],
   "id": "bd55653c-a7e7-4068-9922-47a15dbbd7a5"
  },
  {
   "parameters": {
    "jsCode": "return [{json:{type:'invoice.paid',data:{object:{customer_email:'mona@test.test',customer_name:'Mona',paid_at:'2026-10-15'}}}},{json:{type:'invoice.paid',data:{object:{customer_email:'fahad@test.test',customer_name:'Fahad',paid_at:'2026-10-16'}}}}];"
   },
   "type": "n8n-nodes-base.code",
   "typeVersion": 2,
   "name": "S1",
   "position": [
    220,
    0
   ],
   "id": "e4ee8794-eb4c-49aa-8f94-0899f138a4a1"
  },
  {
   "parameters": {
    "jsCode": "const y='2026-10-15';return $input.all().map(i=>i.json.data.object).filter(o=>o.paid_at===y).map(o=>({json:{service:'gmail/send',payload:{to:o.customer_email,subject:'How did we do?',text:`Hi ${o.customer_name}, would you leave us a Google review? https://g.page/r/EXAMPLE/review`}}}));"
   },
   "type": "n8n-nodes-base.code",
   "typeVersion": 2,
   "name": "S2",
   "position": [
    440,
    0
   ],
   "id": "d9d79ff1-e4ef-4db9-8c30-080af97cf1c7"
  },
  {
   "parameters": {
    "method": "POST",
    "url": "=http://127.0.0.1:9000/{{ $json.service }}",
    "sendBody": true,
    "specifyBody": "json",
    "jsonBody": "={{ JSON.stringify($json.payload) }}",
    "options": {}
   },
   "type": "n8n-nodes-base.httpRequest",
   "typeVersion": 4.2,
   "name": "S3 POST mock (send)",
   "position": [
    660,
    0
   ],
   "id": "5151b327-381a-44ab-96d7-bbbc22118388"
  }
 ],
 "connections": {
  "Manual Trigger": {
   "main": [
    [
     {
      "node": "S1",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "S1": {
   "main": [
    [
     {
      "node": "S2",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "S2": {
   "main": [
    [
     {
      "node": "S3 POST mock (send)",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {},
 "active": false,
 "pinData": {},
 "meta": {
  "note": "Tested on n8n 1.70.3 with local mocks for: Stripe invoice.paid webhook, Google Sheets log, Gmail. Replace 'POST mock'/'GET mock' HTTP nodes with the real app nodes + credentials before production."
 }
}