Build an n8n human-in-the-loop workflow that calls when retries run out
When an AI workflow is still blocked and a real deadline is closing, call the named owner for one bounded decision—then return the answer to n8n.
Retry routine failures automatically. Reserve the phone for the moment only a human can unblock.
Independent workflow recipe; not endorsed by or affiliated with n8n. Automated checks verify route data, downloadable assets, fail-closed policy gates, secret scans, and the production build. This is not a live vendor-account certification. Complete one supervised call to yourself before production use; live calls can consume calling minutes.
Quick Answer
How does n8n phone-call escalation work?
Use an n8n Error Trigger or approval branch to detect a blocked execution. After retries fail, confirm material impact, a live deadline, and an authorized owner. ClawdCall calls that owner and returns the acknowledgment so n8n can retry, pause, delegate, or open an incident.
Why Phone?
Escalate the decision, not every error.
Most failures belong in retries, logs, or normal alerts. Use a call only when the workflow remains blocked, delay creates material harm, and a named owner can choose retry, pause, delegate, or approve.
Verified trigger
Detect a blocked execution
An n8n error workflow receives a failed execution, or an approval branch reports a waiting state with a short, material deadline.
Policy gate
Confirm a human decision is needed
Require exhausted retries, continued blocked state, material impact, a known owner, a live deadline, and a fresh idempotency key.
Returned outcome
Resume with a verified answer
Use the returned call ID to retrieve the transcript or receive a configured callback, then write retry, approve, reject, delegate, pause, or open-incident back into the workflow.
Before You Start
Requirements
- An n8n instance that can import workflow JSON
- A verified ClawdCall account and bearer API key stored in n8n credentials
- Your own phone number in E.164 format for the supervised test
- A durable idempotency store before production use
When It Calls
All filters must pass
- State is error or waiting—not a normal retry
- Failure count meets your exhausted-retry threshold
- Impact is material and the owner can act now
- Approval or remediation deadline is inside the configured window
- No completed acknowledgment exists for this event ID
- One call maximum per execution or approval ID
Spoken Preview
What the expected recipient hears
“This is a test escalation from your n8n workflow. The synthetic approval process is blocked after three attempts and expires in ten minutes. Please say acknowledge, retry, pause, or delegate.”
Field Map
Build the call from safe, explicit fields.
execution.id or approval.iddedupe keyStore before calling; reject repeats.workflow.name + safe failure classtasksSummarize the blocked process without secrets or raw error text.approved internal ownertargetUse one fixed, pre-authorized E.164 number.deadline + allowed decisionstasksAsk for a bounded acknowledgment or decision.short workflow labelraw.introMessageIdentify the workflow and state in one sentence.Copyable Gate
Phone-worthiness gate for an n8n Code node
const event = $json;
const allowedState = ["error", "waiting"].includes(event.state);
const retriesExhausted = Number(event.failure_count) >= 3;
const deadlineIsClose = Number(event.deadline_minutes) <= 15;
const safeRecipient = event.owner_known === true;
const material = ["customer", "revenue", "operations", "test"].includes(event.impact);
const approvedSyntheticTest = event.synthetic === true && event.self_test === true;
if (!(allowedState && retriesExhausted && deadlineIsClose && safeRecipient && material)) {
return [];
}
if (event.synthetic && !approvedSyntheticTest) return [];
return [{ json: { ...event, call_allowed: true } }];Implementation
Set up the recipe
- 01
Download and import the workflow JSON. It includes a manual synthetic trigger and an Error Trigger production path.
- 02
Create an n8n Header Auth credential named ClawdCall Bearer with header Authorization and value Bearer followed by your API key.
- 03
Open the Synthetic blocked workflow node and replace the phone placeholder with your own verified E.164 number.
- 04
Run the workflow while the outbound HTTP node remains disabled. Inspect the generated target, tasks, and intro message.
- 05
When the payload is correct, enable the outbound node, explicitly approve one paid self-call, and run the manual trigger once.
- 06
Before production, connect the Error Trigger or approval branch, add a persistent failure counter and idempotency store, then retrieve the transcript or handle the callback.
Safe Test
Synthetic event to one self-call
- Keep the source event synthetic and the destination set to yourself.
- Dry-run through the gate with the ClawdCall HTTP node disabled.
- Confirm the workflow emits exactly one request and contains no raw exception, customer data, or credential.
- Enable the HTTP node only after reviewing the payload; a live test can consume calling minutes.
- Confirm the call completes and save only the call ID and bounded outcome.
Expected result shape
- status: completed
- acknowledgment: retry
- owner: verified self-test recipient
- next step: retry once, then pause
- call ID: returned by ClawdCall; never invent or hard-code it
Treat the live ClawdCall response and transcript as the source of truth. Do not fabricate a call ID, completion state, or human response.
Callback and Correlation
Return the phone outcome to the originating n8n execution
Treat the call as asynchronous work. Store the ClawdCall call ID beside the n8n execution or approval ID, then correlate the completion callback or transcript lookup before allowing the workflow to continue.
- 01
Persist execution ID, approval ID, and call ID before waiting for a result.
- 02
Accept only an authenticated callback, or retrieve the result with the stored call ID from a trusted worker.
- 03
Map the bounded response to retry, approve, reject, delegate, pause, or open incident; reject every unexpected value.
- 04
Record the completed outcome against the idempotency key so callback retries cannot resume the n8n workflow twice.
Production Guardrails
Keep routine noise and sensitive data off the phone.
- Do not call on every failed node; require exhausted retries and a material deadline.
- Never place API keys, raw stack traces, customer records, or private prompt text in the spoken task.
- Use a fixed internal recipient and explicit quiet-hour rules.
- Store idempotency outside an individual n8n execution before enabling production calls.
- Stop after acknowledgment and require separate approval for any additional paid call.
Troubleshooting
Fail closed, then inspect the gate.
The Error Trigger does not fire during a manual test.
That is expected in n8n. Use the included Manual Trigger for testing; Error Trigger runs when an automatic workflow fails.
The ClawdCall node returns 401.
Check that the Header Auth credential uses Authorization and a Bearer value, and that it is selected on the HTTP Request node.
The gate produces no output.
Inspect the normalized state, failure count, impact, deadline, owner-known flag, and synthetic-test flag. The template intentionally fails closed.
The same failure creates more than one call.
Add a durable uniqueness check on execution or approval ID before the HTTP Request node; execution-local memory is not sufficient.
FAQ
Questions about this workflow
Should n8n call on the first AI tool failure?
No. Let the workflow retry ordinary failures. A call is justified when retries are exhausted, the process remains blocked, delay matters, and a known owner can make a bounded decision.
Is this a native n8n integration?
No. It is an independent n8n workflow recipe that uses n8n's HTTP Request node and the ClawdCall API.
Can the call result resume the workflow?
Yes, when your workflow maps a configured callback or retrieved transcript into a controlled decision such as retry, approve, reject, delegate, pause, or open incident.
Verification Sources
Vendor behavior and API references
- n8n Error TriggerHow n8n starts an error workflow and why manual runs use a separate test trigger.
- n8n HTTP RequestThe HTTP action used to invoke ClawdCall.
- n8n human oversight for production AIn8n guidance on inserting human review points before consequential AI tool actions.
- ClawdCall Agent APILive API contract for outbound calls and transcript retrieval.
Continue Building
Test, verify, and price the complete phone workflow.
First Call
Verify the full path with one call to yourself.
Once the self-call completes and the workflow returns a real outcome, replace the fixture with a narrowly filtered production event.
Start a supervised self-call