Remind the team about pull requests waiting for review
Every workday, post pull requests that have waited 2+ days for review to your dev channel.
How it works
Trigger: Schedule — weekdays at 10:00
- Get the repository's open pull requests from the GitHub API.
- Keep non-draft ones older than 2 days.
- Post them to Slack with their author and reviewers.
Diagram
Trigger App Code
Code
JavaScript used in the Code step — already included in the template below.
// Lists open, non-draft pull requests waiting 2+ days, oldest first.
const DAY = 24 * 60 * 60 * 1000;
const waiting = $input.all()
.map((item) => item.json)
.filter((pr) => pr.number && !pr.draft)
.map((pr) => ({ ...pr, days: Math.floor((Date.now() - new Date(pr.created_at)) / DAY) }))
.filter((pr) => pr.days >= 2)
.sort((a, b) => b.days - a.days);
if (!waiting.length) return [];
const message =
`👀 ${waiting.length} pull request${waiting.length > 1 ? "s" : ""} waiting for review:\n` +
waiting.map((pr) => {
const reviewers = (pr.requested_reviewers || []).map((r) => r.login).join(", ") || "no reviewer";
return `• <${pr.html_url}|#${pr.number} ${pr.title}> by ${pr.user.login}, ${pr.days} days (${reviewers})`;
}).join("\n");
return [{ json: { message } }];Build it
Pick your tool — same automation, step by step.
Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder.
Show code (132 lines)
{
"name": "Remind the team about pull requests waiting for review (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## Remind the team about pull requests waiting for review\nEvery workday, post pull requests that have waited 2+ days for review to your dev channel.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
"height": 260,
"width": 340
},
"id": "26067c04-e776-42a7-a37a-b6a76afcb0f2",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 10 * * 1-5"
}
]
}
},
"id": "26067c04-e776-42a7-a37a-b6a76afcb0f2",
"name": "Weekdays 10:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
]
},
{
"parameters": {
"url": "https://api.github.com/repos/YOUR_ORG/YOUR_REPO/pulls?state=open&per_page=100",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "githubApi",
"options": {}
},
"id": "26067c04-e776-42a7-a37a-b6a76afcb0f2",
"name": "Get open pull requests",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
300,
0
]
},
{
"parameters": {
"jsCode": "// Lists open, non-draft pull requests waiting 2+ days, oldest first.\nconst DAY = 24 * 60 * 60 * 1000;\n\nconst waiting = $input.all()\n .map((item) => item.json)\n .filter((pr) => pr.number && !pr.draft)\n .map((pr) => ({ ...pr, days: Math.floor((Date.now() - new Date(pr.created_at)) / DAY) }))\n .filter((pr) => pr.days >= 2)\n .sort((a, b) => b.days - a.days);\n\nif (!waiting.length) return [];\n\nconst message =\n `👀 ${waiting.length} pull request${waiting.length > 1 ? \"s\" : \"\"} waiting for review:\\n` +\n waiting.map((pr) => {\n const reviewers = (pr.requested_reviewers || []).map((r) => r.login).join(\", \") || \"no reviewer\";\n return `• <${pr.html_url}|#${pr.number} ${pr.title}> by ${pr.user.login}, ${pr.days} days (${reviewers})`;\n }).join(\"\\n\");\n\nreturn [{ json: { message } }];"
},
"id": "26067c04-e776-42a7-a37a-b6a76afcb0f2",
"name": "Waiting 2+ days",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
600,
0
]
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "#dev",
"mode": "name"
},
"text": "={{ $json.message }}",
"otherOptions": {}
},
"id": "26067c04-e776-42a7-a37a-b6a76afcb0f2",
"name": "Remind the team",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
900,
0
]
}
],
"connections": {
"Weekdays 10:00": {
"main": [
[
{
"node": "Get open pull requests",
"type": "main",
"index": 0
}
]
]
},
"Get open pull requests": {
"main": [
[
{
"node": "Waiting 2+ days",
"type": "main",
"index": 0
}
]
]
},
"Waiting 2+ days": {
"main": [
[
{
"node": "Remind the team",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}In Make, create a new scenario and add these modules in order:
- Schedule the scenario: Weekdays 10:00
- HTTP › Make a request
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Slack › Create a Message
- Every module run uses Make operations — the free plan includes a monthly quota.
- Make's built-in functions (map, sum, formatDate…) can replace most Code steps; for complex logic use a code module.
- Module and step names can differ slightly as Make and Zapier update their apps.
In Zapier, create a new Zap and add these steps in order:
- Schedule by Zapier — Weekdays 10:00
- Webhooks by Zapier — GET
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Slack — Send Channel Message
- Zaps with more than two steps need a paid Zapier plan.
- Webhooks, Filters/Paths and Code by Zapier are premium features on some Zapier plans.
- Code by Zapier runs JavaScript: reuse the code shown above, reading inputs from inputData instead of $json.
- Module and step names can differ slightly as Make and Zapier update their apps.
Tips
- Use a fine-grained GitHub token with read-only access to pull requests.
Related flows
Developer & ITEasy
New GitHub issues in Slack
Every new issue in your repo is posted to your team's Slack channel.
GitHub → Slack1h/mo
Developer & ITEasy
Announce GitHub releases in Slack
When you publish a release, your team or community sees the notes instantly.
GitHub → Slack1h/mo
Developer & ITMedium
Changelog from merged pull requests
Each merged pull request is added to a Notion changelog automatically.
GitHub → Notion2h/mo