n8n

How to Automate GitHub Issue Assignment?

Assign GitHub issues faster and keep queues clear. When a new issue is opened or someone comments assign me, the right person gets assigned without manual work. Perfect for engineering teams and open source projects that need quick triage.

An event from GitHub starts the flow for issues and issue comments. A switch checks if the action is opened or created. For new issues, it confirms there is no assignee and the issue body asks to assign me. If both are true, it assigns the issue creator and adds an assigned label. For comments, it looks for the words assign me and makes sure the issue is still unassigned. If yes, it assigns the commenter. If not, it posts a reply that names the current assignee so everyone is aligned. A regex match finds assign me in different forms and cases.

You need GitHub access with permission to manage issues and OAuth2 connected in n8n. Expect faster triage, fewer handoffs, and clear rules on who gets what. Great for first come first served queues, hackathon tasks, and internal bug intake. Most teams see less noise in threads and a smoother path from request to work.

What are the key features?

  • Listens to GitHub issue and issue comment events using a GitHub trigger.
  • Routes payloads with a switch based on action opened or created.
  • Checks if an issue has no assignees by reading the assignees length value.
  • Finds assign me requests with a regex that matches different cases and spacing.
  • Assigns the issue creator on new issues and adds an assigned label automatically.
  • Assigns the commenter when they ask to work and the issue is still free.
  • Posts a friendly comment naming the current assignee when the issue is already taken.
  • Uses OAuth2 GitHub credentials to edit issues and create comments securely.

What are the benefits?

  • Reduce manual assignment from 5 minutes per issue to under 30 seconds
  • Automate up to 90% of assignment actions on new issues and comments
  • Cut duplicate requests by 50% with clear auto replies when work is already assigned
  • Improve consistency by always adding the assigned label on assignment
  • Handle 10 times more issue traffic without extra triage time

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with GitHub. See the Tools Required section above for links to create accounts with these services.
  3. Open the workflow and double click the GitHub Trigger node. In the Credential to connect with dropdown, click Create new credential and follow the on screen steps to connect your GitHub account with OAuth2. Allow repo scope so the workflow can read and write issues and comments.
  4. In the GitHub Trigger node, set Owner and Repository to the repo you want to manage. Make sure the events Issues and Issue comment are selected. Save the node.
  5. Click Listen for events or execute the workflow once so n8n registers the webhook. In your GitHub repo, check Settings > Webhooks to confirm the webhook is active.
  6. Double click the Assign Issue Creator, Assign Commenter, and Add Comment nodes. In each one, choose the same GitHub credential in the Credential to connect with dropdown.
  7. Check the label value in the edit fields. Make sure a label named assigned exists in your GitHub repo, or change the node to use a label that exists.
  8. Test the new issue path: open a new issue with the words assign me in the body. Confirm the issue is assigned to the creator and the assigned label is added.
  9. Test the comment path: on an unassigned issue, add a comment that says assign me. Confirm the commenter is assigned and the label is added.
  10. Test the already assigned path: on an assigned issue, comment assign me from another account. Confirm a reply is added that names the current assignee and the assignment does not change.
  11. If something fails, check your GitHub permissions include write access to issues, review Webhook deliveries in GitHub for a 200 status, and verify the action values in the payload are opened and created. Adjust the regex in the IF nodes if your team uses different phrasing.
  12. Save and activate the workflow once all tests pass.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

GitHub

Sign up

Free tier: $0 / mo

Credits:
harshil1712

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.