Automate GitHub Issues Tracking in Notion with n8n

Discover how this n8n workflow automates syncing GitHub issue events with a Notion database, eliminating manual updates and saving hours. It tracks issue lifecycle changes like opening, editing, closing, and reopening in real time to keep your project management seamless.
githubTrigger
notion
function
+2
Learn how to Build this Workflow with AI:
Workflow Identifier: 1445
NODES in Use: GitHub Trigger, IF, Function, Notion, Switch

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

1. Opening Problem Statement

Meet John, a product manager who juggles multiple issues from his popular GitHub repository, DemoRepo. Every time a new issue is opened, edited, closed, or reopened, John must manually update his Notion project management database to keep track of progress. This repetitive task wastes hours weekly and increases the risk of errors like missing updates or deleting the wrong entry, causing delays and confusion for his team.

Imagine losing 3–5 hours a week just managing these issue records manually—time that could be spent productively. Mistakenly missing an issue closure or update can delay releases and frustrate developers depending on accurate, timely status information.

This is exactly the pain point the n8n workflow we’ll explore solves by automating GitHub issue tracking in Notion.

2. What This Automation Does

This custom n8n workflow listens to GitHub issue events in the DemoRepo repository and syncs them to a Notion database. Here’s what happens when it runs:

  • Automatically creates a new Notion database page each time a GitHub issue is opened, capturing the issue title, ID, and URL.
  • Edits existing Notion pages if a GitHub issue is updated, ensuring data accuracy without manual input.
  • Archives (deletes) the Notion page when an issue is deleted on GitHub, keeping the database clean.
  • Updates issue status as closed or reopened by toggling a checkbox property, mirroring GitHub issue lifecycle changes seamlessly within Notion.
  • Utilizes dynamic, custom filters in Notion to find the exact page corresponding to each GitHub issue via the issue ID number.
  • Eliminates manual copying, pasting, and human error, saving John roughly 4 hours per week and maintaining up-to-date project status.

3. Prerequisites ⚙️

  • n8n account with workflow creation access
  • GitHub account with API access and a repository (e.g., DemoRepo) configured for webhook events 📧
  • Notion account with a database set up to track issues, including properties: Issue ID (number), Link (URL), Issue title (title), and Closed (checkbox) 📁
  • GitHub API credentials configured in n8n 🔑
  • Notion API integration credentials added to n8n 🔑

4. Step-by-Step Guide to Build This Workflow

Step 1: Set up the GitHub Trigger Node

Go to your n8n editor, click “+” → Search for GitHub Trigger, and add it.

Configure it with your GitHub credentials, then enter:

  • Owner: John-n8n (replace with your GitHub username)
  • Repository: DemoRepo (or your target repository)
  • Events: select issues

This node will listen for issue events like opened, edited, deleted, closed, and reopened.

After setting, save and activate your webhook in GitHub settings to send issue webhook events to n8n’s URL.

Common Mistake: Forgetting to activate the webhook in GitHub or entering the wrong repository will prevent triggering.

Step 2: Add an IF Node to detect new issues opened

Add an IF node connected to the GitHub Trigger.

Configure the IF node with:

  • Condition type: String
  • Value 1: {{$json["body"]["action"]}}
  • Condition: Equals
  • Value 2: opened

This splits workflow paths based on whether an issue is newly opened or not.

Step 3: Create a Notion database page for new issues

On the IF node’s “True” branch, add a Notion node configured as follows:

  • Resource: databasePage
  • Operation: create
  • Database ID: Your Notion issues database ID (copy from Notion)
  • Properties:
    • Title: {{$json["body"]["issue"]["title"]}} (issue title)
    • Issue ID (number): {{$json["body"]["issue"]["id"]}}
    • Link (url): {{$json["body"]["issue"]["html_url"]}}

Once created, a corresponding Notion page tracks the new issue.

Common Mistake: Incorrect Database ID or property keys cause failures.

Step 4: Handle other issue actions with a Function node to build custom Notion filters

On the IF node’s “False” branch, add a Function node.

Paste the following JavaScript code to generate Notion filters targeting pages by Issue ID:

