8
n8n 中文网amn8n.com

从Outlook邮件支持请求自动创建JIRA问题

中级

这是一个Engineering, Support, AI领域的自动化工作流,包含 12 个节点。主要使用 Jira, Markdown, ScheduleTrigger, MicrosoftOutlook, RemoveDuplicates 等节点,结合人工智能技术实现智能自动化。 从Outlook邮件支持请求自动创建JIRA问题

前置要求
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "154458b0-dde3-4224-9fa8-d38a025aa0d3",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -640,
        -140
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0fc88546-50ef-4183-8fb2-dcea939f3bcf",
      "name": "获取最近消息",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        -440,
        -140
      ],
      "webhookId": "48619a9a-d7a5-47af-983d-146e377d8767",
      "parameters": {
        "fields": [
          "body",
          "categories",
          "conversationId",
          "from",
          "hasAttachments",
          "internetMessageId",
          "sender",
          "subject",
          "toRecipients",
          "receivedDateTime",
          "webLink"
        ],
        "output": "fields",
        "options": {},
        "filtersUI": {
          "values": {
            "filters": {
              "receivedAfter": "={{ $now.minus({ \"hour\": 1 }).toISO() }}"
            }
          }
        },
        "operation": "getAll"
      },
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "id": "EWg6sbhPKcM5y3Mr",
          "name": "Microsoft Outlook account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d056be7e-43ed-4fea-8aef-36579c656633",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        280,
        40
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "8gccIjcuf3gvaoEr",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e4b6fd9d-2506-45bf-bd80-a81a2c04306b",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        480,
        40
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"labels\": {\n      \"type\": \"array\",\n      \"items\": { \"type\": \"string\" }\n    },\n    \"priority\": { \"type\": \"number\" },\n    \"summary\": { \"type\": \"string\" },\n    \"description\": { \"type\": \"string\" }\n  }\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "3cef25fc-2581-4556-bf54-7704815d98b3",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -340
      ],
      "parameters": {
        "color": 7,
        "width": 700,
        "height": 540,
        "content": "## 2. 自动生成并分类工单"
      },
      "typeVersion": 1
    },
    {
      "id": "d6ba8c9b-3e39-442f-8b79-cafe11c15a18",
      "name": "Markdown",
      "type": "n8n-nodes-base.markdown",
      "position": [
        100,
        -140
      ],
      "parameters": {
        "html": "={{ $json.body.content }}",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "fb7c6d7c-df30-43de-8f37-9e394a8ad7aa",
      "name": "创建问题",
      "type": "n8n-nodes-base.jira",
      "position": [
        900,
        -140
      ],
      "parameters": {
        "project": {
          "__rl": true,
          "mode": "id",
          "value": "10000"
        },
        "summary": "={{ $json.output.summary }}",
        "issueType": {
          "__rl": true,
          "mode": "id",
          "value": "10000"
        },
        "additionalFields": {
          "labels": "={{ $json.output.labels }}",
          "priority": {
            "__rl": true,
            "mode": "id",
            "value": "={{ $json.output.priority }}"
          },
          "description": "={{ $json.output.description }}"
        }
      },
      "credentials": {
        "jiraSoftwareCloudApi": {
          "id": "IH5V74q6PusewNjD",
          "name": "Jira SW Cloud account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9e26f402-36da-40e1-a736-db4fe16de54a",
      "name": "标记为已读",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        -240,
        -140
      ],
      "parameters": {
        "options": {},
        "operation": "removeItemsSeenInPreviousExecutions",
        "dedupeValue": "={{ $json.id }}"
      },
      "typeVersion": 2
    },
    {
      "id": "b5f49877-e494-4712-a937-1f348198700e",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        -340
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 540,
        "content": "## 1. 监控 Outlook 收件箱中的支持邮件"
      },
      "typeVersion": 1
    },
    {
      "id": "b9d08834-14ad-4cdf-bc20-411033eee5b7",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -340
      ],
      "parameters": {
        "color": 7,
        "width": 460,
        "height": 440,
        "content": "## 3. 在 JIRA 中创建问题"
      },
      "typeVersion": 1
    },
    {
      "id": "e6942a39-1893-44cf-a846-c6b4d9c37e92",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1160,
        -720
      ],
      "parameters": {
        "width": 380,
        "height": 940,
        "content": "## 试试看!"
      },
      "typeVersion": 1
    },
    {
      "id": "71a906b2-7b01-43a8-aa82-7d9810d95e23",
      "name": "从支持请求生成问题",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        300,
        -140
      ],
      "parameters": {
        "text": "=Reported by {{ $json.from.emailAddress.name }} <{{ $json.from.emailAddress.address }}>\nReported at: {{ $now.toISO() }}\nSummary: {{ $json.subject }}\nDescription:\n{{ $json.data.replaceAll('\\n', ' ') }}",
        "messages": {
          "messageValues": [
            {
              "message": "=Your are JIRA triage assistant who's task is to\n1) classify and label the given issue.\n2) Prioritise the given issue.\n3) Rewrite the issue summary and description.\n\n## Labels\nUse one or more. Use words wrapped in \"[]\" (square brackets):\n* Technical\n* Account\n* Access\n* Billing\n* Product\n* Training\n* Feedback\n* Complaints\n* Security\n* Privacy\n\n## Priority\n* 1 - highest\n* 2 - high\n* 3 - medium\n* 4 - low\n* 5 - lowest\n\n## Write Summary and Description\n* Remove emotional and anedotal phrases or information\n* Keep to the facts of the matter\n* Highlight what was attempted and is/was failing"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.6
    }
  ],
  "pinData": {},
  "connections": {
    "Markdown": {
      "main": [
        [
          {
            "node": "Generate Issue From Support Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Seen": {
      "main": [
        [
          {
            "node": "Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Recent Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Issue From Support Request",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get Recent Messages": {
      "main": [
        [
          {
            "node": "Mark as Seen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Issue From Support Request",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Issue From Support Request": {
      "main": [
        [
          {
            "node": "Create Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 工程, 客户支持, 人工智能

需要付费吗?

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

工作流信息
难度等级
中级
节点数量12
分类3
节点类型9
难度说明

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

作者
Jimleuk

Jimleuk

@jimleuk

Freelance consultant based in the UK specialising in AI-powered automations. I work with select clients tackling their most challenging projects. For business enquiries, send me an email at hello@jimle.uk LinkedIn: https://www.linkedin.com/in/jimleuk/ X/Twitter: https://x.com/jimle_uk

外部链接
在 n8n.io 查看

分享此工作流