Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Chatbots & Messaging Bots

Chatbots & Messaging Bots

Chat on WhatsApp with Text, Voice and Images

When a WhatsApp message arrives, an OpenAI agent handles text, transcribes voice, analyzes images and reads files before replying.

What it does

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 {{ $env.WEBHOOK_URL }} 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 {{ $env.WEBHOOK_URL }} --- ### 🪜 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 [{{ $env.WEBHOOK_URL }}]({{ $env.WEBHOOK_URL }} 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 3. Save Then, in your workflows: - Use the HTTP Request node or WhatsApp node - Set the phone_number_id

The steps

  1. WhatsApp Trigger
  2. Download Image
  3. Analyze Image
  4. Download Audio
  5. Transcribe Audio
  6. OpenAI Chat Model
  7. AI Agent1
  8. Download File
  9. Extract from File
  10. Simple Memory
  11. Get File Url
  12. Only PDF File
  13. Fix mimeType for Audio
  14. Send message

59 steps in total.

Similar automations