Automated Sales Call Filtering and Preprocessing for AI Analysis - n8n Workflow

Use this advanced n8n workflow to automatically filter Gong calls synced to Salesforce based on opportunity stage (Discovery/Meeting Booked) and prepare the data for AI agents.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Sales Operations teams needing automated data pipeline integrity.

  • Businesses using Gong and Salesforce that require filtered AI analysis of sales calls.

  • Users looking for high-quality n8n templates for CRM and voice data processing.

  • Developers building complex data pipelines triggered by CRM events.

Overview

This powerful n8n workflow, often deployed as part of a larger 'CallForge' system, solves the challenge of efficiently processing high volumes of sales call data. Instead of expending valuable AI compute resources on every single call, this n8n template ensures that only the most strategically important conversations—those associated with key early-stage milestones like 'Meeting Booked' or 'Discovery'—are passed along for detailed analysis.

The n8n workflow uses the built-in scheduler as its n8n trigger, querying Salesforce for new Gong call objects and applying stringent conditional filtering logic. It then uses a specific Gong n8n node to retrieve the full transcript and call metadata. This foundational data processing ensures clean, structured input for subsequent tasks, typically handled by an external AI agent or another linked n8n workflow.

How it Works

The automation begins with a Schedule n8n trigger configured to run every hour, ensuring timely checks for new data.


  1. Salesforce Query: The n8n workflow first calls the Salesforce API using the dedicated n8n node to retrieve all custom Gong Call objects (GongGongCallc) created within the last four hours. This limits the data set to recent conversations.

  2. Data Sorting: The results are sorted by CreatedDate in descending order, ensuring the newest records are processed first.

  3. Opportunity Stage Filtering (Stage 1): An If n8n node checks the current item. The n8n workflow continues only if the Salesforce opportunity stage associated with the call (GongOppStageTimeOfCallc) equals either 'Discovery' OR 'Meeting Booked.' Calls that fail this critical check are filtered out.

  4. Opportunity Association Filtering (Stage 2): A second If n8n node verifies that the primary opportunity field (GongPrimaryOpportunityc) contains a valid, non-empty value, ensuring the call is tied to an active sales cycle.

  5. Gong Data Retrieval: For validated calls, the n8n workflow utilizes the specialized Gong n8n node to fetch the comprehensive call details and transcript using the recorded Call ID extracted from Salesforce.

  6. Data Transformation: A Set n8n node maps the complex Gong metadata (like URL, duration, speaker information) into a clean, unified JSON object. It also intelligently injects the relevant Salesforce opportunity ID (sfOpp). This step prepares the final payload for the next stage of the n8n workflow.

  7. Handoff: Finally, the structured data is passed to an external n8n workflow (the 'Gong Call Preprocessor') using the Execute Workflow n8n node, initiating the subsequent stages of the data pipeline, such as AI summarization or insight extraction.

Installation Guide

To deploy this n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON code and import it into your n8n instance via the 'Workflows' menu, selecting 'New' and then 'Import from JSON'.

  2. Salesforce Credentials: Locate the 'Get all custom Salesforce Gong Objects' n8n node. You must connect your existing Salesforce OAuth2 API credentials. Ensure these credentials have read access to the custom GongGong_Callc object.

  3. Gong Credentials: Locate the 'Get Gong Call' n8n node. Configure your Gong API credentials to allow the n8n workflow to retrieve transcripts and call details.

  4. Linked Workflow: The 'Pass to Gong Call Preprocessor' n8n node requires the ID of the downstream n8n workflow. Ensure you have the corresponding preprocessing workflow imported and active, then update the Node's 'Workflow ID' parameter accordingly.

  5. Activation: Once credentials are set and the linked workflow is referenced, activate the n8n workflow. It will execute hourly based on the Schedule n8n trigger.

Node Details

Schedule Trigger (Run Hourly): The primary n8n trigger, configured for hourly execution, kicking off the entire n8n workflow.
Salesforce n8n node (Get all custom Salesforce Gong Objects): Queries Salesforce for the custom object GongGongCallc. Key Configuration: Filters for records where CreatedDate is greater than or equal to the time 4 hours ago.
Sort n8n node (Sort by date): Sorts the retrieved Salesforce records by the CreatedDate field in descending order.
If n8n node (Check if Opportunity Stage is Meeting Booked or Discovery): Filters the n8n workflow. Key Configuration: Checks if GongOpp
StageTimeOfCallc equals 'Discovery' OR 'Meeting Booked.'
If n8n node (Check if Primary Opportunity Contains Value): Filters the n8n workflow to ensure the GongPrimaryOpportunityc field is not empty, confirming opportunity linkage.
Gong n8n node (Get Gong Call): Fetches comprehensive call data (including transcripts). Key Configuration: Uses the call ID ={{ $json.GongCall_IDc }} from the preceding Salesforce output.
Set n8n node (Format call into correct JSON Object): Transforms the data structure, mapping 19 metadata fields from the Gong response and adding the Salesforce opportunity reference (sfOpp). This prepares a standardized output for the next stage of the n8n workflow.
Execute Workflow n8n node (Pass to Gong Call Preprocessor): Executes a separate, linked n8n workflow (6mL5jWOJfuzkpjzx) using the formatted JSON as input. This enables modular n8n templates and complex processing chains.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by
Angel Menendez
Angel Menendez

Angel Menendez is a Staff Developer Advocate at n8n.io, specializing in low-code tools for cybersecurity workflows. From Puerto Rico, Angel's tech journey began by helping his father translate technical books. He later started a web development business and transitioned from a career as a flight attendant to cybersecurity engineering. His workflows have saved companies significant time. Outside work, Angel enjoys time with his two sons, riding electric bikes, reading, and exploring new places.

Featured*