n8n

Add human approval steps to your n8n automation workflows.

Use cases

  • Approve large data exports before sending
  • Confirm automated email campaigns
  • Review AI-generated content before publishing
  • Gate sensitive API calls or payments

Setup

  1. In n8n, go to Credentials → Add Credential
  2. Select Header Auth
  3. Name: ottr API
  4. Header Name: Authorization
  5. Header Value: Bearer YOUR_API_KEY

Workflow Pattern

Trigger Your Logic Create Approval Wait/Poll If Approved Action

1. Create Approval (HTTP Request)

Add an HTTP Request node to create the approval:

HTTP Request node
// HTTP Request node configuration
{
  "method": "POST",
  "url": "https://api.ottr.run/v1/approvals",
  "headers": {
    "Authorization": "Bearer {{ $credentials.ottrApi.apiKey }}",
    "Content-Type": "application/json"
  },
  "body": {
    "key_path": "n8n/workflow/{{ $workflow.id }}/{{ $execution.id }}",
    "value": "approved",
    "ttl_seconds": 1800,
    "info": "{{ $json.approvalMessage }}",
    "actions": [
      {"key": "approve", "value": "approved", "label": "Approve", "style": "primary"},
      {"key": "reject", "value": "rejected", "label": "Reject", "style": "danger"}
    ]
  }
}

2. Notify (Optional)

Add a Slack, Email, or Telegram node to send the approval URL to your team. The URL is in {{ $json.url }} from the previous node.

3. Poll for Approval

Use a Loop with Wait + HTTP Request to poll for the result:

Poll HTTP Request
// HTTP Request node in loop
{
  "method": "GET",
  "url": "https://api.ottr.run/v1/key/n8n/workflow/{{ $workflow.id }}/{{ $execution.id }}",
  "headers": {
    "Authorization": "Bearer {{ $credentials.ottrApi.apiKey }}"
  }
}

4. Check Result (IF Node)

Add an IF node to branch based on the approval result:

  • Condition: {{ $json.body }} equals "approved"
  • True branch: Continue with your action
  • False branch: Handle rejection or continue polling

Tips

  • Use $workflow.id and $execution.id for unique key paths
  • Set ttl_seconds based on your expected response time
  • Add a loop counter to timeout after N iterations
  • Use ottr Slack integration instead of manual notifications