The Token That Expired on a Holiday: Credential Expiry in n8n
Description and use
An n8n workflow stopped writing data because its OAuth token expired, yet it still reported success. The fix involved tracking credential expiry, separating auth failures from transient errors, and creating a runbook for re‑authorization.
Problem
An n8n workflow stopped performing its job because an OAuth token and its refresh token had expired, yet the workflow continued to report successful executions.
Outcome
Implementing credential expiry tracking, distinct error handling for auth failures, and a documented re‑authorization runbook prevented silent workflow failures and reduced outage resolution time from hours to minutes.
Workflow
- 1. Record credential name, expiry date, and owner in a central spreadsheet. 2. In the workflow, after the HTTP node, check the status code. 3. If status is 401/403, branch to an alert node that sends a message naming the credential and provider, and mark the run as failed. 4. If status is 429/500, branch to a retry loop. 5. Ensure the error workflow alerts include the authentication failure message. 6. Maintain a runbook that documents how to re‑authorize the credential, including account owner, login location, required scopes, and verification steps.
Evidence
The workflow was fine. The credential was not
The OAuth token had expired. The refresh token had expired too, silently, weeks earlier
The fix starts with treating every credential as something with a known expiry date
Never let an authentication failure travel down the same path as a transient failure
- Record date: 2026-11-01T12:43:51.601Z