8
n8n 中文网amn8n.com

将Marker.io可视化错误报告转换为带技术上下文的Zendesk支持工单

中级

这是一个Ticket Management, Multimodal AI领域的自动化工作流,包含 7 个节点。主要使用 Code, Webhook, HttpRequest 等节点。 将Marker.io可视化错误报告转换为带技术上下文的Zendesk支持工单

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "b8d4a47d3554c1f7fcd3ee16a413d67d707f3769dee6d5380a7d25c6b616c836"
  },
  "nodes": [
    {
      "id": "912f522b-6e2f-4c8d-9271-173a6b0ed780",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        300,
        -120
      ],
      "webhookId": "a1bfef52-25c9-4a7d-916f-87c0ca195305",
      "parameters": {
        "path": "a1bfef52-25c9-4a7d-916f-87c0ca195305",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "9decf387-197b-4da6-9fd4-c01b19d031d3",
      "name": "格式化 Marker.io 数据",
      "type": "n8n-nodes-base.code",
      "position": [
        520,
        -120
      ],
      "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    messageTitle: data.title,\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    reporterRole: data.reporter.role,\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "2dba9246-37f2-4c47-a09e-9d2cacbf28ae",
      "name": "创建/更新用户",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        740,
        -120
      ],
      "parameters": {
        "url": "https://[REPLACE_SUBDOMAIN].zendesk.com/api/v2/users/create_or_update.json",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "user",
              "value": "={{ { \"name\": $json.reporterName, \"email\": $json.reporterEmail, \"role\": $json.reporterRole } }}"
            }
          ]
        },
        "nodeCredentialType": "zendeskApi"
      },
      "typeVersion": 4.2,
      "continueOnFail": true
    },
    {
      "id": "857bb007-3ada-4a0e-bd8b-7e30c2b228c8",
      "name": "创建工单",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        960,
        -120
      ],
      "parameters": {
        "url": "https://[REPLACE_SUBDOMAIN].zendesk.com/api/v2/tickets.json",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "ticket",
              "value": "={{ {\n  \"subject\": $('Format Marker.io Data').item.json.messageTitle,\n  \"comment\": {\n    \"body\": $('Format Marker.io Data').item.json.messageBody\n  },\n  \"requester\": {\n    \"email\": $('Format Marker.io Data').item.json.reporterEmail,\n    \"name\": $('Format Marker.io Data').item.json.reporterName\n  },\n  \"priority\": $('Format Marker.io Data').item.json.priority,\n  \"tags\": [\"marker-io\", $('Format Marker.io Data').item.json.issueType],\n  \"custom_fields\": [\n    {\n      \"id\": 123456,\n      \"value\": $('Format Marker.io Data').item.json.markerId\n    }\n  ]\n} }}"
            }
          ]
        },
        "nodeCredentialType": "zendeskApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "ce5b6b09-9d82-4d0b-8a1c-fcbafa4e97d6",
      "name": "添加内部评论",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1180,
        -120
      ],
      "parameters": {
        "url": "=https://[REPLACE_SUBDOMAIN].zendesk.com/api/v2/tickets/{{ $json.ticket.id }}.json",
        "method": "PUT",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "ticket",
              "value": "={{ {\n  \"comment\": {\n    \"body\": $('Format Marker.io Data').item.json.nodeBody,\n    \"public\": false\n  }\n} }}"
            }
          ]
        },
        "nodeCredentialType": "zendeskApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "974302df-baf6-4fed-a2a8-26b702a522a0",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -740
      ],
      "parameters": {
        "width": 700,
        "height": 2160,
        "content": "# Marker.io 到 Zendesk 集成"
      },
      "typeVersion": 1
    },
    {
      "id": "a821b1b9-2fba-408e-bb55-04ae69cd02e4",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        240
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 620,
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Format Marker.io Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Ticket": {
      "main": [
        [
          {
            "node": "Add Internal Comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create/Update User": {
      "main": [
        [
          {
            "node": "Create Ticket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Marker.io Data": {
      "main": [
        [
          {
            "node": "Create/Update User",
            "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 查看

分享此工作流