Skip to content

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

ModeBehaviorUse Case
AppendGabung array, satu setelah lainCombine data dari multi-source
Combine (Inner)Gabung by position/indexMatch data 1-1
Combine (SQL)Join by fieldDatabase-style join
Keep Key MatchesGabung yang key-nya cocokEnrich 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 = email

Enriched 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 SourceLookup ByEnrichment
Google SheetsEmailPurchase history, tier
CRM APIPhoneAccount status, plan
Weather APICityCuaca di lokasi customer
Product APISKUStock, price, description
Google MapsAddressDistance, ETA

⚡ Pro Tips

  1. Merge by field lebih reliable daripada by position
  2. Handle null — kalau lookup ga ketemu, Merge tetap jalan tapi field kosong
  3. Test dengan data nyata sebelum activate
  4. Cache lookup kalau data ga sering berubah — hemat API calls

⚠️ Common Issues

IssueCauseFix
Merge ga matchField name beda / case-sensitiveNormalize field name di Set Node
Null valuesLookup ga nemuTambah If node untuk check, beri fallback value
Slow workflow2+ API calls sequentialPakai parallel branches + Merge

Bootcamp AI Automation — akala.id