Skip to content

Durasi: 10 menit | Block: 4


⏰ Schedule Trigger (Cron)

Jenis Schedule

TipeCron ExpressionKapan Jalan
Setiap menit* * * * *Monitoring real-time
Setiap jam0 * * * *Hourly sync
Setiap hari 9 pagi0 9 * * *Daily report
Setiap Senin 8 pagi0 8 * * 1Weekly summary
Setiap tanggal 10 9 1 * *Monthly billing

n8n Schedule Node

Node: Schedule Trigger
- Mode: Cron
- Cron Expression: 0 9 * * *  (setiap hari jam 9)
- Timezone: Asia/Jakarta

🏗️ Build: Daily Sales Report

[Schedule: Setiap hari jam 9 pagi]
    → [Google Sheets: Read today's orders]
    → [Code Node: Calculate summary]
    → [Send Email/WhatsApp: Daily report]

👤 Human-in-the-Loop (Approval Flow)

Kenapa Perlu Approval?

Tanpa approval: AI auto-send reply → bisa salah → rugi reputasi
Dengan approval: AI draft reply → human review → approve/reject → send

Wait Node = Pause Workflow

[Webhook: New Inquiry]
    → [AI Node: Draft Reply]
    → [Slack: Send draft for approval]
    → [Wait Node: Wait for Webhook (approval/rejection)]
        ├── Approved → [Send WhatsApp: Reply to customer]
        └── Rejected → [Slack: Log rejection + reason]

Wait Node Config

Node: Wait
- Mode: Webhook
- Path: approval-callback
- Resume: on webhook call

Webhook URL: https://[n8n]/webhook/approval-callback

Approval Interface Options

Option A: Slack Button (Simplest)

Slack message dengan button:
┌─────────────────────────────────┐
│ 📩 New Inquiry dari Budi        │
│ "Mau tanya harga produk X"      │
│                                 │
│ AI Draft Reply:                 │
│ "Halo Budi, harga produk X..." │
│                                 │
│ [✅ Approve] [❌ Reject]        │
└─────────────────────────────────┘

Option B: Simple Web Page

html
<form action="https://[n8n]/webhook/approval-callback" method="POST">
  <input type="hidden" name="id" value="\&#123;&#123; execution_id }}">
  <input type="hidden" name="action" value="approve">
  <button type="submit">✅ Approve</button>
</form>
<form action="https://[n8n]/webhook/approval-callback" method="POST">
  <input type="hidden" name="id" value="\&#123;&#123; execution_id }}">
  <input type="hidden" name="action" value="reject">
  <textarea name="reason" placeholder="Alasan reject (opsional)"></textarea>
  <button type="submit">❌ Reject</button>
</form>

📊 Real-World Approval Scenarios

WorkflowApproval GateKenapa
Auto-reply customerReview AI draft sebelum sendQuality control
Payment processingConfirm transfer > Rp 1MFraud prevention
Social media postApprove konten sebelum postBrand safety
Data deletionConfirm sebelum hapus dataIrreversible action
Discount codeApprove diskon > 20%Margin protection

⚡ Pro Tips

  1. Set timeout di Wait Node — jangan biar wait selamanya. 24 jam timeout, lalu auto-reject.
  2. Log semua approval decisions — audit trail.
  3. Escalation path — kalau ga di-approve dalam X jam → notif ke level atas.
  4. Default action — kalau timeout, apa yang terjadi? Approve atau reject?

Bootcamp AI Automation — akala.id