{
  "name": "Log Every Stripe Payment Into Airtable Automatically",
  "nodes": [
    {
      "name": "Stripe — Payment Succeeded",
      "type": "n8n-nodes-base.stripe",
      "typeVersion": 1,
      "parameters": {
        "events": [
          "payment_intent.succeeded"
        ]
      },
      "notes": "Subscribe to the successful-payment event.",
      "position": [
        260,
        300
      ]
    },
    {
      "name": "Extract Amount",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "641",
              "name": "amount",
              "value": "={{ $json.data.object.amount / 100 }}",
              "type": "string"
            },
            {
              "id": "642",
              "name": "currency",
              "value": "={{ $json.data.object.currency }}",
              "type": "string"
            },
            {
              "id": "643",
              "name": "customer",
              "value": "={{ $json.data.object.customer_email }}",
              "type": "string"
            },
            {
              "id": "644",
              "name": "paid_at",
              "value": "={{ $now }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "notes": "",
      "position": [
        500,
        300
      ]
    },
    {
      "name": "Airtable — Append Row",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2,
      "parameters": {
        "operation": "append"
      },
      "notes": "Appends one row per event for an auditable history.",
      "position": [
        740,
        300
      ]
    },
    {
      "name": "Respond / Finish",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "parameters": {},
      "notes": "End of flow — extend with extra steps as needed.",
      "position": [
        980,
        300
      ]
    }
  ],
  "connections": {
    "Stripe — Payment Succeeded": {
      "main": [
        [
          {
            "node": "Extract Amount",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Amount": {
      "main": [
        [
          {
            "node": "Airtable — Append Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Airtable — Append Row": {
      "main": [
        [
          {
            "node": "Respond / Finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
