Auto-fix ClickUp bug reports with OpenAI, Cursor, GitHub and Slack
Quick overview This workflow receives ClickUp bug reports via webhook, uses OpenAI to plan a fix, optionally asks for developer approval in Slack, then triggers Cursor’s background agent to implement and test the change, opens a GitHub pull request, and updates the ClickUp task status.
How it works Receives a POST webhook from ClickUp containing the bug details and repository information. Uses OpenAI to analyze the bug and return a structured JSON plan with root cause, affected files, fix approach, complexity, confidence, test plan, and risk flags. Validates and normalizes the AI output, scans for high-risk keywords, and deterministically decides whether the bug is eligible for automated fixing. If the fix is not eligible, posts the analysis to a Slack channel and waits for a developer to approve before continuing. Builds a Cursor background-agent task (branch name, prompt, and test command), triggers Cursor via HTTP, and waits for Cursor to report completion with test results and a diff summary. Creates a GitHub pull request (draft if tests failed), updates the ClickUp task status accordingly, and responds to the original webhook with a JSON summary including the PR link.
Setup Add credentials for OpenAI, Slack, ClickUp, GitHub, and an HTTP Header Auth credential for the Cursor API. Configure ClickUp to send bug tasks to the workflow webhook path clickup-bug-autofix with fields like taskId, taskName/description/stackTrace, repoUrl, repoBranch, priority, and listId. Update the workflow configuration values for GitHub owner/repo, Cursor API URL/model, Slack channel, test command, and the auto-fix confidence threshold. Set the Cursor callback URL to the workflow’s “wait for Cursor completion” resume webhook and ensure Cursor includes expected fields like testsPassed, filesChanged, and diffSummary in its callback payload. If you use manual approval, connect your Slack approval mechanism to the workflow’s “wait for developer approval” resume webhook and include reviewer metadata (for example reviewedBy and notes).
Related Templates
AI Weather Forecasts with MCP Integration
Real-time Weather Forecasts with MCP Tools This n8n workflow demonstrates how to integrate real-time weather intelligen...
Create a Speech-to-Text API with OpenAI GPT4o-mini Transcribe
Description This template provides a simple and powerful backend for adding speech-to-text capabilities to any applicat...
Build a Restaurant Voice Assistant with VAPI and PostgreSQL for Bookings & Orders
This n8n template demonstrates how to create a comprehensive voice-powered restaurant assistant that handles table reser...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments