Automatización del seguimiento de Stripe Checkout

Intermedio

Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 13 nodos.Utiliza principalmente nodos como Wait, Gmail, Slack, GoogleSheets, StripeTrigger. Automatización del seguimiento de finalizaciones de Stripe con recibos de Gmail, recordatorios de Slack y registros de Sheets

Requisitos previos
  • Cuenta de Google y credenciales de API de Gmail
  • Bot Token de Slack o URL de Webhook
  • Credenciales de API de Google Sheets
  • Clave de API de Stripe
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "nodes": [
    {
      "id": "800d597d-57cf-4f90-852a-d2af89bd00fc",
      "name": "Registrar Transacción",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -16,
        -144
      ],
      "parameters": {
        "columns": {
          "value": {
            "name": "={{ $json.data.object.customer_details.name }}",
            "email": "={{ $json.data.object.customer_details.email }}",
            "country": "={{ $json.data.object.customer_details.address.country }}",
            "created": "={{ DateTime.fromSeconds($json.data.object.created ).toFormat('yyyy-MM-dd HH:mm:ss') }}",
            "currency": "={{ $json.data.object.currency }}",
            "invoice_id": "={{ $json.data.object.invoice }}",
            "postal_code": "={{ $json.data.object.customer_details.address.postal_code }}",
            "amount_total": "={{ new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: $json.data.object.currency}).format($json.data.object.amount_total/100) }}"
          },
          "schema": [
            {
              "id": "created",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "created",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "amount_total",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "amount_total",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "currency",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "currency",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "country",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "postal_code",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "postal_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "invoice_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "invoice_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1OiUply-FlnrWBS7JRHHpQN_Xr2WJytOzRaWALEJ8O_Y/edit#gid=0",
          "cachedResultName": "transactions"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1OiUply-FlnrWBS7JRHHpQN_Xr2WJytOzRaWALEJ8O_Y",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1OiUply-FlnrWBS7JRHHpQN_Xr2WJytOzRaWALEJ8O_Y/edit?usp=drivesdk",
          "cachedResultName": "Payments"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "UeBUi5lx3Td6UGzX",
          "name": "google sheets gdemokarma"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "0e4afb98-048a-4041-940c-82f788487fbd",
      "name": "Recibo por Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        608,
        -336
      ],
      "webhookId": "d8142cf5-28dd-4038-b127-6824263d0ae6",
      "parameters": {
        "sendTo": "={{ $('Log Transaction').item.json.email }}",
        "message": "=<html>\n  <body style=\"font-family: Arial, sans-serif; color: #333;\">\n    <h2 style=\"color: #2c7be5;\">Hello {{ $('Log Transaction').item.json.name }}</h2>\n    <p>\nThank you for your purchase from Demo Karma.\n<br><br>\n<div style=\"margin-left: 40px;\">\n  <p>Date: {{ $('Log Transaction').item.json.created }}</p>\n  <p>Country: {{ $('Log Transaction').item.json.country }}</p>\n  <p>Postal Code: {{ $('Log Transaction').item.json.postal_code }}</p>\n  <p>Amount: {{ $('Log Transaction').item.json.amount_total }}</p>\n</div>\n<br><br>\nClick here to <a href=\"{{ $json.invoice_pdf }}\" target=\"_blank\">download your receipt</a>.\n    </p>\n    <p style=\"margin-top:20px;\">Best regards,<br/>Demo Karma Team</p>\n  </body>\n</html>",
        "options": {},
        "subject": "Your Demo Karma purchase"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "x6HZVFIkMIiJTCm8",
          "name": "gmail gdemokarma"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "baa333c7-de1d-4715-a347-d1646b5a5038",
      "name": "Factura Creada",
      "type": "n8n-nodes-base.stripeTrigger",
      "position": [
        -272,
        192
      ],
      "webhookId": "3bd3e92e-0e2b-439e-a5e6-2a4c1c96a313",
      "parameters": {
        "events": [
          "invoice.created"
        ]
      },
      "credentials": {
        "stripeApi": {
          "id": "cUcaB9X2BqxlssWv",
          "name": "stripe demokarma testing"
        }
      },
      "executeOnce": false,
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "bce59371-6ffe-423c-9f58-f0856d64d994",
      "name": "Checkout Completado",
      "type": "n8n-nodes-base.stripeTrigger",
      "position": [
        -256,
        -144
      ],
      "webhookId": "438f0da9-eb4c-43b3-a910-a1f9ff4e16c3",
      "parameters": {
        "events": [
          "checkout.session.completed"
        ]
      },
      "credentials": {
        "stripeApi": {
          "id": "cUcaB9X2BqxlssWv",
          "name": "stripe demokarma testing"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b7002dce-081a-424e-a2d2-1ca41f719a45",
      "name": "Registrar Factura",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -16,
        192
      ],
      "parameters": {
        "columns": {
          "value": {
            "customer": "={{ $json.data.object.customer_name }}",
            "invoice_id": "={{ $json.data.object.id }}",
            "amount_paid": "={{ new Intl.NumberFormat(\"en-US\", { style: \"currency\", currency: $json.data.object.currency}).format($json.data.object.amount_paid/100) }}",
            "invoice_pdf": "={{ $json.data.object.invoice_pdf }}"
          },
          "schema": [
            {
              "id": "invoice_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "invoice_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "customer",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "customer",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "amount_paid",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "amount_paid",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "invoice_pdf",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "invoice_pdf",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 983603502,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1OiUply-FlnrWBS7JRHHpQN_Xr2WJytOzRaWALEJ8O_Y/edit#gid=983603502",
          "cachedResultName": "invoices"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1OiUply-FlnrWBS7JRHHpQN_Xr2WJytOzRaWALEJ8O_Y",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1OiUply-FlnrWBS7JRHHpQN_Xr2WJytOzRaWALEJ8O_Y/edit?usp=drivesdk",
          "cachedResultName": "Payments"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "UeBUi5lx3Td6UGzX",
          "name": "google sheets gdemokarma"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "26f150b9-f2b4-49ca-895f-76b157e0df48",
      "name": "Esperar Factura",
      "type": "n8n-nodes-base.wait",
      "position": [
        272,
        -336
      ],
      "webhookId": "e9438d16-ab63-4dfd-bd0c-667776920584",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "5467970e-5117-46af-a2cb-f74985ff8964",
      "name": "Buscar Factura",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        448,
        -336
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.invoice_id }}",
              "lookupColumn": "invoice_id"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 983603502,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1OiUply-FlnrWBS7JRHHpQN_Xr2WJytOzRaWALEJ8O_Y/edit#gid=983603502",
          "cachedResultName": "invoices"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1OiUply-FlnrWBS7JRHHpQN_Xr2WJytOzRaWALEJ8O_Y",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1OiUply-FlnrWBS7JRHHpQN_Xr2WJytOzRaWALEJ8O_Y/edit?usp=drivesdk",
          "cachedResultName": "Payments"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "UeBUi5lx3Td6UGzX",
          "name": "google sheets gdemokarma"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "8c40f5f4-8d60-45f8-ae73-e45b24c88d25",
      "name": "Mensaje a RevOps",
      "type": "n8n-nodes-base.slack",
      "position": [
        288,
        0
      ],
      "webhookId": "54c78f1b-1f4c-436a-8ef4-6b727ed1a590",
      "parameters": {
        "text": "={{ $json.amount_total }} - new order from {{ $json.name }} ( {{ $json.email }} ). Link to payment: <https://dashboard.stripe.com/acct_1SD3OCEhbbYR1XBf/test/payments/{{ $('Checkout Completed').item.json.data.object.payment_intent }}|{{ $('Checkout Completed').item.json.data.object.payment_intent }}>",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09J4AJU7F0",
          "cachedResultName": "revops"
        },
        "otherOptions": {
          "unfurl_links": false,
          "unfurl_media": false,
          "includeLinkToWorkflow": false
        },
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "Lw78HKjmg6ON4mPL",
          "name": "demokarma stripe slack"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "a92e9140-637f-483b-97c3-a4362685f4e0",
      "name": "Nota Adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        -480
      ],
      "parameters": {
        "width": 560,
        "height": 176,
        "content": "## Followup Stripe Checkouts with Gmail Receipts, Internal Slack, and Sheets Logs\n\nThis n8n template demonstrates how to automate the followup when your customer completes a checkout in Stripe by emailing a receipt, logging the transaction, and sending an internal notification.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5fc4a0c3-126e-4fc0-9439-f3337203e383",
      "name": "Nota Adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -288
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 288,
        "content": "### Log the checkout transaction \n\nReceive the checkout transaction from Stripe and append the details to a log we are keeping in a Google Sheet."
      },
      "typeVersion": 1
    },
    {
      "id": "cc164e57-5cd8-446e-adb8-1f0702907c90",
      "name": "Nota Adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -448
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 288,
        "content": "### Email a receipt\n\nWait a few seconds for the invoice to be received from Stripe and logged to the Sheet.  Then look up the link to the PDF and email it out to the customer.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8bc08914-53c3-465e-83d4-54db5ea2dd74",
      "name": "Nota Adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        32
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 336,
        "content": "### Log the invoice \n\nReceive the invoice created event from Stripe. This happens separately from the checkout event. Store the invoice details in a Google Sheet log where we can look them up."
      },
      "typeVersion": 1
    },
    {
      "id": "6f205642-37d0-4dcd-bd94-65c54fd568ea",
      "name": "Nota Adhesiva4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 608,
        "height": 288,
        "content": "### Notify internal users\n\nThe data from the Stripe checkout event is also used to send a notification to the #revops channel for the Sales team.\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "b7002dce-081a-424e-a2d2-1ca41f719a45": {
      "main": [
        []
      ]
    },
    "0e4afb98-048a-4041-940c-82f788487fbd": {
      "main": [
        []
      ]
    },
    "5467970e-5117-46af-a2cb-f74985ff8964": {
      "main": [
        [
          {
            "node": "0e4afb98-048a-4041-940c-82f788487fbd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "baa333c7-de1d-4715-a347-d1646b5a5038": {
      "main": [
        [
          {
            "node": "b7002dce-081a-424e-a2d2-1ca41f719a45",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "800d597d-57cf-4f90-852a-d2af89bd00fc": {
      "main": [
        [
          {
            "node": "8c40f5f4-8d60-45f8-ae73-e45b24c88d25",
            "type": "main",
            "index": 0
          },
          {
            "node": "26f150b9-f2b4-49ca-895f-76b157e0df48",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "26f150b9-f2b4-49ca-895f-76b157e0df48": {
      "main": [
        [
          {
            "node": "5467970e-5117-46af-a2cb-f74985ff8964",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bce59371-6ffe-423c-9f58-f0856d64d994": {
      "main": [
        [
          {
            "node": "800d597d-57cf-4f90-852a-d2af89bd00fc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Creación de contenido, IA Multimodal

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Flujos de trabajo relacionados recomendados

Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos13
Categoría2
Tipos de nodos6
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34