{"id":122,"name":"Automate assigning GitHub issues","nodes":[{"name":"Switch","type":"n8n-nodes-base.switch","position":[720,360],"parameters":{"rules":{"rules":[{"value2":"opened"},{"output":1,"value2":"created"}]},"value1":"={{$json[\"body\"][\"action\"]}}","dataType":"string"},"typeVersion":1,"id":"6bb99686-4529-4435-b945-b040bb0da8a4","notes":"This switch node performs automated tasks as part of the workflow."},{"name":"IF no assignee?","type":"n8n-nodes-base.if","position":[1120,220],"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":"75390d62-4841-469a-9d4f-2229e2d37f9c","notes":"This if node performs automated tasks as part of the workflow."},{"name":"NoOp","type":"n8n-nodes-base.noOp","position":[1320,320],"parameters":{},"typeVersion":1,"id":"2e28f418-d0d1-4d9e-8735-89a53e6ec9e6","notes":"This noOp node performs automated tasks as part of the workflow."},{"name":"IF wants to work?","type":"n8n-nodes-base.if","position":[920,560],"parameters":{"conditions":{"number":[],"string":[{"value1":"={{$json[\"body\"][\"comment\"][\"body\"]}}","value2":"/[a,A]ssign[\\w*\\s*]*me/gm","operation":"regex"}]}},"typeVersion":1,"id":"00125481-6875-4494-b071-93d4e462ee6b","notes":"This if node performs automated tasks as part of the workflow."},{"name":"IF not assigned?","type":"n8n-nodes-base.if","position":[1120,520],"parameters":{"conditions":{"number":[{"value1":"={{$json[\"body\"][\"issue\"][\"assignees\"].length}}","operation":"equal"}],"string":[]}},"typeVersion":1,"id":"c71a13b5-23cd-4aad-b51e-e792ddd3239e","notes":"This if node performs automated tasks as part of the workflow."},{"name":"Assign Issue Creator","type":"n8n-nodes-base.github","position":[1320,120],"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":"{{ $credentials.oAuth2 }}"},"credentials":{"githubOAuth2Api":{"id":null,"name":"GitHub@Harshil"}},"typeVersion":1,"id":"cb165d31-1063-49fe-97e8-c42d64326779","notes":"This github node performs automated tasks as part of the workflow."},{"name":"Add Comment","type":"n8n-nodes-base.github","position":[1420,660],"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":"{{ $credentials.oAuth2 }}"},"credentials":{"githubOAuth2Api":{"id":null,"name":"GitHub@Harshil"}},"typeVersion":1,"id":"7e55f1b5-4637-4735-b28a-4e0cd79e6a23","notes":"This github node performs automated tasks as part of the workflow."},{"name":"NoOp1","type":"n8n-nodes-base.noOp","position":[1120,720],"parameters":{},"typeVersion":1,"id":"57c0af72-18fc-4d89-a68e-559b9f22c03c","notes":"This noOp node performs automated tasks as part of the workflow."},{"name":"Assign Commenter","type":"n8n-nodes-base.github","position":[1420,460],"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":"{{ $credentials.oAuth2 }}"},"credentials":{"githubOAuth2Api":{"id":null,"name":"GitHub@Harshil"}},"typeVersion":1,"id":"a5c3cf61-ef1c-4b84-a866-dd71aeb564ee","notes":"This github node performs automated tasks as part of the workflow."},{"name":"Github Trigger1","type":"n8n-nodes-base.githubTrigger","position":[520,360],"webhookId":"52c5fe44-23ef-4903-b6ae-731edd36127e","parameters":{"owner":"harshil1712","events":["issue_comment","issues"],"repository":"build-discord-bot","authentication":"{{ $credentials.oAuth2 }}"},"credentials":{"githubOAuth2Api":{"id":null,"name":"GitHub Personal Credentials"}},"typeVersion":1,"id":"fa1821d6-4e25-49b3-9eae-8da38868b537","notes":"This githubTrigger node performs automated tasks as part of the workflow."},{"id":"error-fe159d41","name":"Error Handler","type":"n8n-nodes-base.stopAndError","typeVersion":1,"position":[1000,400],"parameters":{"message":"Workflow execution error","options":{}}}],"active":false,"settings":{"executionOrder":"v1","saveManualExecutions":true,"callerPolicy":"workflowsFromSameOwner","errorWorkflow":null,"timezone":"UTC","executionTimeout":3600,"maxExecutions":1000,"retryOnFail":true,"retryCount":3,"retryDelay":1000},"connections":{},"description":"Automated workflow: Automate assigning GitHub issues. This workflow processes data and performs automated tasks.","meta":{"instanceId":"workflow-216a7726","versionId":"1.0.0","createdAt":"2025-09-29T07:07:51.088894","updatedAt":"2025-09-29T07:07:51.088902","owner":"n8n-user","license":"MIT","category":"automation","status":"active","priority":"high","environment":"production"},"notes":"Excellent quality workflow: Automate assigning GitHub issues. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."}