Link GitHub Pull Requests to Pipedrive Contacts
Overview
This workflow automatically creates a note in Pipedrive whenever a new GitHub pull request is opened. It links the pull request to the corresponding person in Pipedrive by matching the PR author's email address. This is especially useful for sales, support, or engineering teams that want to track developer activity or customer contributions directly in their CRM.
How It Works
The workflow is triggered by a GitHub webhook on pull request events. It then extracts the sender's profile URL from the webhook payload, fetches the sender's email via the GitHub API, searches Pipedrive for a person with that email, and if found, creates a note in Pipedrive containing a link to the pull request. If no matching person is found, the workflow does nothing.
Nodes and Their Roles
- ON Pull Request (GitHub Trigger) — Listens for pull request events on a specified GitHub repository. Requires GitHub OAuth2 or Personal Access Token credentials. Parameters:
owner(repository owner),repository(repo name),events(set topull_request). - HTTP Request (HTTP Request) — Fetches the sender's profile data from the GitHub API using the URL provided in the webhook payload. Uses GitHub API credentials (OAuth2 or PAT) via the
githubApicredential type. The URL is dynamically set to={{$json["body"].sender.url}}. - Search PR user in Pipedrive by email (Pipedrive) — Searches Pipedrive for a person whose email matches the sender's email. Uses Pipedrive API Key or OAuth2 credentials. Parameters:
resource=person,operation=search,term=={{ $json["email"]}},additionalFields.fields=email. - person exists (IF) — Checks if the Pipedrive search returned a person (i.e., the
namefield is not empty). No authentication required. Condition:value1=={{$json["name"]}},operation=isNotEmpty. - Pipedrive (Pipedrive) — Creates a note in Pipedrive linked to the found person. Uses the same Pipedrive credentials. Parameters:
resource=note,operation=create,content= a message containing the PR URL (e.g.,Created a PR {{$node["ON Pull Request"].json["body"]["pull_request"]["html_url"]}}),additionalFields.person_id=={{ $json["id"] }}. - NoOp (No Operation) — Does nothing when no matching person is found. This is the fallback branch of the IF node.
Setup Instructions
- GitHub Account – You need a GitHub account and a repository where pull requests are opened. Create a GitHub OAuth App or generate a Personal Access Token with
reposcope. In n8n, add a new credential of type "GitHub OAuth2 API" or "GitHub Personal Access Token". - Pipedrive Account – You need a Pipedrive account with API access. Generate an API token from your Pipedrive settings (under "Personal preferences" > "API"). In n8n, add a new credential of type "Pipedrive API".
- Configure the Trigger – Set the
ownerandrepositoryfields in the "ON Pull Request" node to match your GitHub repo. - Activate the Workflow – Once activated, n8n will create a webhook URL. You may need to manually register this URL in your GitHub repository settings under "Webhooks" (though n8n often handles this automatically).
Use Cases and Variations
- Track Customer Contributions – If you use Pipedrive to manage customer relationships, this workflow automatically logs when a customer submits a pull request, helping your team follow up.
- Developer Activity Log – Adapt the workflow to create a note for every PR, even if the person isn't in Pipedrive, by using a different condition or creating a new person.
- Slack Notification – Add a Slack node after the Pipedrive note creation to notify a channel about the new PR.
- Multi-Repository Support – Duplicate the trigger node for each repository you want to monitor, or use a webhook-based approach with a single endpoint.
- Custom Note Content – Modify the note content to include PR title, description, or labels.
Workflow JSON
{
"meta": {
"instanceId": "237600ca44303ce91fa31ee72babcdc8493f55ee2c0e8aa2b78b3b4ce6f70bd9"
},
"nodes": [
{
"id": "28409b8d-3ae2-4cdb-a4ba-b0af9f31c1f2",
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"position": [
940,
440
],
"parameters": {
"url": "={{$json[\"body\"].sender.url}}",
"options": {},
"authentication": "predefinedCredentialType",
"nodeCredentialType": "githubApi"
},
"credentials": {
"githubApi": {
"id": "7",
"name": "GitHub account"
}
},
"typeVersion": 2
},
{
"id": "aa604a92-7691-4b25-bbd0-ce42b8147fd8",
"name": "Search PR user in Pipedrive by email",
"type": "n8n-nodes-base.pipedrive",
"position": [
1220,
440
],
"parameters": {
"term": "={{ $json[\"email\"]}}",
"resource": "person",
"operation": "search",
"additionalFields": {
"fields": "email"
}
},
"credentials": {
"pipedriveApi": {
"id": "1",
"name": "Pipedrive account"
}
},
"typeVersion": 1,
// ... truncated (copy to see full JSON)How to Import This Workflow
- 1Copy the workflow JSON above using the Copy Workflow JSON button.
- 2Open your n8n instance and go to Workflows.
- 3Click Import from JSON and paste the copied workflow.
Don't have an n8n instance? Start your free trial at n8nautomation.cloud
Related Templates
Sync Calendly Invitees to Mautic Contacts
Overview This workflow automatically creates or updates a contact in Mautic whenever a new invitee schedules an event through Calendly. It eliminates manual data entry, ensures your CRM stays current, and helps you follow up with leads immediately after they book a call. How It Works The workflow runs in two main steps: first, it listens for a new Calendly event; second, it uses the invitee's email and name to either create a new contact in Mautic or update an existing one if the email already exists. Nodes and Their Roles On new event () – OAuth2 – Listens for the event from Calendly. When someone schedules an event, this node fires with the invitee's email, name, and other details. - Parameters: set to Create/update contact () – Basic Auth – Receives the trigger data and sends a request to Mautic to create or update a contact. It maps the invitee's email (from the trigger's ) and first name (from ). If a contact with that email already exists in Mautic, its first name is overwritten. - Parameters: = , = Error Handler () – No auth – Catches any execution errors and stops the workflow with a user-defined message, preventing silent failures. Setup Instructions Calendly account: You need a Calendly account with OAuth access. In n8n, create a Calendly OAuth2 credential (Client ID and Client Secret from your Calendly developer app). Mautic instance: You need a running Mautic instance with API access. In n8n, create a Mautic credential with the instance URL, your Mautic username, and password (Basic Auth). Workflow activation: Set the Calendly trigger to “Webhook” mode and use the provided webhook URL in your Calendly webhook settings. Activate the workflow. Use Cases & Variations Sales follow‑up: Automatically add new leads from demo bookings into Mautic for immediate email sequences. Marketing automation: Combine with Mautic segments and campaigns to send tailored content based on event type. Other CRMs: Replace the Mautic node with Salesforce, HubSpot, or any other CRM node supported by n8n. Enrichment: Add an HTTP Request node to look up company details before creating the contact.
Import Leads from Google Drive to Pipedrive with Duplicate Detection
This workflow automatically imports new leads from a spreadsheet file (CSV or Excel) placed in a specific Google Drive folder into Pipedrive. It checks for existing contacts by email to avoid duplicates, then creates an organization, person, lead, and note for each new entry. Ideal for sales teams that receive lead lists via shared files and want to streamline CRM updates. Workflow Steps Google Drive Trigger (OAuth2) — Polls a specific Google Drive folder every minute for newly created files. Configured to watch the folder with ID . Google Drive (OAuth2) — Downloads the file identified by the trigger using its . Spreadsheet File (No auth) — Parses the downloaded file (CSV/Excel) into JSON rows. No additional parameters set. Pipedrive (OAuth2 or API Key) — Fetches all existing leads from Pipedrive ( operation). Runs once per workflow execution. IF (No auth) — For each lead, checks if is greater than 0 (i.e., the lead is linked to a person). If true, proceeds to fetch the person details. Pipedrive1 (OAuth2 or API Key) — Retrieves the person record using the from the lead. Merge (No auth) — Combines the spreadsheet rows (Input 0) with the fetched person data (Input 1). Uses mode: it removes rows from the spreadsheet where the matches the from Pipedrive persons, effectively filtering out duplicates. Set (No auth) — Extracts and renames fields: (from ), (concatenation of and ), (from ), (from ). Only these fields are kept. Create Organization (OAuth2 or API Key) — Creates a new Pipedrive organization with the name set to the value. Create Person (OAuth2 or API Key) — Creates a person with the and from the Set node, linked to the newly created organization (). Also sets a custom property (likely "Lead Source") to . Create Lead (OAuth2 or API Key) — Creates a lead with title , associated with the organization and person. Owner ID is hardcoded to . Create Note (OAuth2 or API Key) — Adds a note to the lead containing the company size. Setup Instructions Google Drive: You need a Google account with access to the folder where lead files will be uploaded. In n8n, create a Google Drive OAuth2 credential (or use a service account). Pipedrive: You need a Pipedrive account. Create an API token or OAuth2 credential in n8n. The workflow uses a hardcoded owner ID () — replace it with your own user ID from Pipedrive. Spreadsheet Format: The file must have columns named , , , , . Adjust the Set node if your column names differ. Folder ID: The trigger watches a specific folder. Replace the folder ID with your own Google Drive folder ID. Use Cases & Variations Lead Import from CSV/Excel: Perfect for marketing teams that receive lead lists from events, webinars, or purchased lists. Deduplication: The merge step prevents creating duplicate contacts by email. You could extend it to check other fields (e.g., phone number). Custom Fields: The Create Person node sets a custom property. Modify the property ID and value to match your Pipedrive setup. Alternative Triggers: Replace the Google Drive Trigger with an email trigger (e.g., Gmail) to process leads sent as attachments. Error Handling: Add error workflows or notifications (e.g., Slack) if a file fails to parse or a Pipedrive API call fails.
Automated Birthday & Anniversary Wishes from Airtable via Gmail
Overview This workflow automatically sends personalized birthday and anniversary wishes to your contacts (clients, employees, or members) every day at 8 AM. It checks an Airtable base for any records where today matches the person's date of birth or anniversary, then sends a warm email via Gmail. Perfect for maintaining relationships without manual effort. How It Works Schedule Trigger — Runs the workflow daily at 8 AM (no auth) Search Client — Queries Airtable for records where the or field matches today's month and day (API Key auth) Check Available Dates — An IF node that verifies the record actually has a date in either field (no auth) No Operation, do nothing — A placeholder for records that don't have a date (false branch) Generate Subject & Body — A Code node that creates a custom subject line and message depending on whether it's a birthday or anniversary (no auth) Send Emails — Sends the email to the person's address using Gmail (OAuth2) Node Details Schedule Trigger (No auth) — Configured to trigger at 8:00 AM every day. You can adjust the hour in the node settings. Search Client (API Key auth) — Uses an Airtable credential. The filter formula finds all records where either date matches today. Check Available Dates (No auth) — Two conditions combined with AND: is not empty AND is not empty. This ensures the record has at least one date to work with. Records that pass go to the true branch; others go to the false branch (No Operation). Generate Subject & Body (No auth) — JavaScript code that extracts the person's name, email, and dates. It compares today's month-day to the date fields and sets a subject like "🎂 Happy Birthday!" or "💍 Happy Anniversary!" along with a friendly message. The output includes the original data plus , , and . Send Emails (OAuth2) — Uses a Gmail credential. Sends a plain text email to the recipient's email address with the generated subject and message. The option is disabled to keep the email clean. Setup Instructions Airtable — Create a base with a table containing at least these fields: (text), (email), (date), (date). Populate with your contacts. Airtable Credential — In n8n, create an Airtable credential using your API key (get it from your Airtable account settings). Gmail Credential — Create a Gmail OAuth2 credential in n8n. You'll need a Google Cloud project with the Gmail API enabled and the necessary redirect URIs configured. Update Node Parameters — Open the Search Client node and select your Airtable base and table. The filter formula is already set; you may need to adjust field names if they differ. Activate Workflow — Once everything is connected, toggle the workflow to active. It will run daily at 8 AM. Use Cases & Variations Employee Recognition — Replace the email with a Slack message to a company channel for public recognition. Client Appreciation — Add a discount code or special offer in the email body. Multi‑channel — Combine with SMS (e.g., Twilio) for a more personal touch. Different Triggers — Change the schedule to run weekly or on specific days. Custom Templates — Modify the Code node to pull from a Google Doc or use HTML email formatting. This workflow is easily adaptable to any scenario where you want to automatically celebrate important dates with your network.