Durasi: 10 menit | Block: 4
🎯 Goal
Ambil data dari sumber lain, gabung, kaya konteks sebelum output.
🔀 Merge Node
Merge = gabung data dari 2+ branch.
Merge Modes
| Mode | Behavior | Use Case |
|---|---|---|
| Append | Gabung array, satu setelah lain | Combine data dari multi-source |
| Combine (Inner) | Gabung by position/index | Match data 1-1 |
| Combine (SQL) | Join by field | Database-style join |
| Keep Key Matches | Gabung yang key-nya cocok | Enrich dengan lookup |
🏗️ Build: Customer Enrichment
Scenario
Inquiry masuk → lookup customer history → enrich → kirim ke sales dengan konteks.
[Webhook: New Inquiry]
│
├── [Google Sheets: Lookup Customer History]
│ │
│ ▼ (output: customer data)
│
└───── [Set Node: Inquiry Data]
│
▼
[Merge Node: Combine by Email]
│
▼
[Set Node: Enriched Data]
│
▼
[Slack/Email: Rich Notification]Merge Configuration
Mode: Combine → SQL (Join)
Input 1 (from Sheets): email field
Input 2 (from Webhook): email field
Match on: email = emailEnriched Output
json
{
"nama": "Budi",
"email": "budi@email.com",
"pesan": "Saya mau tanya produk X",
"category": "sales",
// Data dari Sheets lookup:
"total_orders": 5,
"last_order": "2026-05-15",
"tier": "VIP",
"lifetime_value": 2500000
}Notification dengan Konteks
Subject: 🚀 VIP Inquiry - \{{ $json.nama }}
Body:
Customer: \{{ $json.nama }} (\{{ $json.tier }})
Total orders: \{{ $json.total_orders }}
Last order: \{{ $json.last_order }}
LTV: Rp \{{ $json.lifetime_value.toLocaleString() }}
Inquiry: \{{ $json.pesan }}📊 Other Enrichment Examples
| Data Source | Lookup By | Enrichment |
|---|---|---|
| Google Sheets | Purchase history, tier | |
| CRM API | Phone | Account status, plan |
| Weather API | City | Cuaca di lokasi customer |
| Product API | SKU | Stock, price, description |
| Google Maps | Address | Distance, ETA |
⚡ Pro Tips
- Merge by field lebih reliable daripada by position
- Handle null — kalau lookup ga ketemu, Merge tetap jalan tapi field kosong
- Test dengan data nyata sebelum activate
- Cache lookup kalau data ga sering berubah — hemat API calls
⚠️ Common Issues
| Issue | Cause | Fix |
|---|---|---|
| Merge ga match | Field name beda / case-sensitive | Normalize field name di Set Node |
| Null values | Lookup ga nemu | Tambah If node untuk check, beri fallback value |
| Slow workflow | 2+ API calls sequential | Pakai parallel branches + Merge |