Automated Zendesk to Pipedrive Sync and Ticket Assignment - n8n Workflow

This advanced n8n workflow synchronizes Zendesk tickets with Pipedrive contacts, automatically assigning tickets to the corresponding Pipedrive contact owner for seamless CRM management.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Customer service managers needing tighter integration between their helpdesk (Zendesk) and CRM (Pipedrive).
Sales and support teams who want ticket ownership to reflect CRM account ownership.
System administrators looking for robust, scheduled n8n templates for business process automation.
Users seeking to implement complex logic using the core flow control features within an n8n workflow.

Overview

Managing customer support requires seamless coordination between ticketing systems and sales databases. This specialized n8n workflow solves the common problem of ensuring support tickets are handled by the same sales or account manager who owns the corresponding contact in Pipedrive.

This robust n8n automation runs on a scheduled basis, pulling in only newly created Zendesk tickets since the last run. For each ticket, it attempts to locate the requester in Pipedrive. If a match is found, the workflow identifies the Pipedrive contact owner and updates the Zendesk ticket assignee to that person, creating a highly efficient loop between support and sales operations. If the requester is not found in Pipedrive, the n8n workflow ensures a descriptive internal note is added to the ticket instead. This comprehensive n8n node setup ensures data consistency and improved agent productivity.

How it Works

This high-utility n8n workflow initiates every five minutes using a scheduled n8n trigger.


  1. Trigger and Timestamp Check: The Every 5 minutes cron n8n trigger starts the process. The Get last execution timestamp function node retrieves the time of the previous run from static workflow data.

  2. Fetch New Tickets: The Zendesk n8n node then fetches all tickets created since that last stored timestamp.

  3. Requester Identification: For each new ticket, the n8n workflow fetches the full requester user details from Zendesk, extracting the requesteremail and requesterid.

  4. Pipedrive Lookup: The process searches Pipedrive for a matching person using the requester's email address.

  5. Owner Identification: If a Pipedrive contact is found, an HTTP Request n8n node retrieves the details of that contact's owner, specifically looking for their primary email address.

  6. Agent Mapping (Parallel Path): Concurrently, the workflow fetches a list of all Agents and Admins from Zendesk. This list is then merged with the Pipedrive owner data, identifying the corresponding Zendesk user ID for the Pipedrive owner based on email matching.

  7. Conditional Assignment: An If n8n node checks if a corresponding agent ID was successfully merged (indicating the contact exists and the owner is a known Zendesk agent):

Success Path: The Zendesk ticket is updated using a Zendesk n8n node, changing the assignee to the identified Pipedrive contact owner's email.
Failure Path: The workflow updates the Zendesk ticket with an internal note stating: 'Requester not found in Pipedrive'.

  1. Completion and Reset: Regardless of the outcome, a final function n8n node, Set new last execution timestamp, records the current execution time, preparing the n8n workflow for its next run.

Installation Guide

To deploy this powerful automation using these n8n templates, follow these steps:


  1. Import: Copy the provided n8n workflow JSON code and import it into your n8n instance.

  2. Zendesk Credentials: This n8n workflow requires a Zendesk API credential. Locate the Zendesk n8n node instances (especially 'Get tickets created...') and ensure the 'Zendesk account' credential is set up correctly (ID: 5 in the original JSON).

  3. Pipedrive Credentials: Similarly, ensure your Pipedrive API credential is configured. This is necessary for the 'Search requester in pipedrive' n8n node and the subsequent HTTP request (ID: 1 in the original JSON).

  4. HTTP Request Node: Verify the URL structure in the 'Get owner information of Pipedrive contact' n8n node, as it references https://n8n.pipedrive.com/api/v1/.... Ensure this base URL matches your Pipedrive environment if you use a custom domain.

  5. Activate: Save and activate the n8n workflow. It will automatically start executing every 5 minutes using the specified n8n trigger.

Node Details

Every 5 minutes (Cron n8n trigger): The primary n8n trigger, configured to start the workflow execution periodically.
Get last execution timestamp (Function n8n node): Essential for state management. It reads the lastExecution time stored in the global static data, ensuring the next Zendesk n8n node only fetches new tickets.
Get tickets created after last execution (Zendesk n8n node): Uses a complex query (created>{{ $json["lastExecution"] }}) to filter tickets based on the timestamp retrieved by the previous n8n node.
Search requester in pipedrive (Pipedrive n8n node): Performs a person search in Pipedrive using the requester's email extracted from the Zendesk data.
Add Pipedrive agent data to pipedrive contact information (Merge n8n node): Crucial for mapping. Merges the Pipedrive owner data with the list of Zendesk agents using email addresses to obtain the internal Zendesk agentid.
Contact exists in Pipedrive (If n8n node): Determines the execution path by checking if the required agent
id was successfully merged, verifying Pipedrive contact existence and owner mapping.
Change assignee to Pipedrive contact owner (Zendesk n8n node): On the 'True' path, it updates the ticket's assignee email using the matched Pipedrive owner email.
Set new last execution timestamp (Function n8n node): Updates the static workflow data with the current execution time, completing the cycle for this instance of the n8n workflow.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by
n8n Team
n8n Team

Meet the official n8n team. We specialize in building workflows that transform intricate tasks into seamless operations.

Featured*