← All N8N workflows
AI & researchAgentDocument Default Data LoaderEmbeddings Open AiExtract From FileHTTP Request

You only have to run this part once!

Configured with Agent, Document Default Data Loader, Embeddings Open Ai, Extract From File, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhatsApp TriggerWhats App TriggerAI & modelsOpenAI Chat ModelOpenAI Chat ModelData storeWindow Buffer MemoryMemory Buffer WindowAI & modelsVector Store ToolTool Vector StoreAI & modelsEmbeddings OpenAIEmbeddings Open AiAI & modelsOpenAI Chat Model1OpenAI Chat ModelTriggerWhen clicking ‘Testworkflow’Manual TriggerAI & modelsEmbeddings OpenAI1Embeddings Open AiFiles / mediaDefault Data LoaderDocument Default Data Lo…TransformRecursive CharacterText SplitterText Splitter Recursive …TransformExtract from FileExtract From FileWeb / APIget Product BrochureHTTP RequestMessagingReply To UserWhats AppMessagingReply To User1Whats AppData storeProduct CatalogueVector Store In MemoryData storeCreate ProductCatalogueVector Store In MemoryRoutingHandle Message TypesSwitchAI & modelsAI Sales AgentAgent

Node categories in this workflow

  • Trigger
  • AI & models
  • Data store
  • Files / media
  • Transform
  • Web / API
  • Messaging
  • Routing

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
WhatsApp TriggerTriggerWhats App TriggerSee node parameters
OpenAI Chat ModelAI & modelsOpenAI Chat ModelSee node parameters
Window Buffer MemoryData storeMemory Buffer WindowSee node parameters
Vector Store ToolAI & modelsTool Vector StoreSee node parameters
Embeddings OpenAIAI & modelsEmbeddings Open AiSee node parameters
OpenAI Chat Model1AI & modelsOpenAI Chat ModelSee node parameters
When clicking ‘Test workflow’TriggerManual TriggerSee node parameters
Embeddings OpenAI1AI & modelsEmbeddings Open AiSee node parameters
Default Data LoaderFiles / mediaDocument Default Data LoaderSee node parameters
Recursive Character Text SplitterTransformText Splitter Recursive Character Text SplitterSee node parameters
Extract from FileTransformExtract From Filepdf
get Product BrochureWeb / APIHTTP RequestSee node parameters
Reply To UserMessagingWhats Appsend
Reply To User1MessagingWhats Appsend
Product CatalogueData storeVector Store In MemorySee node parameters
Create Product CatalogueData storeVector Store In MemorySee node parameters
Handle Message TypesRoutingSwitchSee node parameters
AI Sales AgentAI & modelsAgentSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • openAiApi
  • whatsAppApi
  • whatsAppTriggerApi

Workflow notes

1. Download Product Brochure PDF

1. Download Product Brochure PDF

Read more about the HTTP Request Tool

Import your marketing PDF document to build your vector store. This will be used as the knowledgebase by the Sales AI Agent.

For this demonstration, we'll use the HTTP request node to import the YAMAHA POWERED LOUDSPEAKERS 2024 brochure (Source) and an Extract from File node to extract the text contents.

2. Create Product Brochure Vector Store

2. Create Product Brochure Vector Store

Read more about the In-Memory Vector Store

Vector stores are powerful databases which serve the purpose of matching a user's questions to relevant parts of a document. By creating a vector store of our product catalog, we'll allow users to query using natural language.

To keep things simple, we'll use the In-memory Vector Store which comes built-in to n8n and doesn't require a separate service. For production deployments, I'd recommend replacing the in-memory vector store with either Qdrant or Pinecone.

3. Use the WhatsApp Trigger

3. Use the WhatsApp Trigger

Learn more about the WhatsApp Trigger

The WhatsApp Trigger allows you to receive incoming WhatsApp messages from customers. It requires a bit of setup so remember to follow the documentation carefully! Once ready however, it's quite easy to build powerful workflows which are easily accessible to users.

Note that WhatsApp can send many message types such as audio and video so in this demonstration, we'll filter them out and just accept the text messages.

Want to handle all message types?

Want to handle all message types?

Check out my other WhatsApp template in my creator page! https://n8n.io/creators/jimleuk/

3a. Handle Unsupported Message Types

3a. Handle Unsupported Message Types

For non-text messages, we'll just reply with a simple message to inform the sender.

4. Sales AI Agent Responds To Customers

4. Sales AI Agent Responds To Customers

Learn more about using AI Agents

n8n's AI agents are powerful nodes which make it incredibly easy to use state-of-the-art AI in your workflows. Not only do they have the ability to remember conversations per individual customer but also tap into resources such as our product catalogue vector store to pull factual information and data for every question.

In this demonstration, we use an AI agent which is directed to help the user navigate the product brochure. A Chat memory subnode is attached to identify and keep track of the customer session. A Vector store tool is added to allow the Agent to tap into the product catalogue knowledgebase we built earlier.

5. Repond to WhatsApp User

5. Repond to WhatsApp User

Learn more about the WhatsApp Node

The WhatsApp node is the go-to if you want to interact with WhatsApp users. With this node, you can send text, images, audio and video messages as well as use your WhatsApp message templates.

Here, we'll keep it simple by replying with a text message which is the output of the AI agent.

Try It Out!

Try It Out!

This n8n template builds a simple WhatsApp chabot acting as a Sales Agent. The Agent is backed by a product catalog vector store to better answer user's questions.

  • This template is in 2 parts: creating the product catalog vector store and building the WhatsApp AI chatbot.
  • A product brochure is imported via HTTP request node and its text contents extracted.
  • The text contents are then uploaded to the in-memory vector store to build a knowledgebase for the chatbot.
  • A WhatsApp trigger is used to capture messages from customers where non-text messages are filtered out.
  • The customer's message is sent to the AI Agent which queries the product catalogue using the vector store tool.
  • The Agent's response is sent back to the user via the WhatsApp node.

Need Help?

Join the Discord or ask in the Forum!

You only have to run this part once!

You only have to run this part once!

Run this step to populate our product catalogue vector. Run again if you want to update the vector store with a new version.

Activate your workflow to use!

Activate your workflow to use!

To start using the WhatsApp chatbot, you'll need to activate the workflow. If you are self-hosting ensure WhatsApp is able to connect to your server.

You only have to run this part once!

You only have to run this part once!

Purpose and structure

This folder contains the You only have to run this part once! workflow. Its executable nodes use agent, documentDefaultDataLoader, embeddingsOpenAi, extractFromFile, httpRequest, lmChatOpenAi, manualTrigger, memoryBufferWindow, switch, textSplitterRecursiveCharacterTextSplitter, toolVectorStore, vectorStoreInMemory, whatsApp, whatsAppTrigger. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

WhatsApp Trigger, When clicking ‘Test workflow’

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Extractfromfile/1365_Extractfromfile_Manual_Create_Webhook.json MIT; preserve source notices.

More in AI & research