const new_items = [];
for (item of $items("Trigger on issues")) {
  if (item.json["body"]["action"] == "opened") continue;
  let new_item = { json: { notionfilter: "" } };
  let notionfilter = { or: [] };
  const filter = {
    property: 'Issue ID',
    number: { equals: parseInt(item.json["body"]["issue"]["id"]) }
  };
  notionfilter.or.push(filter);
  new_item.json.notionfilter = JSON.stringify(notionfilter);
  new_items.push(new_item);
}
return new_items;

This ensures the workflow finds the correct Notion page corresponding to each GitHub issue based on Issue ID.

Step 5: Query Notion pages that match the GitHub issue

Add a Notion node set to:

  • Resource: databasePage
  • Operation: getAll
  • Filter type: JSON filter (pass from Function node)
  • Database ID: same Notion database ID
  • Return All: true

This retrieves the specific page(s) in Notion associated with the GitHub issue for updates or deletion.

Step 6: Add a Switch node to handle issue event types

Add a Switch node connected to the Notion query node.

Configure switch rules on body.action string with branches:

  • edited → Update issue title in Notion
  • deleted → Archive (delete) the Notion page
  • closed → Check the Closed checkbox in Notion
  • reopened → Uncheck the Closed checkbox

Step 7: Configure Notion nodes for each Switch output

  • Edit issue node updates the Notion page’s title using the pageId from previous step.
  • Delete issue node archives the Notion page.
  • Close issue node sets the Closed checkbox to true.
  • Reopen issue node clears the Closed checkbox.

Ensure each Notion node uses the page ID from the Find database page node result with expression syntax {{$node["Find database page"].json["id"]}}.

5. Customizations ✏️

  • Add more issue properties: In each Notion node, add extra property mappings like “Assignee” or “Labels” from GitHub issue JSON to Notion fields.
  • Filter specific issue events: Modify the Switch node’s rules to ignore certain GitHub events if you want a focused subset tracked.
  • Integrate comments sync: Add GitHub API calls to fetch issue comments and append them to a Notes field in Notion using additional nodes.

6. Troubleshooting 🔧

Problem: “No filtered Notion pages found”

Cause: The Notion filter JSON is incorrect or the Issue ID does not match the page properties.

Solution: Verify your Notion database schema includes an “Issue ID” number property and the filter JSON in the Function node exactly matches. Test manually querying Notion to confirm.

Problem: “GitHub webhook not triggering workflow”

Cause: Webhook URL not properly set or webhook not activated in GitHub repo settings.

Solution: Go to your GitHub repo settings, add and activate the webhook URL provided by the GitHub Trigger node in n8n. Check webhook delivery logs for errors.

7. Pre-Production Checklist ✅

  • Confirm GitHub webhook is active and firing on issue events.
  • Verify Notion database properties exist for Issue ID (number), Link (url), Title, and Closed checkbox.
  • Test the workflow by opening a test issue on GitHub and verifying a Notion page is created.
  • Run tests for each event type: edit, delete, close, and reopen.
  • Backup Notion database prior to full deployment to allow rollback in case of errors.

8. Deployment Guide

Once tested, toggle your n8n workflow from draft to active.

Monitor for any errors via n8n’s error logs or GitHub webhook delivery reports.

Enjoy near real-time syncing of GitHub issues with your Notion task database without manual intervention.

9. FAQs

Can I use a different issue tracker instead of GitHub?

This workflow specifically listens to GitHub issue webhook events. However, you can adapt similar workflows for other issue trackers that provide webhook support.

Are my GitHub and Notion data secure with n8n?

Yes, data flows securely via authenticated API calls. You control credentials within your n8n instance to keep integrations safe.

Does this workflow consume GitHub API rate limits?

The workflow mainly listens for webhook events and performs occasional API calls to Notion, so rate limits are minimal but monitor usage if scaling to large repos.

10. Conclusion

By following this guide, you’ve built a powerful automation that syncs all GitHub issue lifecycle events with a Notion database for project tracking. John now saves hours weekly previously spent on manual updates, eliminating costly errors and improving team communication.

Next, consider automating comment syncing, priority tagging, or notifications to Slack for high-priority issues to keep your workflow even smoother.

Automation like this is a game-changer for managing open source or internal projects effectively. Enjoy your new integrated GitHub-Notion workflow!

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free