Temporaire

Intermédiaire

Ceci est unEngineeringworkflow d'automatisation du domainecontenant 11 nœuds.Utilise principalement des nœuds comme If, Github, Switch, GithubTrigger. Automatisation de l'attribution des problèmes GitHub via des commandes de commentaires

Prérequis
  • Personal Access Token GitHub

Catégorie

Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "lPYVaz2xbN5zFDIL",
  "meta": {
    "instanceId": "cbc68f6c587084f6fe53914a07ed22d475640cb7a6f4ade193e6f0c6d7a06ce8",
    "templateCredsSetupCompleted": true
  },
  "name": "temp",
  "tags": [
    {
      "id": "DaQLpYItTEM2y8Gt",
      "name": "Product",
      "createdAt": "2025-06-17T10:48:17.486Z",
      "updatedAt": "2025-06-17T10:48:17.486Z"
    },
    {
      "id": "6X5c5WbCRWtxJbl2",
      "name": "AI",
      "createdAt": "2025-06-17T10:48:17.367Z",
      "updatedAt": "2025-06-17T10:48:17.367Z"
    },
    {
      "id": "ycHNTMiM8vy98zu1",
      "name": "Building blocks",
      "createdAt": "2025-06-17T10:48:17.563Z",
      "updatedAt": "2025-06-17T10:48:17.563Z"
    },
    {
      "id": "UJ6au0mv063gOupq",
      "name": "Finance",
      "createdAt": "2025-06-17T10:48:17.583Z",
      "updatedAt": "2025-06-17T10:48:17.583Z"
    },
    {
      "id": "CaWiGPzJpyfUHdxp",
      "name": "IT Ops",
      "createdAt": "2025-06-17T10:48:17.388Z",
      "updatedAt": "2025-06-17T10:48:17.388Z"
    },
    {
      "id": "6Uolue5XigSZ2IYx",
      "name": "OpenAI",
      "createdAt": "2025-06-17T10:48:17.508Z",
      "updatedAt": "2025-06-17T10:48:17.508Z"
    },
    {
      "id": "nA8GpDM4XoG5aJ0A",
      "name": "Marketing",
      "createdAt": "2025-06-17T10:48:17.532Z",
      "updatedAt": "2025-06-17T10:48:17.532Z"
    },
    {
      "id": "J4gTJX9lSPm3wByF",
      "name": "Support",
      "createdAt": "2025-06-17T10:48:17.464Z",
      "updatedAt": "2025-06-17T10:48:17.464Z"
    },
    {
      "id": "i294x7TPtUQgJkmv",
      "name": "HR",
      "createdAt": "2025-06-17T10:48:17.426Z",
      "updatedAt": "2025-06-17T10:48:17.426Z"
    }
  ],
  "nodes": [
    {
      "id": "b1e09744-5b20-4336-8760-bdd7422e9b77",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1100,
        -121
      ],
      "parameters": {
        "rules": {
          "rules": [
            {
              "value2": "opened"
            },
            {
              "output": 1,
              "value2": "created"
            }
          ]
        },
        "value1": "={{$json[\"body\"][\"action\"]}}",
        "dataType": "string"
      },
      "typeVersion": 1
    },
    {
      "id": "d8358b88-60ce-49c8-b156-6e8d29004ac1",
      "name": "SI aucun assigné ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -880,
        -300
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$json[\"body\"][\"issue\"][\"assignees\"].length}}",
              "operation": "equal"
            }
          ],
          "string": [
            {
              "value1": "={{$json[\"body\"][\"issue\"][\"body\"]}}",
              "value2": "/[a,A]ssign[\\w*\\s*]*me/gm",
              "operation": "regex"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2cbdec7e-8724-4016-b7b1-eac573946e7f",
      "name": "SI souhaite travailler ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -880,
        100
      ],
      "parameters": {
        "conditions": {
          "number": [],
          "string": [
            {
              "value1": "={{$json[\"body\"][\"comment\"][\"body\"]}}",
              "value2": "/[a,A]ssign[\\w*\\s*]*me/gm",
              "operation": "regex"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "64d80a69-acfd-4e3c-96f2-01706bf2ed48",
      "name": "SI non assigné ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -660,
        0
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$json[\"body\"][\"issue\"][\"assignees\"].length}}",
              "operation": "equal"
            }
          ],
          "string": []
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6029b9bd-1616-40c7-ae4b-9d96740151a9",
      "name": "Assigner le créateur de l'issue",
      "type": "n8n-nodes-base.github",
      "position": [
        -660,
        -400
      ],
      "webhookId": "6d201c22-4f29-49bd-b0fb-2f78756c5403",
      "parameters": {
        "owner": "={{$node[\"Switch\"].json[\"body\"][\"repository\"][\"owner\"][\"login\"]}}",
        "operation": "edit",
        "editFields": {
          "labels": [
            {
              "label": "assigned"
            }
          ],
          "assignees": [
            {
              "assignee": "={{$json.body.issue[\"user\"][\"login\"]}}"
            }
          ]
        },
        "repository": "={{$node[\"Switch\"].json[\"body\"][\"repository\"][\"name\"]}}",
        "issueNumber": "={{ $json[\"body\"][\"issue\"][\"number\"] }}",
        "authentication": "oAuth2"
      },
      "credentials": {
        "githubOAuth2Api": {
          "id": null,
          "name": "GitHub@Harshil"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e3460bc4-fe63-47db-8bbb-c288e2f3f842",
      "name": "Ajouter un commentaire",
      "type": "n8n-nodes-base.github",
      "position": [
        -440,
        100
      ],
      "webhookId": "218f39cf-64fb-41d1-92ba-0849243dee97",
      "parameters": {
        "body": "=Hey @{{$json[\"body\"][\"comment\"][\"user\"][\"login\"]}},\n\nThis issue is already assigned to {{$json[\"body\"][\"issue\"][\"assignee\"][\"login\"]}} 🙂",
        "owner": "={{$json[\"body\"][\"repository\"][\"owner\"][\"login\"]}}",
        "operation": "createComment",
        "repository": "={{$json[\"body\"][\"repository\"][\"name\"]}}",
        "issueNumber": "={{$json[\"body\"][\"issue\"][\"number\"]}}",
        "authentication": "oAuth2"
      },
      "credentials": {
        "githubOAuth2Api": {
          "id": null,
          "name": "GitHub@Harshil"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d65b9db7-8708-4ba3-b95e-c8d2a5b0c6cb",
      "name": "Assigner le commentateur",
      "type": "n8n-nodes-base.github",
      "position": [
        -440,
        -100
      ],
      "webhookId": "3ef2ace6-afe0-47ee-8bb7-3a0a837ce8b7",
      "parameters": {
        "owner": "={{$json[\"body\"][\"repository\"][\"owner\"][\"login\"]}}",
        "operation": "edit",
        "editFields": {
          "labels": [
            {
              "label": "assigned"
            }
          ],
          "assignees": [
            {
              "assignee": "={{$json[\"body\"][\"comment\"][\"user\"][\"login\"]}}"
            }
          ]
        },
        "repository": "={{$json[\"body\"][\"repository\"][\"name\"]}}",
        "issueNumber": "={{$json[\"body\"][\"issue\"][\"number\"]}}",
        "authentication": "oAuth2"
      },
      "credentials": {
        "githubOAuth2Api": {
          "id": null,
          "name": "GitHub@Harshil"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "924d54fc-2744-418a-95f2-d71eb3383f1d",
      "name": "Github Trigger1",
      "type": "n8n-nodes-base.githubTrigger",
      "position": [
        -1320,
        -100
      ],
      "webhookId": "52c5fe44-23ef-4903-b6ae-731edd36127e",
      "parameters": {
        "owner": {
          "__rl": true,
          "mode": "name",
          "value": "[username]"
        },
        "events": [
          "issue_comment",
          "issues"
        ],
        "options": {},
        "repository": {
          "__rl": true,
          "mode": "name",
          "value": "[reponame]"
        },
        "authentication": "oAuth2"
      },
      "credentials": {
        "githubOAuth2Api": {
          "id": null,
          "name": "GitHub Personal Credentials"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "96e8e530-34aa-4e55-a3b6-36fa0f94e7f4",
      "name": "Aucune opération, ne rien faire",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -660,
        -200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9954a4af-9c03-4761-930d-ee8408b77b8f",
      "name": "Aucune opération, ne rien faire1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -660,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4a8907e2-277f-4985-8dad-5799a4a46e26",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2040,
        -480
      ],
      "parameters": {
        "width": 1820,
        "height": 1000,
        "content": "GitHub Auto-Assign Workflow\nTrigger: Listens for new GitHub issues or comments.\nSwitch: Checks if the action is either \"opened\" or \"created\" (i.e. new issue opened or comment added).\nIF no assignee? If it's a new issue, checks if there's no one assigned yet and the issue body includes \"assign me\".\n\n✅ If true → Assign Issue Creator (assigns the issue to the person who opened it + adds \"assigned\" label).\n❌ Else → do nothing.\n\nIF wants to work? If it's a comment, checks if the comment includes \"assign me\".\n\nIf yes → goes to IF not assigned?\nIf the issue still has no assignee:\n\n✅ Assign Commenter (assigns the commenter + label).\n\n\nElse:\n\n💬 Add Comment \"This issue is already assigned to @someone\".\n\n\nElse → do nothing.\n\n🔧 Setup Guide (easy steps):\nClone/import: Paste this JSON into your n8n Editor (use the Import menu).\nConnect GitHub credentials:\n\nSet Github Trigger1 to listen on your owner/repo via OAuth.\nProvide OAuth credentials for the two GitHub nodes.\n\nEnable the workflow (turn it active).\nTest it out:\n\nOpen a new issue with \"assign me\" → you get assigned.\nComment \"assign me\" on unassigned issues → the commenter gets assigned.\nComment \"assign me\" on already assigned issues → auto-comment says someone else is assigned.\n\n📝 Why this is handy:\n\nAutomates GitHub triage: anyone asking gets the issue!\nKeeps things fair: avoids conflicts by checking assignments.\nScales across issues & comments with just one simple workflow.\n\n✅ Optional Tweaks:\n\nAdjust trigger events (e.g. only issues, no comments).\nChange the regex to detect other phrases.\nAdd notifications (e.g., Slack or email alerts when assignment happens)."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "acdd4625-6ad4-4b4d-9e2f-0ed7bed010b4",
  "connections": {
    "b1e09744-5b20-4336-8760-bdd7422e9b77": {
      "main": [
        [
          {
            "node": "d8358b88-60ce-49c8-b156-6e8d29004ac1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "2cbdec7e-8724-4016-b7b1-eac573946e7f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "924d54fc-2744-418a-95f2-d71eb3383f1d": {
      "main": [
        [
          {
            "node": "b1e09744-5b20-4336-8760-bdd7422e9b77",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d8358b88-60ce-49c8-b156-6e8d29004ac1": {
      "main": [
        [
          {
            "node": "6029b9bd-1616-40c7-ae4b-9d96740151a9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "96e8e530-34aa-4e55-a3b6-36fa0f94e7f4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "64d80a69-acfd-4e3c-96f2-01706bf2ed48": {
      "main": [
        [
          {
            "node": "d65b9db7-8708-4ba3-b95e-c8d2a5b0c6cb",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "e3460bc4-fe63-47db-8bbb-c288e2f3f842",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2cbdec7e-8724-4016-b7b1-eac573946e7f": {
      "main": [
        [
          {
            "node": "64d80a69-acfd-4e3c-96f2-01706bf2ed48",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "9954a4af-9c03-4761-930d-ee8408b77b8f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Ingénierie

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds11
Catégorie1
Types de nœuds6
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34