FindPrompts
n8nE-CommerceIntermediate4 steps

Stripe Payment to Notion + Welcome Email

Listens for successful Stripe payments via webhook, creates or updates a customer record in a Notion database, and fires a personalized welcome email through Gmail. Onboards every paying customer instantly.

StripeNotionGmail

How it works

  1. 1Trigger: Stripe webhook on checkout.session.completed
  2. 2Create/update the customer page in a Notion database
  3. 3Compose a personalized welcome email
  4. 4Send the welcome email via Gmail

Setup

  • In Stripe, add a webhook to the n8n webhook URL for checkout.session.completed.
  • Connect Notion and Gmail OAuth2 credentials.
  • Set YOUR_NOTION_DB_ID and match the property names to your DB.
  • Verify the Stripe signature in production for security.

Workflow JSON

{
  "name": "Stripe Payment to Notion + Welcome Email",
  "nodes": [
    {
      "id": "sp01aa",
      "name": "Stripe Payment Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        300
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "stripe-payment",
        "responseMode": "onReceived"
      }
    },
    {
      "id": "sp02bb",
      "name": "Create Notion Customer",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        480,
        300
      ],
      "parameters": {
        "resource": "databasePage",
        "operation": "create",
        "databaseId": "YOUR_NOTION_DB_ID",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Name|title",
              "title": "={{ $json.body.data.object.customer_details.name }}"
            },
            {
              "key": "Email|email",
              "emailValue": "={{ $json.body.data.object.customer_details.email }}"
            },
            {
              "key": "Amount|number",
              "numberValue": "={{ $json.body.data.object.amount_total / 100 }}"
            }
          ]
        }
      }
    },
    {
      "id": "sp03cc",
      "name": "Send Welcome Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        720,
        300
      ],
      "parameters": {
        "resource": "message",
        "operation": "send",
        "sendTo": "={{ $json.body.data.object.customer_details.email }}",
        "subject": "Welcome aboard!",
        "message": "Hi {{ $json.body.data.object.customer_details.name }},\n\nThanks for your purchase! Here is how to get started...",
        "options": {}
      }
    },
    {
      "id": "sp04dd",
      "name": "Respond OK",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        960,
        300
      ],
      "parameters": {
        "respondWith": "text",
        "responseBody": "ok"
      }
    }
  ],
  "connections": {
    "Stripe Payment Webhook": {
      "main": [
        [
          {
            "node": "Create Notion Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Notion Customer": {
      "main": [
        [
          {
            "node": "Send Welcome Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Welcome Email": {
      "main": [
        [
          {
            "node": "Respond OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "meta": {}
}

Command Palette

Search for a command to run...