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.
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.
| Node | Category | Type | Operation |
|---|---|---|---|
| WhatsApp Trigger | Trigger | Whats App Trigger | See node parameters |
| Download Image | Web / API | HTTP Request | See node parameters |
| Analyze Image | AI & models | Open Ai | image / analyze |
| Download Audio | Web / API | HTTP Request | See node parameters |
| Transcribe Audio | AI & models | Open Ai | audio / transcribe |
| OpenAI Chat Model | AI & models | OpenAI Chat Model | See node parameters |
| AI Agent1 | AI & models | Agent | See node parameters |
| Download File | Web / API | HTTP Request | See node parameters |
| Extract from File | Transform | Extract From File | |
| Simple Memory | Data store | Memory Buffer Window | See node parameters |
| Get File Url | Messaging | Whats App | media / mediaUrlGet |
| Only PDF File | Routing | If | See node parameters |
| Fix mimeType for Audio | Code | Code | See node parameters |
| Send message | Messaging | Whats App | send |
| Send audio | Messaging | Whats App | send |
| Incorrect format | Messaging | Whats App | send |
| Text | Transform | Edit Fields | See node parameters |
| Audio | Transform | Edit Fields | See node parameters |
| Image | Transform | Edit Fields | See node parameters |
| File | Transform | Edit Fields | See node parameters |
| Not supported | Messaging | Whats App | send |
| Get Image Url | Messaging | Whats App | media / mediaUrlGet |
| Get Audio Url | Messaging | Whats App | media / mediaUrlGet |
| Generate Audio Response | AI & models | Open Ai | audio |
| From audio to audio? | Routing | If | See node parameters |
| Input type | Routing | Switch | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- 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
httpHeaderAuthopenAiApiwhatsAppApiwhatsAppTriggerApi
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
- Go to https://developers.facebook.com/apps
- Click “Create App”
- Choose "Business" as the app type, then click Next
- Give your app a name and enter a contact email
- Choose your Business Account (or create one)
- Click Create App
🪜 STEP 2: Add WhatsApp Product
- In your app dashboard, scroll down to "Add a Product"
- Find "WhatsApp" and click “Set Up”
- Link your Business Manager Account
🪜 STEP 3: Create a WhatsApp Business Account (if needed)
- If you haven’t already, go to https://business.facebook.com/
- Click “Create Account”, and complete your business information
- Go to Business Settings > Accounts > WhatsApp Accounts
- Add a Phone Number (you'll receive a verification code)
🪜 STEP 4: Generate a Temporary Access Token (for development)
- In the App Dashboard, go to WhatsApp > Getting Started
- Choose your test phone number
- Copy the temporary access token (valid for 24 hours)
- 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)
- In n8n, set up a Webhook node (or use the
WhatsApp Triggernode) - Copy the webhook URL
- In the Meta Developer Dashboard:
- Go to WhatsApp > Configuration
- Click “Edit Callback URL”
- Paste your n8n webhook URL and add a random verify token
- In n8n, configure your webhook to respond to the verification request
🪜 STEP 6: Subscribe to Webhook Fields
- Still under WhatsApp > Configuration, click "Manage Subscriptions"
- Enable:
messagesmessage_status- (Optionally
message_template_status_update)
🪜 STEP 7: (Optional but recommended) Generate a Permanent Token
- Go to https://developers.facebook.com/tools/access_token/
- Select your app
- Click Get Token > System User Token
- Select the permissions:
whatsapp_business_managementwhatsapp_business_messagingbusiness_management
- Click Generate Token
- Copy and securely store this token
🪜 STEP 8: Configure Credentials in n8n
- Go to n8n > Settings > Credentials
- Create new credentials of type HTTP Header Auth
- Name: WhatsApp
- Header Name:
Authorization - Value:
Bearer <your_access_token>
- Save
Then, in your workflows:
- Use the HTTP Request node or WhatsApp node
- Set the
phone_number_idin the node parameters - Connect it to your WhatsApp credential
🧪 STEP 9: Test the Connection
- Use a WhatsApp number to send a message to your business phone
- Your n8n workflow should be triggered
- 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