← All N8N workflows
AI & researchAgentCodeExtract From FileHTTP RequestIf

AI-Powered WhatsApp Chatbot for Text, Voice, Images & PDFs

Configured with Agent, Extract From File, HTTP Request, OpenAI Chat Model, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhatsApp TriggerWhats App TriggerWeb / APIDownload ImageHTTP RequestAI & modelsAnalyze ImageOpen AiWeb / APIDownload AudioHTTP RequestAI & modelsTranscribe AudioOpen AiAI & modelsOpenAI Chat ModelOpenAI Chat ModelAI & modelsAI Agent1AgentWeb / APIDownload FileHTTP RequestTransformExtract from FileExtract From FileData storeSimple MemoryMemory Buffer WindowMessagingGet File UrlWhats AppRoutingOnly PDF FileIfCodeFix mimeType for AudioCodeMessagingSend messageWhats AppMessagingSend audioWhats AppMessagingIncorrect formatWhats AppTransformTextEdit FieldsTransformAudioEdit FieldsTransformImageEdit FieldsTransformFileEdit FieldsMessagingNot supportedWhats AppMessagingGet Image UrlWhats AppMessagingGet Audio UrlWhats AppAI & modelsGenerate Audio ResponseOpen AiRoutingFrom audio to audio?IfRoutingInput typeSwitch

Node categories in this workflow

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

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
Download ImageWeb / APIHTTP RequestSee node parameters
Analyze ImageAI & modelsOpen Aiimage / analyze
Download AudioWeb / APIHTTP RequestSee node parameters
Transcribe AudioAI & modelsOpen Aiaudio / transcribe
OpenAI Chat ModelAI & modelsOpenAI Chat ModelSee node parameters
AI Agent1AI & modelsAgentSee node parameters
Download FileWeb / APIHTTP RequestSee node parameters
Extract from FileTransformExtract From Filepdf
Simple MemoryData storeMemory Buffer WindowSee node parameters
Get File UrlMessagingWhats Appmedia / mediaUrlGet
Only PDF FileRoutingIfSee node parameters
Fix mimeType for AudioCodeCodeSee node parameters
Send messageMessagingWhats Appsend
Send audioMessagingWhats Appsend
Incorrect formatMessagingWhats Appsend
TextTransformEdit FieldsSee node parameters
AudioTransformEdit FieldsSee node parameters
ImageTransformEdit FieldsSee node parameters
FileTransformEdit FieldsSee node parameters
Not supportedMessagingWhats Appsend
Get Image UrlMessagingWhats Appmedia / mediaUrlGet
Get Audio UrlMessagingWhats Appmedia / mediaUrlGet
Generate Audio ResponseAI & modelsOpen Aiaudio
From audio to audio?RoutingIfSee node parameters
Input typeRoutingSwitchSee 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

  • httpHeaderAuth
  • openAiApi
  • whatsAppApi
  • whatsAppTriggerApi

Workflow notes

✅ Prerequisites

How to obtain Whatsapp API?

✅ Prerequisites

Before you begin, make sure you have:

  • A Meta Business Account
  • A Facebook Developer Account
  • A Verified Business
  • A Phone Number to link to WhatsApp
  • Access to Meta's Graph API Explorer or Meta for Developers portal

🪜 STEP 1: Create a Meta App

  1. Go to https://developers.facebook.com/apps
  2. Click “Create App”
  3. Choose "Business" as the app type, then click Next
  4. Give your app a name and enter a contact email
  5. Choose your Business Account (or create one)
  6. Click Create App

🪜 STEP 2: Add WhatsApp Product

  1. In your app dashboard, scroll down to "Add a Product"
  2. Find "WhatsApp" and click “Set Up”
  3. Link your Business Manager Account

🪜 STEP 3: Create a WhatsApp Business Account (if needed)

  1. If you haven’t already, go to https://business.facebook.com/
  2. Click “Create Account”, and complete your business information
  3. Go to Business Settings > Accounts > WhatsApp Accounts
  4. Add a Phone Number (you'll receive a verification code)

🪜 STEP 4: Generate a Temporary Access Token (for development)

  1. In the App Dashboard, go to WhatsApp > Getting Started
  2. Choose your test phone number
  3. Copy the temporary access token (valid for 24 hours)
  4. Copy the Phone Number ID and WhatsApp Business Account ID

✅ Save these 3 values:

  • Access Token
  • Phone Number ID
  • WABA ID

📝 Tip: For production, you will later need to create a permanent token (see step 7).


🪜 STEP 5: Set Up a Webhook URL (n8n)

  1. In n8n, set up a Webhook node (or use the WhatsApp Trigger node)
  2. Copy the webhook URL
  3. In the Meta Developer Dashboard:
    • Go to WhatsApp > Configuration
    • Click “Edit Callback URL”
    • Paste your n8n webhook URL and add a random verify token
  4. In n8n, configure your webhook to respond to the verification request

🪜 STEP 6: Subscribe to Webhook Fields

  1. Still under WhatsApp > Configuration, click "Manage Subscriptions"
  2. Enable:
    • messages
    • message_status
    • (Optionally message_template_status_update)

🪜 STEP 7: (Optional but recommended) Generate a Permanent Token

  1. Go to https://developers.facebook.com/tools/access_token/
  2. Select your app
  3. Click Get Token > System User Token
  4. Select the permissions:
    • whatsapp_business_management
    • whatsapp_business_messaging
    • business_management
  5. Click Generate Token
  6. Copy and securely store this token

🪜 STEP 8: Configure Credentials in n8n

  1. Go to n8n > Settings > Credentials
  2. Create new credentials of type HTTP Header Auth
    • Name: WhatsApp
    • Header Name: Authorization
    • Value: Bearer <your_access_token>
  3. Save

Then, in your workflows:

  • Use the HTTP Request node or WhatsApp node
  • Set the phone_number_id in the node parameters
  • Connect it to your WhatsApp credential

🧪 STEP 9: Test the Connection

  1. Use a WhatsApp number to send a message to your business phone
  2. Your n8n workflow should be triggered
  3. You can now send and receive messages programmatically 🎉
AI-Powered WhatsApp Chatbot for Text, Voice, Images & PDFs

AI-Powered WhatsApp Chatbot for Text, Voice, Images & PDFs

Purpose and structure

This folder contains the AI-Powered WhatsApp Chatbot for Text, Voice, Images & PDFs workflow. Its executable nodes use agent, code, extractFromFile, httpRequest, if, lmChatOpenAi, memoryBufferWindow, openAi, set, switch, 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

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/Code/2033_Code_Extractfromfile_Automate_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • Text
  • Voice
  • Image
  • Document
  • Response

More in AI & research