AutomationFlowsData & Sheets › Pr Monitoring & Comment System

Pr Monitoring & Comment System

PR Monitoring & Comment System. Uses github, httpRequest, postgres. Webhook trigger; 18 nodes.

Webhook trigger★★★★☆ complexity18 nodesGitHubHTTP RequestPostgres
Data & Sheets Trigger: Webhook Nodes: 18 Complexity: ★★★★☆ Added:

This workflow follows the GitHub → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "PR Monitoring & Comment System",
  "nodes": [
    {
      "parameters": {
        "path": "pr-delegated",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-pr-delegated",
      "name": "Webhook: PR Delegated",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1.1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "path": "agent-status",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-agent-status",
      "name": "Webhook: Agent Status",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1.1,
      "position": [
        250,
        500
      ]
    },
    {
      "parameters": {
        "path": "test-results",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-test-results",
      "name": "Webhook: Test Results",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1.1,
      "position": [
        250,
        700
      ]
    },
    {
      "parameters": {
        "resource": "issue",
        "operation": "createComment",
        "owner": "={{$json.owner || 'Wallesters-org'}}",
        "repository": "={{$json.repository || 'Wallestars'}}",
        "issueNumber": "={{$json.pr_number}}",
        "body": "=\ud83e\udd16 **\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u043d \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433**\\n\\n**\u0421\u0442\u0430\u0442\u0443\u0441:** PR \u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0430\u043d \u043a\u044a\u043c `{{$json.agent}}`\\n\\n**\u041e\u0447\u0430\u043a\u0432\u0430\u043d\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:**\\n- Code review\\n- \u0422\u0435\u0441\u0442\u0432\u0430\u043d\u0435\\n- \u041e\u0434\u043e\u0431\u0440\u0435\u043d\u0438\u0435\\n\\n**\u0412\u0440\u0435\u043c\u0435:** {{$json.timestamp}}\\n\\n---\\n_\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0430\u043d\u043e \u043e\u0442 n8n workflow_"
      },
      "id": "github-comment-delegated",
      "name": "GitHub: Comment on Delegated PR",
      "type": "n8n-nodes-base.github",
      "typeVersion": 1,
      "position": [
        450,
        300
      ],
      "credentials": {
        "githubApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "={{$json.pr_url || $json.url}}",
        "method": "GET",
        "options": {}
      },
      "id": "check-pr-status",
      "name": "Check PR Status",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition-1",
              "leftValue": "={{$json.state}}",
              "rightValue": "open",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "if-pr-open",
      "name": "IF: PR Open",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        850,
        300
      ]
    },
    {
      "parameters": {
        "resource": "issue",
        "operation": "createComment",
        "owner": "Wallesters-org",
        "repository": "Wallestars",
        "issueNumber": "={{$json.pr_number}}",
        "body": "=\u26a0\ufe0f **\u041d\u0430\u043f\u043e\u043c\u043d\u044f\u043d\u0435 \u0437\u0430 \u043f\u0440\u043e\u0433\u0440\u0435\u0441**\\n\\n\u041c\u0438\u043d\u0430\u0445\u0430 30 \u043c\u0438\u043d\u0443\u0442\u0438 \u043e\u0442 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0430\u043d\u0435\u0442\u043e \u043d\u0430 \u0442\u043e\u0437\u0438 PR.\\n\\n**\u041c\u043e\u043b\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u0439 \u0441\u0442\u0430\u0442\u0443\u0441\u0430**\\n\\n---\\n_\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043d\u0430\u043f\u043e\u043c\u043d\u044f\u043d\u0435 \u043e\u0442 n8n_"
      },
      "id": "github-reminder",
      "name": "GitHub: Send Reminder",
      "type": "n8n-nodes-base.github",
      "typeVersion": 1,
      "position": [
        1050,
        200
      ],
      "credentials": {
        "githubApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "unit": "minutes",
        "amount": 30
      },
      "id": "wait-30min",
      "name": "Wait 30 Minutes",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1050,
        300
      ]
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "=INSERT INTO pr_tracking (pr_number, agent, status, delegated_at, repository)\\nVALUES ({{$json.pr_number}}, '{{$json.agent}}', 'delegated', NOW(), '{{$json.repository || 'Wallestars'}}')\\nON CONFLICT (pr_number) DO UPDATE SET\\n  agent = EXCLUDED.agent,\\n  status = EXCLUDED.status,\\n  last_updated = NOW();"
      },
      "id": "supabase-insert",
      "name": "Supabase: Track PR",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.4,
      "position": [
        450,
        400
      ],
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "// \u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0430\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u043d\u0430 \u0430\u0433\u0435\u043d\u0442\u0438\u0442\u0435\\nconst agents = $json.agents;\\nconst alerts = [];\\n\\nfor (const [agentName, status] of Object.entries(agents)) {\\n  // \u041f\u0440\u043e\u0432\u0435\u0440\u0438 \u0437\u0430 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0438 \u0430\u0433\u0435\u043d\u0442\u0438\\n  if (!status.is_active && status.assigned_prs > 0) {\\n    alerts.push({\\n      agent: agentName,\\n      type: 'inactive',\\n      message: `\u0410\u0433\u0435\u043d\u0442 ${agentName} \u0435 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u0435\u043d \u0441 ${status.assigned_prs} \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438 PR-\u043e\u0432\u0435`,\\n      severity: 'warning'\\n    });\\n  }\\n  \\n  // \u041f\u0440\u043e\u0432\u0435\u0440\u0438 \u0437\u0430 \u043f\u0440\u0435\u0442\u043e\u0432\u0430\u0440\u0435\u043d\u0438 \u0430\u0433\u0435\u043d\u0442\u0438\\n  if (status.assigned_prs > 5) {\\n    alerts.push({\\n      agent: agentName,\\n      type: 'overloaded',\\n      message: `\u0410\u0433\u0435\u043d\u0442 ${agentName} \u0438\u043c\u0430 \u0442\u0432\u044a\u0440\u0434\u0435 \u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438 PR-\u043e\u0432\u0435 (${status.assigned_prs})`,\\n      severity: 'high'\\n    });\\n  }\\n}\\n\\nreturn alerts.map(alert => ({ json: alert }));"
      },
      "id": "analyze-agents",
      "name": "Code: Analyze Agent Status",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        450,
        500
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition-alert",
              "leftValue": "={{$json.severity}}",
              "rightValue": "high",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "id": "if-critical-alert",
      "name": "IF: Critical Alert",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        650,
        500
      ]
    },
    {
      "parameters": {
        "resource": "issue",
        "operation": "create",
        "owner": "Wallesters-org",
        "repository": "Wallestars",
        "title": "=\ud83d\udea8 \u041a\u0440\u0438\u0442\u0438\u0447\u0435\u043d Alert: {{$json.agent}}",
        "body": "=**\u0422\u0438\u043f:** {{$json.type}}\\n\\n**\u0421\u044a\u043e\u0431\u0449\u0435\u043d\u0438\u0435:**\\n{{$json.message}}\\n\\n**Severity:** {{$json.severity}}\\n\\n**\u0412\u0440\u0435\u043c\u0435:** {{$now.toISO()}}\\n\\n---\\n_\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0441\u044a\u0437\u0434\u0430\u0434\u0435\u043d \u043e\u0442 n8n monitoring system_",
        "labels": "alert,automated,agent-monitoring"
      },
      "id": "github-create-alert-issue",
      "name": "GitHub: Create Alert Issue",
      "type": "n8n-nodes-base.github",
      "typeVersion": 1,
      "position": [
        850,
        450
      ],
      "credentials": {
        "githubApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "// \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u0442\u0430\u0442\u0438\u0442\u0435 \u043e\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u0435\u0442\u0435\\nconst testData = $json;\\n\\nconst summary = {\\n  workflow: testData.workflow,\\n  pr_number: testData.pr_number,\\n  timestamp: testData.timestamp,\\n  all_passed: testData.tests_passed === 'success' && \\n              testData.code_quality === 'success' && \\n              testData.security_scan === 'success' && \\n              testData.build_verification === 'success',\\n  results: {\\n    tests: testData.tests_passed,\\n    quality: testData.code_quality,\\n    security: testData.security_scan,\\n    build: testData.build_verification\\n  }\\n};\\n\\nconst emoji = summary.all_passed ? '\u2705' : '\u274c';\\nconst status = summary.all_passed ? '\u0412\u0441\u0438\u0447\u043a\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0435 \u043f\u0440\u0435\u043c\u0438\u043d\u0430\u0442\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e' : '\u041d\u044f\u043a\u043e\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0435 \u0441\u0435 \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0445\u0430';\\n\\nsummary.comment = `${emoji} **\u0420\u0435\u0437\u0443\u043b\u0442\u0430\u0442\u0438 \u043e\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u0435\u0442\u0435**\\n\\n${status}\\n\\n**\u0414\u0435\u0442\u0430\u0439\u043b\u0438:**\\n- \u0422\u0435\u0441\u0442\u043e\u0432\u0435: ${testData.tests_passed === 'success' ? '\u2705' : '\u274c'}\\n- Code Quality: ${testData.code_quality === 'success' ? '\u2705' : '\u274c'}\\n- Security Scan: ${testData.security_scan === 'success' ? '\u2705' : '\u274c'}\\n- Build: ${testData.build_verification === 'success' ? '\u2705' : '\u274c'}\\n\\n**\u0412\u0440\u0435\u043c\u0435:** ${testData.timestamp}\\n\\n---\\n_\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0430\u043d\u043e \u043e\u0442 n8n testing system_`;\\n\\nreturn { json: summary };"
      },
      "id": "process-test-results",
      "name": "Code: Process Test Results",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        450,
        700
      ]
    },
    {
      "parameters": {
        "resource": "issue",
        "operation": "createComment",
        "owner": "Wallesters-org",
        "repository": "Wallestars",
        "issueNumber": "={{$json.pr_number}}",
        "body": "={{$json.comment}}"
      },
      "id": "github-test-comment",
      "name": "GitHub: Post Test Results",
      "type": "n8n-nodes-base.github",
      "typeVersion": 1,
      "position": [
        650,
        700
      ],
      "credentials": {
        "githubApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "=INSERT INTO test_results (pr_number, workflow, all_passed, tests_passed, code_quality, security_scan, build_verification, timestamp)\\nVALUES ({{$json.pr_number}}, '{{$json.workflow}}', {{$json.all_passed}}, '{{$json.results.tests}}', '{{$json.results.quality}}', '{{$json.results.security}}', '{{$json.results.build}}', '{{$json.timestamp}}');"
      },
      "id": "supabase-test-results",
      "name": "Supabase: Store Test Results",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.4,
      "position": [
        850,
        700
      ],
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"status\": \"success\", \"message\": \"PR delegated webhook processed\" } }}"
      },
      "id": "respond-delegated",
      "name": "Respond: Delegated",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1250,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"status\": \"success\", \"message\": \"Agent status webhook processed\" } }}"
      },
      "id": "respond-status",
      "name": "Respond: Status",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1050,
        500
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"status\": \"success\", \"message\": \"Test results webhook processed\" } }}"
      },
      "id": "respond-tests",
      "name": "Respond: Tests",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1050,
        700
      ]
    }
  ],
  "connections": {
    "Webhook: PR Delegated": {
      "main": [
        [
          {
            "node": "GitHub: Comment on Delegated PR",
            "type": "main",
            "index": 0
          },
          {
            "node": "Supabase: Track PR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub: Comment on Delegated PR": {
      "main": [
        [
          {
            "node": "Check PR Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check PR Status": {
      "main": [
        [
          {
            "node": "IF: PR Open",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: PR Open": {
      "main": [
        [
          {
            "node": "Wait 30 Minutes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 30 Minutes": {
      "main": [
        [
          {
            "node": "GitHub: Send Reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub: Send Reminder": {
      "main": [
        [
          {
            "node": "Respond: Delegated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook: Agent Status": {
      "main": [
        [
          {
            "node": "Code: Analyze Agent Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Analyze Agent Status": {
      "main": [
        [
          {
            "node": "IF: Critical Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: Critical Alert": {
      "main": [
        [
          {
            "node": "GitHub: Create Alert Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub: Create Alert Issue": {
      "main": [
        [
          {
            "node": "Respond: Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook: Test Results": {
      "main": [
        [
          {
            "node": "Code: Process Test Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Process Test Results": {
      "main": [
        [
          {
            "node": "GitHub: Post Test Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub: Post Test Results": {
      "main": [
        [
          {
            "node": "Supabase: Store Test Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supabase: Store Test Results": {
      "main": [
        [
          {
            "node": "Respond: Tests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": ""
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 3,
  "updatedAt": "2026-01-12T05:33:00.000Z",
  "versionId": "1"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

PR Monitoring & Comment System. Uses github, httpRequest, postgres. Webhook trigger; 18 nodes.

Source: https://github.com/kirkomrk2-web/Wallestars/blob/c3ab9380b3708d8a7a65fbaef336ef9660541953/n8n-workflows/pr-monitoring-system.json — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

Scraping. Uses httpRequest, postgres, @apify/n8n-nodes-apify, respondToWebhook. Webhook trigger; 61 nodes.

HTTP Request, Postgres, @Apify/N8N Nodes Apify
Data & Sheets

Workflow B — AI Listing Engine. Uses httpRequest, postgres, errorTrigger. Webhook trigger; 47 nodes.

HTTP Request, Postgres, Error Trigger
Data & Sheets

LogSentinel Workflow. Uses postgres, emailSend, httpRequest. Webhook trigger; 44 nodes.

Postgres, Email Send, HTTP Request
Data & Sheets

Pawa VAPI Tools v2 (live-schema). Uses postgres, httpRequest. Webhook trigger; 36 nodes.

Postgres, HTTP Request
Data & Sheets

Mastodon2MemosGitHubNotion. Uses httpRequest, executeCommand, s3, github. Webhook trigger; 34 nodes.

HTTP Request, Execute Command, S3 +2