n8n recipe · ai

Github → OpenAI → GitHub

A new GitHub issue is classified by OpenAI (bug, question, feature...) and the result is left as a comment on the issue.

깃허브에 새 이슈가 열리면 OpenAI가 종류를 나누고 그 이슈에 댓글로 달아요.

Steps

  1. When when a new github issue is opened — Github node
  2. Then classify it with openai — OpenAI node
  3. Then add a comment on the issue — GitHub node

Fields to fill (6)

The file has every node wired up. These are the blanks only you can fill (your form, your sheet, your words).

NodeWhat to do
Githubfill owner (Repository Owner)
Githubfill repository (Repository Name)
OpenAIfill modelId (Model)
GitHubfill owner (Repository Owner)
GitHubfill repository (Repository Name)
GitHubfill body (what it should say) — the AI step's output: run that node once in n8n and pick its output field

Accounts to connect (3)

In n8n, pick or add a credential on each node — one of the types below.

Get the n8n file

Download github-issue-classify-comment.json

  1. Open a new, empty workflow in n8n.
  2. Open the workflow menu (⋯) and choose Import from File — or copy the JSON below and paste it onto the canvas (Ctrl/Cmd+V).
  3. Connect the accounts, fill the fields above, run one test, then turn the workflow on.
Or copy the JSON
{
  "name": "A new GitHub issue is classified by OpenAI (bug",
  "nodes": [
    {
      "id": "n1",
      "name": "Github Trigger",
      "type": "n8n-nodes-base.githubTrigger",
      "typeVersion": 1,
      "parameters": {
        "events": [
          "create"
        ],
        "owner": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "repository": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "position": [
        240,
        300
      ],
      "notes": "step: when a new github issue is opened"
    },
    {
      "id": "n2",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 2.3,
      "parameters": {
        "resource": "text",
        "operation": "response",
        "responses": {
          "values": [
            {
              "type": "text",
              "role": "user",
              "content": "=Classify it:\n\n{{ JSON.stringify($json) }}"
            }
          ]
        },
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "position": [
        460,
        300
      ],
      "notes": "step: classify it with openai"
    },
    {
      "id": "n3",
      "name": "GitHub",
      "type": "n8n-nodes-base.github",
      "typeVersion": 1.1,
      "parameters": {
        "resource": "issue",
        "operation": "createComment",
        "owner": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "repository": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "issueNumber": 0,
        "body": ""
      },
      "position": [
        680,
        300
      ],
      "notes": "step: add a comment on the issue"
    }
  ],
  "connections": {
    "Github Trigger": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "GitHub",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false
}