8
n8n 中文网amn8n.com

Partnerstack通知

中级

这是一个Marketing领域的自动化工作流,包含 6 个节点。主要使用 Set, Webhook, Telegram, GoogleSheets 等节点。 使用Google Sheets和Telegram通知追踪Partnerstack联盟事件

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • Telegram Bot Token
  • Google Sheets API 凭证

分类

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "lFocIkQMljDaZxLO",
  "meta": {
    "instanceId": "9219ebc7795bea866f70aa3d977d54417fdf06c41944be95e20cfb60f992db19",
    "templateCredsSetupCompleted": true
  },
  "name": "Partnerstack 通知",
  "tags": [],
  "nodes": [
    {
      "id": "dfb1df25-fe32-490c-82bc-237d0a888797",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        0
      ],
      "webhookId": "32a160b4-df74-447a-ab12-c98abe411862",
      "parameters": {
        "path": "32a160b4-df74-447a-ab12-c98abe411862",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "19c189b6-c7ed-402f-9b93-1f1a35259888",
      "name": "在表格中追加行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        220,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "date": "={{ new Date($json.body.data.created_at).toISOString().split('T')[0] }}",
            "tool": "={{ $json.body.data.company.name }}",
            "email": "={{ $json.body.data.customer_email }}",
            "eventName": "={{ $json.body.event }}",
            "customerName": "={{ $json.body.data.customer_name }}"
          },
          "schema": [
            {
              "id": "date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "eventName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "eventName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tool",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "tool",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "customerName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "customerName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "email",
              "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/1HOI6sdJ4mzclXy1gE5X1nhoxpjXfnVDhj2ka60SP28g/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1HOI6sdJ4mzclXy1gE5X1nhoxpjXfnVDhj2ka60SP28g",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HOI6sdJ4mzclXy1gE5X1nhoxpjXfnVDhj2ka60SP28g/edit?usp=drivesdk",
          "cachedResultName": "Partnerstack affiliate activity"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "twZdLFsI3kTnqtpG",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "c58f295c-3827-4515-8c71-809e07ef0e15",
      "name": "发送通知",
      "type": "n8n-nodes-base.telegram",
      "position": [
        660,
        0
      ],
      "webhookId": "38561aa9-a526-4af9-aa0c-bc2324da0eb5",
      "parameters": {
        "text": "=New Partnerstack event\n\nEvent: {{ $('Webhook').item.json.body.event }}\nTool: {{ $('Webhook').item.json.body.data.company.name }}\nCustomer: {{ $('Webhook').item.json.body.data.customer_name }}\nEmail: {{ $('Webhook').item.json.body.data.customer_email }}",
        "chatId": "={{ $json.chatId }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "IgrntTxsoDphh19z",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1326d545-200e-47fd-a586-5c4377384db9",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -80
      ],
      "parameters": {
        "width": 320,
        "height": 280,
        "content": "## 设置说明"
      },
      "typeVersion": 1
    },
    {
      "id": "8f167af4-93ea-405e-ba40-bb69df62d04e",
      "name": "设置聊天 ID",
      "type": "n8n-nodes-base.set",
      "position": [
        440,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9e585adf-f859-4743-81d1-c2a926562418",
              "name": "chatId",
              "type": "string",
              "value": "setyourTelgramChatIdHere"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "aab27664-d925-49ad-93ed-20adbc0c8b69",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -180
      ],
      "parameters": {
        "width": 220,
        "height": 340,
        "content": "## 设置聊天 ID"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "pinData": {
    "Webhook": [
      {
        "json": {
          "body": {
            "data": {
              "key": "cus_kHCXptpVKkEw6T",
              "company": {
                "key": "co_Ntps4hS7cFDkkp",
                "name": "n8n"
              },
              "sub_ids": [],
              "has_paid": false,
              "created_at": 1748540404000,
              "updated_at": 1748540741711,
              "customer_name": null,
              "customer_email": null,
              "partnership_key": "part_DhqN6HNMHtGhSZ"
            },
            "test": false,
            "event": "customer.created"
          },
          "query": {},
          "params": {},
          "headers": {
            "host": "n8n-hetzner-2cpu4ram-u42935.vm.elestio.app",
            "accept": "*/*",
            "x-real-ip": "35.196.45.91",
            "connection": "close",
            "tracestate": "dd=p:f6962dc5ada0af2d;s:0;t.dm:-1;t.tid:68389d4700000000",
            "user-agent": "python-requests/2.26.0",
            "traceparent": "00-68389d470000000012662df2ee7cec22-f6962dc5ada0af2d-00",
            "content-type": "application/json",
            "content-length": "320",
            "x-datadog-tags": "_dd.p.dm=-1,_dd.p.tid=68389d4700000000",
            "accept-encoding": "gzip, deflate",
            "x-forwarded-for": "35.196.45.91",
            "x-forwarded-port": "443",
            "x-forwarded-proto": "https",
            "x-datadog-trace-id": "1325797661713689634",
            "x-datadog-parent-id": "17768439706881666861",
            "x-datadog-sampling-priority": "0"
          },
          "webhookUrl": "https://n8n-hetzner-2cpu4ram-u42935.vm.elestio.app/webhook/32a160b4-df74-447a-ab12-c98abe411862",
          "executionMode": "production"
        }
      }
    ]
  },
  "settings": {
    "timezone": "Europe/Madrid",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "qFOYM3IA9QZ7fMym",
    "executionOrder": "v1"
  },
  "versionId": "9d05edb1-dd83-4263-afdd-15f336c20cd4",
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Append Row in Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Chat Id": {
      "main": [
        [
          {
            "node": "Send Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Row in Sheets": {
      "main": [
        [
          {
            "node": "Set Chat Id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 营销

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量6
分类1
节点类型5
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Aitor | 1Node

Aitor | 1Node

@aitoralonso

Hi, I’m Aitor. At 1Node we help businesses integrate full-scale AI solutions that save time, cut costs, and increase revenue. Guaranteed. Need help implementing AI infrastructures?

外部链接
在 n8n.io 查看

分享此工作流