AI-Powered Sales Rep Performance Analysis and Google Sheets Reporting - n8n Workflow

Use this n8n workflow to scrape sales data, analyze rep performance using an AI agent (OpenAI, Bright Data), and automatically save detailed metrics to Google Sheets. Find more powerful n8n templates here.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Sales Managers and Team Leaders who need automated performance dashboards.
Business Analysts requiring structured data extraction from complex web sources.
Users looking to utilize advanced AI agents and web scraping within an n8n workflow.
Anyone seeking robust n8n templates for data processing and storage.

Overview

This comprehensive n8n workflow solves the challenge of manually aggregating and analyzing sales activity data scattered across different platforms. By leveraging a powerful AI Agent (powered by OpenAI and integrated with Bright Dataโ€™s web scraping capabilities), the workflow automatically retrieves raw activity lists, calculates individual rep performance metrics (like completion rates and task counts), ranks the team, and even suggests coaching recommendations based on predefined thresholds. The highly structured output generated by the AI is then seamlessly saved into a Google Sheet using a dedicated n8n node, making this n8n workflow an essential solution for hands-free, intelligent performance reporting. This specialized n8n template demonstrates high-level integration between AI and external tools.

How it Works

The process begins with the โšก Start Scraping (Manual Trigger) n8n trigger, initiating the automation. Following this, the ๐Ÿ”— Set MCP Source URL n8n node defines the target URL containing the sales activity data. The core intelligence resides in the ๐Ÿค– Analyze Sales Rep Performance n8n node, which operates as an AI Agent. This agent is instructed to scrape the defined URL using the ๐ŸŒ Bright Data MCP Tool, analyze the tasks by userId, compute essential statistics (total, completed, incomplete tasks, and completion rate), rank the representatives, and apply a conditional check (coachingRecommended: true if the completion rate is below 70%). This AI Agent uses the ๐Ÿง  AI Brain (OpenAI) for complex analysis. The output is strictly formatted into a JSON array using the structured output parsers, ensuring data cleanliness. Subsequently, the ๐Ÿงฉ Split JSON to Individual Records code n8n node transforms the single JSON array of results into multiple individual items, one for each sales rep. The final step of this n8n workflow uses the ๐Ÿ“Š Store Rep Performance (Google Sheets) n8n node to append each individual record as a new row in the designated Google Sheet, completing the automated reporting cycle.

Installation Guide

To use this powerful n8n workflow and its associated n8n templates, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON and paste it into your n8n instance using the 'Import Workflow' option.

  2. OpenAI Credentials: Set up credentials for the ๐Ÿง  AI Brain (OpenAI) and OpenAI Chat Model n8n nodes. This requires an API key capable of accessing the specified GPT model (gpt-4.1-mini or similar).

  3. Bright Data Credentials: Configure the connection for the ๐ŸŒ Bright Data MCP Tool n8n node using your Bright Data client credentials.

  4. Google Sheets Setup: Configure the ๐Ÿ“Š Store Rep Performance (Google Sheets) n8n node. You will need to authenticate your Google account and specify the exact Spreadsheet ID and Sheet Name where the performance data will be stored.

  5. Set Source URL: Update the ๐Ÿ”— Set MCP Source URL n8n node with the actual URL provided by your Bright Data MCP that contains the sales performance data, replacing the placeholder URL.

  6. Execute: Run the workflow manually using the n8n trigger or activate it and set up a schedule.

Node Details

This n8n workflow utilizes several key nodes:

โšก Start Scraping (Manual Trigger): This n8n trigger node serves as the starting point for manual execution or can be replaced by a time-based n8n trigger for scheduling.
๐Ÿ”— Set MCP Source URL (Set n8n node): Defines the activityURL variable which holds the target URL for the AI Agent to scrape. This is crucial for customizing the n8n workflow.
๐Ÿค– Analyze Sales Rep Performance (LangChain Agent n8n node): The core intelligence. It coordinates the OpenAI model and the Bright Data tool. Its specific function is to execute a multi-step analytical prompt to derive KPIs (total tasks, completion rates, rankings) and output structured data.
๐ŸŒ Bright Data MCP Tool (n8n node): Acts as the web scraping mechanism, instructed by the AI Agent to use the scrapeasmarkdown operation to fetch the data robustly.
Auto-fixing Output Parser / ๐Ÿงพ Structured Response Parser1 (LangChain n8n node): These nodes ensure that the text output from the AI analysis is converted into a reliable, defined JSON structure, vital for downstream automation.
๐Ÿงฉ Split JSON to Individual Records (Code n8n node): Executes custom JavaScript to iterate over the array of sales rep objects received from the AI Agent, creating separate n8n items for efficient bulk insertion into Google Sheets.


  • ๐Ÿ“Š Store Rep Performance (Google Sheets n8n node): The final action n8n node, responsible for appending the analyzed sales performance data (repId, metrics, coaching status) row-by-row into the target spreadsheet.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

Featured*