Skip to content

Durasi: 15 menit | Block: 3


🎯 Goal

Bikin workflow yang connect ke sistem nyata: Google Sheets, WhatsApp Business, dan custom API.


📊 Google Sheets Integration

Setup Credential

1. Di n8n, buka Credentials → Add → Google Sheets OAuth2 API
2. Follow OAuth flow → authorize
3. Simpan credential name: "Google Sheets - [Nama]"

Common Operations

Read Rows:

Node: Google Sheets → Read Rows
- Spreadsheet: [pilih file]
- Sheet: "Data"
- Range: "A:E"
Output: Array of objects, 1 row = 1 object

Append Row:

Node: Google Sheets → Append Row
- Spreadsheet: [pilih file]
- Sheet: "Inquiries"
- Mapping:
  | Column A (Timestamp) | \{{ $json.timestamp }} |
  | Column B (Nama)      | \{{ $json.nama }}      |
  | Column C (Category)  | \{{ $json.category }}  |
  | Column D (Status)    | "New"                 |

Update Row:

Node: Google Sheets → Update Row
- Search by column "Email" = \{{ $json.email }}
- Update column "Status" = "Contacted"

💬 WhatsApp Integration

Option A: Wabox (Simple)

Node: HTTP Request
- Method: POST
- URL: https://api.wabox.app/send
- Headers: Authorization: Bearer [API_KEY]
- Body (JSON):
  {
    "phone": "\{{ $json.telepon }}",
    "message": "Halo \{{ $json.nama }}, terima kasih atas inquiry Anda."
  }

Option B: Evolution API (Self-host)

Node: HTTP Request  
- Method: POST
- URL: http://[your-server]:8080/message/sendText
- Headers: apikey: [YOUR_KEY]
- Body:
  {
    "number": "\{{ $json.telepon }}",
    "text": "Halo \{{ $json.nama }}..."
  }

Option C: Fonnte (Indonesian)

Node: HTTP Request
- Method: POST  
- URL: https://api.fonnte.com/send
- Headers: Authorization: [API_KEY]
- Body:
  {
    "target": "\{{ $json.telepon }}",
    "message": "Halo \{{ $json.nama }}..."
  }

🔌 Custom API (HTTP Request Node)

HTTP Request = swiss army knife. Bisa connect ke API apapun.

GET Request (Fetch Data)

Node: HTTP Request
- Method: GET
- URL: https://api.example.com/products
- Headers: Authorization: Bearer [TOKEN]
- Response Format: JSON

POST Request (Send Data)

Node: HTTP Request
- Method: POST
- URL: https://api.example.com/orders
- Headers: 
  - Authorization: Bearer [TOKEN]
  - Content-Type: application/json
- Body:
  {
    "customer": "\{{ $json.nama }}",
    "product": "\{{ $json.order.produk }}",
    "qty": \{{ $json.order.qty }}
  }

🔐 Credential Management Best Practices

  1. Jangan hardcode API key di node → pakai Credentials
  2. Test credential sebelum pakai di workflow
  3. Separate credentials per environment (dev vs prod)
  4. Rotate keys secara berkala
  5. Minimal permissions — jangan pakai admin key kalau cukup read-only

🛠️ Live Build: Multi-Integration

[Webhook: Inquiry Form]


[Set Node: Format + Classify]

        ├── Append to Google Sheets (log)

        └── Send WhatsApp notification (real-time)

Build steps:

  1. Tambah Google Sheets node → Append Row
  2. Tambah WhatsApp node (HTTP Request)
  3. Hubungkan keduanya dari Set Node (2 output)
  4. Test dengan webhook payload

Bootcamp AI Automation — akala.id