Automate GitHub PR Tracking with n8n and Pipedrive Integration

Learn how to automate tracking GitHub pull requests by linking PR authors to Pipedrive contacts. This workflow saves hours of manual updates and ensures your sales CRM stays current with developer activities.
githubTrigger
httpRequest
pipedrive
+2
Workflow Identifier: 2416
NODES in Use: githubTrigger, httpRequest, pipedrive, if, noOp

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

Opening Problem Statement

Meet Alex, a product manager at a growing tech company who spends hours each week manually updating the CRM team about pull requests (PRs) created by developers on GitHub. The company uses Pipedrive to manage client and team communications. Each PR created must be linked back to the appropriate Pipedrive contact by email to keep sales and project teams informed. Without automation, Alex often misses updates, wastes 3-4 hours weekly cross-referencing GitHub users with Pipedrive contacts, and experiences delays in internal communications.

This manual task slows the development and sales workflow, leading to misaligned team efforts and wasted resources. Alex needs a reliable way to automatically track PR creators and update Pipedrive with notes, eliminating errors and saving valuable time.

What This Automation Does

This n8n workflow is designed specifically to automate linking GitHub pull request creators to Pipedrive contacts, and log a note in Pipedrive each time a pull request is created. Here’s what happens when the workflow runs:

  • A GitHub webhook fires instantly whenever a new pull request is created in a specific repository.
  • The workflow extracts the pull request creator’s email from the webhook payload.
  • A Pipedrive search node looks up the corresponding contact by email in Pipedrive.
  • If a matching person is found, a note is automatically added to their Pipedrive profile with a link to the PR.
  • If no matching contact is found, the workflow does nothing, avoiding clutter and errors.

Overall, this saves Alex several hours weekly by automating tedious cross-referencing and updating tasks. It keeps the CRM data fresh and actionable, improving collaboration between engineering and sales teams.

Prerequisites ⚙️

  • n8n account – You need n8n set up and ready to build workflows.
  • GitHub account with repository access – To create pull request webhooks and authenticate API access.
  • Pipedrive account – To search and update person records with pull request notes.
  • GitHub API credential in n8n – For accessing the repository and webhook events.
  • Pipedrive API credential in n8n – To query and update contacts.

Step-by-Step Guide

Step 1: Set Up GitHub Pull Request Webhook Trigger

In n8n, click Add Node → search and select GitHub Trigger. Configure it as follows:

  • Owner: Enter your GitHub username or organization (e.g., John-n8n).
  • Repository: Enter your target repo (e.g., DemoRepo).
  • Events: Select pull_request.
  • Authentication: Use a pre-configured GitHub API credential.

Once saved, n8n will generate a webhook URL. Copy this URL and add it as a webhook in your GitHub repository settings under Webhooks. You should see a green checkmark on GitHub if configured correctly.

Common mistake: Forgetting to set the webhook on GitHub or selecting incorrect repository/event.

Step 2: Add HTTP Request Node to Fetch PR Creator Info

Add a new node: HTTP Request. Set it up as:

  • URL: Use an expression to fetch the PR creator’s URL from the trigger data: ={{$json["body"].sender.url}}
  • Authentication: Use the same GitHub API credential.
  • Options: Leave default.

This step retrieves detailed user info, including email, essential for matching in Pipedrive.

Common mistake: Not using the correct expression or forgetting authentication.

Step 3: Search Pipedrive Person by Email

Add a Pipedrive node. Configure:

  • Resource: Select person.
  • Operation: Select search.
  • Term: Set to {{$json["email"]}} to search using the email extracted from the HTTP Request node.
  • Additional Fields: Set to email.
  • Credentials: Your Pipedrive API credential.

This node tries to find a matching person by email in Pipedrive.

Common mistake: Misconfiguration of search term or missing email field mapping.

Step 4: Add an If Node to Check If Person Exists

Add an If node and connect it after the Pipedrive search. Set its condition to check:

  • Value 1: {{$json["name"]}}
  • Operation: isNotEmpty

