{
  "name": "Automate cancellation feedback collection with Stripe and Google Sheets",
  "nodes": [
    {
      "id": "52bde91d-175a-49dd-8a41-7d35b8fcbc58",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1104,
        0
      ],
      "parameters": {
        "width": 640,
        "height": 1340,
        "content": "## 📋 Automated Feedback Survey on Stripe Cancellation\n\n**What this workflow does:**\n\nWhen a customer cancels their Stripe subscription, this workflow automatically:\n\n1. ✅ Detects the cancellation even"
      }
    },
    {
      "id": "fd82e2f9-248f-409f-a790-ec00ca02ca1c",
      "name": "Step 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        0
      ],
      "parameters": {
        "width": 360,
        "height": 280,
        "content": "## Step 1: Detect Cancellation\n\nListens for `customer.subscription.deleted` webhook event from Stripe.\n\n**Setup:**\n- Connect your Stripe account\n- Copy the webhook URL from this node\n- Add it to Strip"
      }
    },
    {
      "id": "c4b72f4a-32e3-4736-9a8b-896b775ffbc7",
      "name": "Step 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        48
      ],
      "parameters": {
        "width": 340,
        "height": 240,
        "content": "## Step 2: Get Customer Info\n\nFetches customer email and name from Stripe API.\n\n**Why needed:**\nThe webhook event doesn't include email directly - we must fetch it separately for the survey email and "
      }
    },
    {
      "id": "4e99664a-7ba0-43d2-8f70-d6d4be8ac7fe",
      "name": "Step 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -272
      ],
      "parameters": {
        "width": 380,
        "height": 560,
        "content": "## Step 3: Send Survey Email\n\n**IMPORTANT: Survey URL Setup**\n\nThe survey URL includes customer data as parameters:\n`[SURVEY_URL]?email={email}&customer_id={id}&name={name}&plan={plan}`\n\n**Required se"
      }
    },
    {
      "id": "0862a1bf-a237-4516-bccc-7eecdda7cf0f",
      "name": "Step 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -112
      ],
      "parameters": {
        "width": 360,
        "height": 400,
        "content": "## Step 4: Log Cancellation\n\n**Setup:**\n- Select your Google Sheets document\n- Sheet name: \"Cancellations\"\n- Headers created automatically on first run\n\n**Columns logged:**\n- Cancellation timestamp\n- "
      }
    },
    {
      "id": "4ed549f9-81e1-4f84-978e-2aba193ca509",
      "name": "Step 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        944
      ],
      "parameters": {
        "width": 380,
        "height": 460,
        "content": "## Step 5: Receive Survey Response\n\n**SEPARATE WORKFLOW TRIGGER**\n\nThis webhook activates when a customer submits the survey.\n\n**Survey form webhook setup:**\n- Configure webhook to POST to this URL\n- "
      }
    },
    {
      "id": "adbd2373-0271-4f10-bb73-a343510ab646",
      "name": "Step 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        944
      ],
      "parameters": {
        "width": 380,
        "height": 460,
        "content": "## Step 6: Route by Reason\n\nSorts feedback into 3 categories based on the \"reason\" field:\n\n**Output 0:** reason contains \"expensive\" or \"price\" or \"cost\"\n→ Goes to \"Price Concerns\" sheet\n\n**Output 1:*"
      }
    },
    {
      "id": "2f712d4a-b1fb-403a-9818-cdedbfce2500",
      "name": "Step 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        944
      ],
      "parameters": {
        "width": 440,
        "height": 500,
        "content": "## Step 7: Log to Category Sheets\n\n**Create 3 sheets in your Google Sheets:**\n\n1. **Price Concerns** - for pricing issues\n2. **Feature Requests** - for missing features\n3. **Other Feedback** - for eve"
      }
    },
    {
      "id": "24749ad3-95c9-4d7d-a8a5-1e39c5257909",
      "name": "Stripe Subscription Canceled",
      "type": "n8n-nodes-base.stripeTrigger",
      "position": [
        -240,
        320
      ]
    },
    {
      "id": "c553c09e-5f4c-44d0-979b-344191c6c3b4",
      "name": "Get Customer Details",
      "type": "n8n-nodes-base.stripe",
      "position": [
        112,
        320
      ]
    },
    {
      "id": "a4f93441-e29b-494d-a69c-d3bfd5695448",
      "name": "Send Feedback Survey Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        480,
        320
      ]
    },
    {
      "id": "cc898a60-e1af-4a6c-b26a-fbd53a88cba3",
      "name": "Log to Cancellations Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        832,
        320
      ]
    },
    {
      "id": "d4ad096a-addf-48c7-a693-fc07e30f1ed6",
      "name": "Survey Response Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -240,
        640
      ]
    },
    {
      "id": "3077ceaa-38d5-4b20-b3f3-96c9c9587121",
      "name": "Route by Feedback Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        112,
        624
      ]
    },
    {
      "id": "5d3befc8-8831-42a2-9d83-0a81df2ab1f9",
      "name": "Log Price Concerns",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        480,
        512
      ]
    },
    {
      "id": "3c180c3d-c5e1-4a34-894b-973ac7cfe246",
      "name": "Log Feature Requests",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        480,
        640
      ]
    },
    {
      "id": "b09a3969-8253-4bac-94e7-b053a8fd48f1",
      "name": "Log Other Feedback",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        480,
        784
      ]
    }
  ],
  "connections": {
    "Get Customer Details": {
      "main": [
        [
          {
            "node": "Send Feedback Survey Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Feedback Type": {
      "main": [
        [
          {
            "node": "Log Price Concerns",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Feature Requests",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Other Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Survey Response Webhook": {
      "main": [
        [
          {
            "node": "Route by Feedback Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Feedback Survey Email": {
      "main": [
        [
          {
            "node": "Log to Cancellations Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Stripe Subscription Canceled": {
      "main": [
        [
          {
            "node": "Get Customer Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}