Skip to main content

Automated lead capture & business Q&A with GPT-4o, Pinecone, and Google Sheets

Workflow preview

Workflow preview
100%
Automated lead capture & business Q&A with GPT-4o, Pinecone, and Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

What Problem Does This Solve? This workflow automates the end to end process of capturing company information from Google Drive, storing it semantically in Pinecone, and interacting with users via ...

Best for

  • Lead Nurturing automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.googledrivetrigger, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.embeddingsopenai, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Belgacem Dhiflaoui.

Original n8n.io source

1.1 Workflow description

Title
Automated lead capture & business Q&A with GPT-4o, Pinecone, and Google Sheets
Workflow name
Automated lead capture & business Q&A with GPT-4o, Pinecone, and Google Sheets

What Problem Does This Solve?

This workflow automates the end-to-end process of capturing company information from Google Drive, storing it semantically in Pinecone, and interacting with users via an intelligent AI chatbot. It eliminates the need for manual customer service, lead tracking, and company information retrieval—offering a fully automated, intelligent engagement system.

Perfect for teams that need to:
  • Maintain accurate, AI-readable company knowledge bases

  • Answer customer inquiries 24/7 using AI

  • Automatically collect and log lead information

  • Embed a chatbot into their website to assist potential customers


Target Audience:

Sales teams, business owners, marketing departments, customer support reps, startup founders, or anyone looking to automate AI-powered lead generation and customer engagement.


What Does It Do?

Part One – Knowledge Ingestion
  • Monitors a Google Drive folder for new .txt or document uploads.

  • Downloads the document and splits the content into manageable chunks using a recursive character splitter.

  • Generates embeddings via OpenAI.

  • Stores the embeddings in a Pinecone vector database under the Q&A namespace.

  • Purpose: This knowledge base is later used to answer business-related questions through AI.

Part Two – AI Chatbot Engagement
  • Listens for incoming chat messages using n8n’s chatTrigger node.

  • Activates an AI agent (powered by GPT-4o) to respond to inquiries regarding business hours, services, products, or general company info.

  • Retrieves knowledge using a vector search tool connected to Pinecone (newCompany_q).

  • Captures leads: If a user shows interest, the AI collects and stores:

    • Name

    • Email

    • Phone number

    • Specific interest

    into a connected Google Sheet automatically.


Key Features

🔄 Google Drive integration for real-time file processing

  • 🧠 OpenAI embedding + Pinecone vector store for semantic memory

  • 🤖 LangChain agent with tool-based reasoning

  • 🗃️ Google Sheets integration for dynamic lead storage

  • 💬 GPT-4o model for accurate, human-like conversation

  • ⚙️ Modular design to expand into CRM, Notion, or email workflows

  • 🌐 Website-ready chatbot endpoint


🧰 Setup Instructions

Prerequisites:

  • n8n instance (cloud or self-hosted)

  • Google Drive account (for uploading company data)

  • Pinecone account (for vector storage)

  • OpenAI API key

  • Google Sheets access with OAuth2 credentials


📦 Installation Steps

1. Import the Workflow Upload the JSON files into your n8n instance.

2. Configure Credentials In n8n > Credentials, connect:

  • Google Drive

  • OpenAI

  • Pinecone

  • Google Sheets

3. Set Pinecone Index & Namespace Example:

  • Index: comanyName

  • Namespace: Q&A

4. Test the Flow

  • Upload a sample .txt or pdf file to the monitored Drive folder.

  • Send a message to the chatbot (e.g., "What are your opening hours?").

  • Check the Google Sheet for collected user info.


How It Works (Behind the Scenes)

Part 1 – Data Preparation:

  1. Company files are uploaded to Google Drive.

  2. File is detected, downloaded, and chunked.

  3. Embeddings are created using OpenAI.

  4. Data is stored in Pinecone for semantic retrieval.

Part 2 – Chat Interaction:

  1. A chat message triggers the workflow via webhook.

  2. The AI agent interprets the intent and accesses company data via newCompany_q.

  3. If lead data is gathered, it is appended to a Google Sheet using the AI-parsed values.


Need help customizing?

Contact me for consulting and support or add me on Linkedin.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Google Drive Trigger

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 2 - Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 3 - Pinecone Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1

Block 4 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 5 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Block 6 - Recursive Character Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 7 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 8 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 9 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 10 - Window Buffer Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 11 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 12 - Pinecone Vector Store1

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1

Block 13 - Embeddings OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 14 - newCompany_q

Type / Role
@n8n/n8n-nodes-langchain.toolVectorStore - toolVectorStore
Config choices
Version 1.1

Block 15 - Append row in sheet in Google Sheets

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.5

Block 16 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automated lead capture & business Q&A with GPT-4o, Pinecone, and Google Sheets
Complexity advanced
Nodes 17
Categories Lead Nurturing, AI Chatbot
Author Belgacem Dhiflaoui
Published 17 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6080/6080.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automated lead capture & business Q&A with GPT-4o, Pinecone, and Google Sheets do?

What Problem Does This Solve? This workflow automates the end to end process of capturing company information from Google Drive, storing it semantically in Pinecone, and interacting with users via ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Nurturing, AI Chatbot use case.