If true, it means a matching person was found.

Common mistake: Wrong field tested or misspelling the JSON path.

Step 5a: Add Note to Pipedrive Person if Found

For the “true” branch of the If node, add another Pipedrive node configured as:

  • Resource: note.
  • Additional Fields: Set person_id to {{$json["id"]}} to attach the note to the correct person.
  • Content: Use: Created a PR n{{$node["ON Pull Request"].json["body"]["pull_request"]["html_url"]}}.
  • Credentials: Your Pipedrive credential.

This creates a note on the Pipedrive contact with the link to the pull request.

Common mistake: Incorrect person_id mapping or content formatting.

Step 5b: Add No Operation Node If No Person Found

For the “false” branch of the If node, add a NoOp node. This effectively ignores PRs from unregistered emails, keeping workflow clean.

Customizations ✏️

  • Add multiple repository support: In the GitHub Trigger node, add more repositories by duplicating or editing the event triggers.
  • Log unmatched PR authors: Instead of NoOp, add a Slack or email node to notify when no matching contact is found.
  • Expand note content: Modify the Pipedrive note content to include PR title, description, or labels.
  • Use a database to cache matched persons: Improve speed by adding a database node like SQL or MongoDB to cache email-to-Pipedrive ID lookups.
  • Notify sales team on new PRs: Add a Slack or Microsoft Teams node to post PR creation alerts.

Troubleshooting 🔧

Problem: “Cannot read property ’email’ of undefined” in HTTP Request Node

Cause: The GitHub webhook payload does not include an email directly or the path used in the HTTP Request URL is incorrect.

Solution: Verify webhook payload in n8n execution log, ensure you are accessing the correct property body.sender.url. Test with a manual webhook payload if needed.

Problem: No matching person found in Pipedrive even though email exists

Cause: The email field searched does not match exactly, or the Pipedrive’s search endpoint is case sensitive.

Solution: Confirm the email used in the HTTP Request response matches the one in Pipedrive. Use text formatting nodes to normalize case or trim spaces.

Problem: Workflow not triggered upon PR creation

Cause: GitHub webhook not configured properly or webhook URL not registered in the repo.

Solution: Verify webhook under GitHub repo settings → Webhooks, test webhook delivery. Check that n8n GitHub Trigger credentials are valid.

Pre-Production Checklist ✅

  • Ensure GitHub webhook is active and firing on pull_request events.
  • Confirm GitHub API credentials are correctly set in n8n nodes.
  • Verify Pipedrive API credentials and that the account has permission to search and edit contacts.
  • Test with a sample PR on GitHub and watch data flow in n8n execution.
  • Check that the If node correctly branches on person existence.
  • Ensure note added correctly appears in the right Pipedrive person’s profile.

Deployment Guide

Activate the workflow in n8n by clicking the Activate button in the top right corner. Make sure n8n is running continuously (self-hosted or n8n cloud). The GitHub webhook will trigger the workflow instantly on each new PR event.

Monitor executions in n8n’s Executions tab to catch any errors or rate limits. Ensure credentials remain valid and update if tokens expire.

FAQs

Can I use GitLab instead of GitHub?

This workflow specifically uses GitHub Trigger and API nodes, but can be adapted to GitLab webhooks and API calls with modifications.

Does this workflow consume many API calls?

Each PR triggers a few API calls to GitHub and Pipedrive, so account for platform rate limits in high-volume repos.

Is my data secure?

All API credentials are stored securely within n8n. Communication with GitHub and Pipedrive uses encrypted HTTPS.

Conclusion

By following this tutorial, you have automated the connection between GitHub pull requests and Pipedrive contacts, saving hours weekly on manual data syncing. Your CRM now stays updated with real-time developer activity, improving team communication and efficiency. Next, consider automating notifications for your sales team on new PRs or expanding the notes with more detailed pull request metadata. Keep experimenting with n8n to connect your tools and eliminate repetitive tasks!

Promoted by BULDRR AI

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

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