{
  "name": "Gumroad Sale \u2192 Slack + Daily Summary",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "gumroad-sale",
        "options": {}
      },
      "id": "gumroad-webhook",
      "name": "Gumroad Sale Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        240,
        300
      ],
      "typeVersion": 2
    },
    {
      "parameters": {
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "slackApi",
        "resource": "message",
        "operation": "post",
        "channel": "#sales",
        "text": "\ud83d\udcb0 *New Gumroad Sale!*\n\n*Product:* {{ $json.body.product_name }}\n*Price:* ${{ ($json.body.price / 100).toFixed(2) }}\n*Buyer:* {{ $json.body.email }}\n*Total sales today:* calculate in Airtable\n\n\ud83c\udf89 Keep going!"
      },
      "id": "slack-alert",
      "name": "Post to #sales Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        460,
        200
      ],
      "typeVersion": 2.2
    },
    {
      "parameters": {
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "airtableTokenApi",
        "operation": "create",
        "base": {
          "value": "={{ $env.AIRTABLE_BASE_ID }}",
          "mode": "id"
        },
        "table": {
          "value": "Sales",
          "mode": "name"
        },
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": "Product",
              "fieldValue": "={{ $json.body.product_name }}"
            },
            {
              "fieldId": "Email",
              "fieldValue": "={{ $json.body.email }}"
            },
            {
              "fieldId": "Amount",
              "fieldValue": "={{ $json.body.price / 100 }}"
            },
            {
              "fieldId": "Date",
              "fieldValue": "={{ $now.toISO() }}"
            }
          ]
        }
      },
      "id": "log-to-airtable",
      "name": "Log to Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        460,
        380
      ],
      "typeVersion": 2.1
    }
  ],
  "connections": {
    "Gumroad Sale Webhook": {
      "main": [
        [
          {
            "node": "Post to #sales Slack",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log to Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "_meta": {
    "description": "Fires on every Gumroad sale: posts a celebration message to Slack #sales channel and logs the transaction to an Airtable base for tracking.",
    "requiredCredentials": [
      "Slack API",
      "Airtable API"
    ],
    "variables": [
      "AIRTABLE_BASE_ID"
    ],
    "category": "E-commerce / Sales",
    "n8nVersion": ">=1.0.0",
    "setup": "In Gumroad dashboard \u2192 Settings \u2192 Ping URL \u2192 paste your n8n webhook URL"
  }
}