8
n8n 中文网amn8n.com

自动化从Marker.io到Intercom的缺陷报告(含完整技术上下文)

中级

这是一个Ticket Management, Multimodal AI领域的自动化工作流,包含 7 个节点。主要使用 Code, Webhook, HttpRequest 等节点。 自动化从Marker.io到Intercom的缺陷报告(含完整技术上下文)

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "b8d4a47d3554c1f7fcd3ee16a413d67d707f3769dee6d5380a7d25c6b616c836"
  },
  "nodes": [
    {
      "id": "1422c63e-e65c-4db9-a1a5-ea6badc8299c",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        0
      ],
      "webhookId": "e373c60f-8530-4368-a486-fcc41f410b6c",
      "parameters": {
        "path": "e373c60f-8530-4368-a486-fcc41f410b6c",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "344e0ae2-f317-4db0-9156-2eb9be1ff117",
      "name": "格式化 Marker.io 数据",
      "type": "n8n-nodes-base.code",
      "position": [
        220,
        0
      ],
      "parameters": {
        "jsCode": "// Extract data from Marker.io webhook\nconst data = $input.first().json.body.data;\n\n// Format the conversation message\nconst issueTitle = data.title;\nconst issueDescription = data.description;\nconst markerId = data.markerId;\nconst priority = data.priority;\nconst issueType = data.issueType.name;\nconst publicUrl = data.publicUrl;\nconst privateUrl = data.privateUrl;\nconst dueDate = data.dueDate;\nconst browser = `${data.browser.name} ${data.browser.version}`;\nconst os = `${data.operatingSystem.family} ${data.operatingSystem.version}`;\nconst website = data.website.url;\nconst contextString = data.contextString;\n\n// Create formatted message body with Marker.io ticket link\nconst messageBody = `${issueTitle}\n${issueDescription}`;\n\n// Create formatted message body with Marker.io ticket link\nconst noteBody = `🐛 **New Issue Reported via Marker.io**\n\n**Issue:** ${issueTitle}\n**ID:** ${markerId}\n**Type:** ${issueType}\n**Priority:** ${priority}\n**Due Date:** ${dueDate ? new Date(dueDate).toLocaleDateString() : 'Not set'}\n\n**Description:**\n${issueDescription}\n\n**Technical Details:**\n• Browser: ${browser}\n• OS: ${os}\n• Website: ${website}\n• Context: ${contextString}\n\n**Marker.io Links:**\n• 🔗 [View Issue](${publicUrl})\n\n**Custom Data:**\n${Object.entries(data.customData || {}).map(([key, value]) => `• ${key}: ${value}`).join('\\n')}`;\n\nreturn [{\n  json: {\n    reporterEmail: data.reporter.email,\n    reporterName: data.reporter.name,\n    messageBody: messageBody,\n    nodeBody: noteBody,\n    issueId: data.id,\n    markerId: markerId,\n    priority: priority,\n    issueType: issueType,\n    publicUrl: publicUrl,\n    privateUrl: privateUrl,\n    projectId: data.project.id\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "c6e59c93-8830-403a-adee-b80f4434359d",
      "name": "创建/更新联系人",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        440,
        0
      ],
      "parameters": {
        "url": "https://api.intercom.io/contacts",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "role",
              "value": "user"
            },
            {
              "name": "email",
              "value": "={{ $json.reporterEmail }}"
            },
            {
              "name": "name",
              "value": "={{ $json.reporterName }}"
            }
          ]
        },
        "nodeCredentialType": "intercomApi"
      },
      "credentials": {
        "intercomApi": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 4.2,
      "continueOnFail": true
    },
    {
      "id": "ac375334-4e47-47b2-a6dd-ae95ff5a2039",
      "name": "创建对话",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        660,
        0
      ],
      "parameters": {
        "url": "https://api.intercom.io/conversations",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "from",
              "value": "={{ { \"type\": \"user\", \"email\": $('Format Marker.io Data').item.json.reporterEmail } }}"
            },
            {
              "name": "body",
              "value": "={{ $('Format Marker.io Data').item.json.messageBody }}"
            },
            {
              "name": "message_type",
              "value": "inapp"
            }
          ]
        },
        "nodeCredentialType": "intercomApi"
      },
      "credentials": {
        "intercomApi": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ac1a3de3-022a-4aff-b330-6b8c912ecb3b",
      "name": "添加内部备注",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        0
      ],
      "parameters": {
        "url": "=https://api.intercom.io/conversations/{{ $json.conversation_id }}/parts",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "jsonHeaders": "[\n            {\n              \"name\": \"Accept\",\n              \"value\": \"application/json\"\n            },\n            {\n              \"name\": \"Intercom-Version\",\n              \"value\": \"2.13\"\n            }\n          ]",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "message_type",
              "value": "note"
            },
            {
              "name": "body",
              "value": "={{ $('Format Marker.io Data').item.json.nodeBody }}"
            },
            {
              "name": "admin_id",
              "value": ""
            }
          ]
        },
        "specifyHeaders": "json",
        "nodeCredentialType": "intercomApi"
      },
      "credentials": {
        "intercomApi": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e66ca32c-c7c6-459a-a276-d4e3199a589b",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -640
      ],
      "parameters": {
        "width": 700,
        "height": 2220,
        "content": "# Marker.io 到 Intercom 集成"
      },
      "typeVersion": 1
    },
    {
      "id": "8cb11d36-ef6b-498a-9c78-272b592357b4",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        540
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 420,
        "content": "## 🚨 故障排除"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Format Marker.io Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Conversation": {
      "main": [
        [
          {
            "node": "Add Internal Note",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create/Update Contact": {
      "main": [
        [
          {
            "node": "Create Conversation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Marker.io Data": {
      "main": [
        [
          {
            "node": "Create/Update Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 工单管理, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
中级
节点数量7
分类2
节点类型4
难度说明

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

作者
Marker.io

Marker.io

@markerio

Marker.io is a visual feedback and bug reporting tool primarily used by web development and design teams. It allows users to capture screenshots, annotate them with comments and drawings, and then send them directly to project management or issue tracking tools like Jira, Trello, GitHub, or Asana.

外部链接
在 n8n.io 查看

分享此工作流