Jawaban singkat: n8n punya 2 jalur WhatsApp — (1) WhatsApp Business API Resmi (node Official): butuh Phone Number ID + Access Token + Webhook HTTPS + Template approved, (2) Gateway Praktis (node Unofficial/HTTP): butuh scan QR / API Key + Webhook URL. Keduanya visual no-code. Artikel ini setup step-by-step keduanya, troubleshooting umum, dan kapan pilih mana.
Pilihan Jalur: API Resmi vs Gateway Praktis (Quick Decision)
| Faktor | WhatsApp Business API Resmi (Node Official) | Gateway Praktis (Node Unofficial / HTTP Request) |
|---|---|---|
| Setup Time | 1-7 hari (verifikasi bisnis Meta) | 5-10 menit (scan QR) |
| Nomor WhatsApp | Harus BERSIH (belum pernah daftar WhatsApp) | Bisa pakai nomor existing (sudah dipakai) |
| Kredensial | Phone Number ID + Access Token (System User) | API Key / Token Gateway + Webhook URL |
| Webhook | WAJIB: HTTPS domain sendiri + SSL valid | Biasanya disediakan gateway (domain mereka) |
| Template Pesan | WAJIB approved untuk inisiasi chat (Marketing/Utility) | TIDAK perlu (balas chat masuk bebas) |
| Fitur Native | Katalog, Tombol CTA, List, Flow, Click-to-WA Ads | Teks, Gambar, File, Location, Contact |
| Biaya | Per percakapan (Service GRATIS 1000/bln) | Flat/bulanan Rp 0-150rb |
| Risiko Banned | Sangat rendah (resmi Meta) | Ada (mitigasi: provider terbukti + pola aman) |
| Node n8n | “WhatsApp Trigger” & “WhatsApp Send” (Official) | “WhatsApp Trigger (Unofficial)” / “HTTP Request” |
Rekomendasi: Mulai Gateway Praktis (instan, murah, belajar). Migrasi ke API Resmi saat butuh: Katalog native, Tombol Beli, Click-to-WhatsApp Ads, Green Badge, Compliance ketat, Volume >10k/bln.
Jalur 1: Gateway Praktis (Unofficial) – Setup 10 Menit
Langkah 1: Pilih Provider Gateway
Kriteria: (a) >6 bulan operasi, (b) Keep-alive QR (auto re-koneksi), (c) Support responsif, (d) Dokumentasi n8n/webhook, (e) Limit harian cukup. Hindari gratisan random.
Langkah 2: Daftar & Dapatkan Kredensial
- Daftar di dashboard gateway
- Buat “Device” / “Instance” baru
- Dapatkan: API Key / Token / Secret, Webhook URL (format: `https://gateway-domain.com/webhook/xxxx`)
Langkah 3: n8n – Setup Node WhatsApp (Unofficial)
- n8n → Workflow baru → Tambah Node: **”WhatsApp Trigger (Unofficial)”** (community node) ATAU **”HTTP Request”** (generic)
- Jika pakai HTTP Request:
– Method: POST
– URL: Webhook URL dari gateway
– Headers: `Authorization: Bearer API_KEY`, `Content-Type: application/json`
– Body: `{{JSON.stringify($json)}}` - Jika pakai Community Node: Isi credential fields (API Key, Instance ID, dll)
Langkah 4: Konfigurasi Webhook di Gateway
- Dashboard Gateway → Settings → Webhook
- Set URL: `https://DOMAIN-ANDA/n8n/webhook/whatsapp` (harus HTTPS, domain sendiri)
- Atau gunakan webhook URL gateway jika mereka provide (format: `https://gateway.com/webhook/xxx`)
- Test: Kirim “Test” dari WhatsApp lain → Cek n8n Execution
Langkah 5: Scan QR & Test
- Dashboard Gateway → Device → “Connect” / “Scan QR”
- Buka WhatsApp di HP → Menu (3 titik) → Linked Devices → Link a Device → Scan QR
- Status: “Connected” / “Ready”
- Test: Chat dari nomor lain → Cek n8n Executions → Sukses
Jalur 2: WhatsApp Business API Resmi (Official) – Setup 1-7 Hari
Prasyarat (Wajib Siapkan Sebelum Mulai)
- Meta Business Manager account (business.facebook.com)
- Dokumen verifikasi: NPWP, NIB/Akte Pendirian, Website/Domain, Email Domain
- Nomor Telepon BERSIH (belum pernah daftar WhatsApp / WhatsApp Business)
- Domain sendiri dengan SSL valid (untuk Webhook HTTPS)
Langkah 1: Verifikasi Bisnis di Meta
- business.facebook.com → Buat Akun Bisnis / Pilih existing
- Business Settings → Brand Safety → Verifications → Start Verification
- Upload dokumen → Tunggu 1-7 hari kerja (status: “Verified”)
Langkah 2: Buat WhatsApp Business Account (WABA)
- Business Settings → WhatsApp Accounts → Add → “API”
- Isi: Nama Bisnis, Zona Waktu, Kategori Industri
- Submit → WABA Created (ID: `WABA_XXXXXXXXXX`)
Langkah 3: Daftarkan Nomor Telepon
- WABA → Phone Numbers → Add Phone Number
- Masukkan nomor bersih → Verifikasi via SMS/Call
- Dapatkan: **Phone Number ID** (format: `123456789012345`)
Langkah 4: Buat System User & Access Token
- Business Settings → Users → System Users → Add
- Nama: “n8n Bot” → Role: Admin → Next
- Assign Asset: Pilih WABA → Full Control → Save
- Generate New Token → Pilih: `whatsapp_business_management`, `whatsapp_business_messaging` → Copy Token (simpan aman, tidak expired)
Langkah 5: Setup Webhook di Meta (CRITICAL – Harus HTTPS Domain Sendiri)
- WABA → Configuration → Webhook → Edit
- Callback URL: `https://DOMAIN-ANDA/n8n/webhook/whatsapp` (harus valid SSL, bukan IP, bukan localhost)
- Verify Token: Buat random string (contoh: `n8n_whatsapp_webhook_2026_abc123`) → Simpan
- Subscribe Fields: Centang `messages`, `message_template_status_update`, `message_deliveries`, `message_reads`
- Verify & Save → Meta akan kirim challenge GET → n8n harus respond 200 OK dengan challenge string
Langkah 6: n8n – Setup Node WhatsApp Official
- n8n → Credentials → New → **”WhatsApp Business API”**
- Phone Number ID: (dari Langkah 3)
Access Token: (System User Token dari Langkah 4) - Workflow → Tambah Node: **”WhatsApp Trigger”** (Official) → Pilih Credential di atas
- Tambah Node: **”WhatsApp Send”** (Official) → Pilih Credential sama
Langkah 7: Buat Template Pesan (WAJIB untuk Inisiasi Chat)
- WABA → Message Templates → Create Template
- Kategori: **Utility** (untuk notifikasi/order) atau **Marketing** (promo)
- Nama: `order_confirmation`, `shipping_notification`, `welcome_message`
- Bahasa: Indonesian
- Header: Text / Media (opsional)
- Body: Template dengan variable `{{1}}`, `{{2}}` (contoh: “Halo {{1}}, pesanan {{2}} sudah dikonfirmasi.”)
- Footer: Opsional
- Buttons: Quick Reply / URL / Phone Number (opsional)
- Submit → Review biasanya <24 jam → Status: **APPROVED**
Langkah 8: Test End-to-End
- Chat ke nomor bisnis dari WhatsApp lain
- Cek n8n Executions → Trigger jalan → AI proses → Send balasan
- Kirim template test via Meta: Template → Send Test → Masukkan nomor test
- Verifikasi: Customer terima template, balas → Bot jawab
Troubleshooting Umum (Quick Fix)
| Masalah | Penyebab | Solusi |
|---|---|---|
| Webhook verification failed (Meta) | Callback URL tidak HTTPS / SSL invalid / domain salah / n8n tidak respond challenge | Pastikan domain valid SSL, n8n webhook URL accessible public, n8n respond 200 OK dengan challenge string |
| “Invalid Phone Number ID” / “Invalid Token” | Kredensial salah copy / token expired / Phone Number ID salah | Copy ulang dari Meta: Phone Number ID (angka saja), System User Token (panjang, awalan `EAA…`) |
| Template REJECTED | Kategori salah / Konten promotional di Utility / Variable format salah / Bahasa tidak didukung | Baca alasan reject Meta → Perbaiki → Resubmit. Utility: transaksional. Marketing: promo. |
| Gateway: QR expired cepat / sering disconnect | Provider tidak punya keep-alive / WhatsApp detect unofficial | Ganti provider terbukti >6 bulan. Pola aman: delay, limit, tidak blast. |
| n8n Execution: “Connection refused” / “ECONNREFUSED” | n8n tidak jalan / port salah / firewall block | Cek `systemctl status n8n`, port 5678, firewall allow 5678, domain proxy (Nginx/Cloudflare) forward ke 5678 |
| Gateway: “Rate limit exceeded” | Kirim terlalu cepat / blast | Tambah Delay node (2-5 detik), Limit batch (max 20/menit), Hindari broadcast massal |
Migrasi Gateway Praktis → API Resmi (Saat Butuh)
- Setup API Resmi paralel (nomor baru bersih)
- Jalankan dual: Gateway (nomor lama) + API Resmi (nomor baru) sebulan
- Migrasikan data: Export KB Sheets, Import ke workflow baru (sama saja)
- Update workflow n8n: Ganti Node WhatsApp (Unofficial → Official), Kredensial baru
- Test penuh → Cutover: Umumkan nomor baru ke customer, forwarding nomor lama
- Decommission Gateway lama
Checklist Setup WhatsApp di n8n Minggu Ini
🚀 GATEWAY PRAKTIS (Mulai Hari Ini):
- [ ] Pilih provider gateway terbukti (>6 bln, keep-alive, support)
- [ ] Daftar, dapatkan API Key + Webhook URL
- [ ] n8n: Tambah Node WhatsApp Unofficial / HTTP Request
- [ ] Set Webhook di Gateway → URL n8n webhook
- [ ] Scan QR di Gateway → Status Connected
- [ ] Test: Chat dari nomor lain → n8n Execution sukses
🏢 API RESMI (Saat Butuh Fitur Native/Compliance):
- [ ] Siapkan dokumen: NPWP, NIB, Domain, Email Domain, Nomor Bersih
- [ ] Verifikasi Bisnis Meta (1-7 hari)
- [ ] Buat WABA + Daftarkan Nomor Bersih → Dapat Phone Number ID
- [ ] Buat System User + Token (whatsapp_business_messaging)
- [ ] Setup Webhook Meta → Callback URL domain sendiri HTTPS + Verify Token
- [ ] n8n: Credential WhatsApp Business API + Node Official Trigger & Send
- [ ] Buat Template (Utility/Marketing) → Submit Review → Approved
- [ ] Test End-to-End: Chat masuk → Bot jawab, Template kirim → Terima
FAQ: Menghubungkan n8n ke WhatsApp API
Apakah n8n punya node resmi WhatsApp Business API?
YA — n8n versi terbaru include node **”WhatsApp Business API”** (Official) untuk Trigger & Send. Credential: Phone Number ID + Access Token. Untuk Gateway Praktis: pakai Community Node “WhatsApp Unofficial” atau generic “HTTP Request” ke webhook gateway.
Kenapa API Resmi butuh domain sendiri HTTPS untuk webhook?
Meta requirement: Callback URL harus valid domain dengan SSL certificate (bukan IP, bukan localhost, bukan self-signed). n8n harus accessible public di port 443/80. Solusi: VPS + Domain + Nginx Proxy + SSL (Let’s Encrypt / Cloudflare) → forward ke n8n port 5678.
Bisa pakai nomor WhatsApp pribadi yang sudah ada untuk API Resmi?
TIDAK — API Resmi butuh nomor BERSIH (belum pernah daftar WhatsApp / WhatsApp Business). Solusi: Beli nomor baru khusus bisnis / gunakan nomor kantor yang belum dipakai WhatsApp. Gateway Praktis BISA pakai nomor existing (scan QR).
Berapa lama template approved di Meta?
Biasanya <24 jam. Kategori Utility (notifikasi/order) lebih cepat approved. Kategori Marketing (promo) lebih ketat. Pastikan format variable `{{1}}`, `{{2}}` benar, tidak promotional di Utility.
Template setup lengkap sudah jadi di mana?
Ebook + Template n8n — include: Dual-jalur workflow (Gateway + API Resmi), Setup guide lengkap dengan screenshot, Webhook configuration n8n + Nginx + Cloudflare, Template library (Utility/Marketing), Troubleshooting checklist, Migrasi guide, Compliance checklist.
Baca juga: Cara Menghubungkan n8n ke WhatsApp API Resmi & Gateway Praktis untuk panduan lengkapnya.