使用Gemini AI自动化缺陷报告:Jotform到GitHub并发送Telegram提醒

中级

这是一个自动化工作流,包含 10 个节点。主要使用 Code、Telegram、GithubTool、GoogleSheets、JotFormTrigger 等节点。 使用Gemini AI自动化缺陷报告:Jotform到GitHub并发送Telegram提醒

前置要求
  • Telegram Bot Token
  • GitHub Personal Access Token
  • Google Sheets API 凭证
  • Google Gemini API Key

分类

未分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "93f396852104089b8670e7494b0f3668b420464668ae4a8c1d6b4b5799f8e3ef"
  },
  "nodes": [
    {
      "id": "50464290-3352-49d8-a055-af7d43754ef7",
      "name": "发送短信",
      "type": "n8n-nodes-base.telegram",
      "position": [
        832,
        560
      ],
      "webhookId": "7add611a-f26c-46ad-8a55-6ffe044d10cd",
      "parameters": {
        "text": "={{ $json.message }}",
        "chatId": "enter-your-chat-id",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "SswL7VO9b2dPGZ8r",
          "name": "jobaibot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0a0a55fe-d075-482a-baca-cd64cc8c207e",
      "name": "JotForm 触发器",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        -240,
        560
      ],
      "webhookId": "9a85ab7e-20a4-47f2-ac30-119563a0b22c",
      "parameters": {
        "form": "252865896233066",
        "onlyAnswers": false
      },
      "credentials": {
        "jotFormApi": {
          "id": "4612J1BsqtC505ac",
          "name": "secondary"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "66f6ed0c-2263-4e75-8265-c8ee563e2205",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        16,
        560
      ],
      "parameters": {
        "text": "=1. Firstly read the user submitted bug description from the below content:\n\n{{ $json.rawRequest['Bug Description'] }}\n\n2. Then secondly check whether the bug is already created in github repo or not for that use the tool named \"Get issues of a repository in GitHub\" and just check whethere the bug is already listed or not based on the context.\n\n3. If that particular issue is not there in github repo then simply create a new issue with appropiate names and for that just use the tool named \"Create an issue in GitHub\".\n\n4. And then only after following these above 3 steps above and then give output only in JSON with appropiate details:\n\nexample output:\n{\n  \"issue_name\": \"UI Freeze on Back Navigation from Settings to Home\",\n  \"issue_description\": \"A critical navigation bug occurs when a user attempts to return to the Home screen from the Settings screen. Upon initiating the back navigation action, the application's view transitions to the Home screen, but the user interface becomes completely unresponsive. All interactive elements fail to register any input, effectively trapping the user on a frozen Home screen and necessitating a full application restart to restore functionality.\",\n  \"present_in_github\": false\n}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "663dd67a-bfff-4d6b-8792-c285a65f4747",
      "name": "获取 GitHub 仓库中的问题",
      "type": "n8n-nodes-base.githubTool",
      "position": [
        0,
        816
      ],
      "webhookId": "94b33202-124c-418c-a040-f86b7ba04075",
      "parameters": {
        "owner": {
          "__rl": true,
          "mode": "url",
          "value": "="
        },
        "resource": "repository",
        "repository": {
          "__rl": true,
          "mode": "url",
          "value": "="
        },
        "getRepositoryIssuesFilters": {}
      },
      "credentials": {
        "githubApi": {
          "id": "pCtsjSJXJxiMp1uG",
          "name": "GitHub account"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "de299064-b480-4b29-9f33-68a002531bad",
      "name": "Google Gemini 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -176,
        832
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qsaK3VMNWQDWLweQ",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e2d56ba4-fd1b-4510-95da-20e2535fb766",
      "name": "在 GitHub 中创建问题",
      "type": "n8n-nodes-base.githubTool",
      "position": [
        176,
        816
      ],
      "webhookId": "71e184d6-29ff-4088-a6ca-bc068c48c912",
      "parameters": {
        "body": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Body', ``, 'string') }}",
        "owner": {
          "__rl": true,
          "mode": "url",
          "value": "="
        },
        "title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', ``, 'string') }}",
        "labels": [],
        "assignees": [],
        "repository": {
          "__rl": true,
          "mode": "url",
          "value": "="
        }
      },
      "credentials": {
        "githubApi": {
          "id": "pCtsjSJXJxiMp1uG",
          "name": "GitHub account"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "bf1272a6-7ba4-4939-b984-4d328420eb94",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        336,
        832
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"issue_name\": \"UI Freeze on Back Navigation from Settings to Home\",\n  \"issue_description\": \"A critical navigation bug occurs when a user attempts to return to the Home screen from the Settings screen. Upon initiating the back navigation action, the application's view transitions to the Home screen, but the user interface becomes completely unresponsive. All interactive elements fail to register any input, effectively trapping the user on a frozen Home screen and necessitating a full application restart to restore functionality.\",\n  \"present_in_github\": false\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "3b1f6ac3-c695-48cf-aef9-90f00224bec4",
      "name": "在表格中追加或更新行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        560
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $('JotForm Trigger').item.json.submissionID }}",
            "email": "={{ $('JotForm Trigger').item.json.rawRequest['Your Email Address'] }}",
            "issue": "={{ $json.output.issue_description }}",
            "Full name": "={{ $('JotForm Trigger').item.json.rawRequest['Your Name'].first }} {{ $('JotForm Trigger').item.json.rawRequest['Your Name'].last }}",
            "present_in_github?": "={{ $json.output.present_in_github }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "Full name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Full name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "issue",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "issue",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "present_in_github?",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "present_in_github?",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WhQv-pyvnN4-j2hvH7DgYXSS3BZKrCLZlzV2a3eVJAw/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1WhQv-pyvnN4-j2hvH7DgYXSS3BZKrCLZlzV2a3eVJAw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1WhQv-pyvnN4-j2hvH7DgYXSS3BZKrCLZlzV2a3eVJAw/edit?usp=drivesdk",
          "cachedResultName": "Github user submitted BUGS log"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "vemTjHgIvPJgj9C5",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6f5df4f5-563c-4d8b-ae1f-fede2b464754",
      "name": "JavaScript 代码",
      "type": "n8n-nodes-base.code",
      "position": [
        608,
        560
      ],
      "parameters": {
        "jsCode": "const item = items[0];\n\nconst issueDetails = item.json.issue;\nconst isPresentOnGithub = item.json['present_in_github?'];\n\nlet message = `An user submitted an issue....\\n\\n**Issue:** \"${issueDetails}\"\\n\\n`;\n\nif (isPresentOnGithub) {\n  message += \"✅ You don't need to do anything regarding this, as the issue is already reported on GitHub.\";\n} else {\n  message += \"❗ Please look into this. The issue has just been created in our GitHub repo, so take your time to review and fix it.\";\n}\n\nitem.json.message = message;\n\nreturn item;"
      },
      "typeVersion": 2
    },
    {
      "id": "aaafdc7e-0b25-471b-8ae5-eaca969d9994",
      "name": "便利贴",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        224
      ],
      "parameters": {
        "width": 1360,
        "height": 768,
        "content": "该工作流自动化处理通过表单提交的错误报告流程,包括检查 GitHub 上的重复报告、记录报告详情并发送通知。"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JotForm Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Create an issue in GitHub": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get issues of a repository in GitHub": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

这是一个中级难度的通用自动化工作流。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

需要付费吗?

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

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

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

外部链接
在 n8n.io 上查看 →

分享此工作流