Why do my n8n QuickBooks or HubSpot credentials keep expiring?
n8n OAuth credentials for QuickBooks and HubSpot can fail with refresh token errors. What the vendors document, what users report, and how to fix it.
When an n8n QuickBooks or HubSpot credential keeps asking you to reconnect, the OAuth refresh step is failing. Access tokens are short-lived by design, so n8n has to swap a refresh token for a new one in the background. If that swap fails, or the refresh token itself is rejected, the recovery reported in the QuickBooks thread below is to reconnect. The cause differs by vendor, and the n8n docs do not cover token expiry for either.
How to tell if this is your problem
- A workflow that ran fine for weeks or months starts failing with an auth error.
- The error text mentions a refresh token being "invalid, expired, revoked" or a similar message.
- Clicking "reconnect" on the credential fixes it, and you wonder whether it will break again.
- HubSpot shows a 401 while n8n shows a different error code.
These match what users post. In an n8n community thread, a user running a daily QuickBooks Online workflow on n8n 1.50.1 reported failures after about a month, with an error saying the authorization grant or refresh token is "invalid, expired, revoked". Reconnecting the credential cleared the error, and the poster asked whether that is needed monthly. No confirmed explanation or permanent fix appears in that thread. In an older thread from 2021, a user reported a HubSpot OAuth2 token expiring every six hours, with HubSpot logging a 401 while n8n displayed a 400.
Why it happens
What n8n documents. The n8n QuickBooks credential page lists OAuth2 as the only method. It asks for a Client ID, Client Secret and an environment (Production or Sandbox), and a redirect URL copied from n8n into your Intuit app. It does not describe token expiry or reconnecting. The n8n HubSpot page lists a service key, a developer API key (for the trigger node) and OAuth2. On n8n Cloud you choose "Connect my account." Self-hosted users create their own public app in HubSpot. That page also does not describe expiry or reconnecting.
HubSpot. HubSpot's developer documentation says access tokens are short-lived (30 minutes), with the lifetime given in the expires_in field of the token response. It describes the refresh token as your app's long-term credential, and the HubSpot pages we read do not state a refresh token lifetime. The 2021 community thread reported tokens expiring every six hours, which differs from the 30 minutes on the current HubSpot page. Do not hardcode either number. Read expires_in.
HubSpot also marks some older auth methods as going away. The n8n page says HubSpot deprecated the regular API Key method and moved UI-based private apps to legacy status, recommending a service key. It also warns that service keys are in public beta and subject to change. If your credential uses one of the older methods, that is a separate reason for it to stop working.
QuickBooks. This page does not state a QuickBooks refresh token lifetime, because we could not confirm one on Intuit's own documentation. Read the current token lifetime on Intuit's OAuth 2.0 pages before you plan around any number. Here is what users say. In the n8n thread above, a replier cited QuickBooks documentation as saying refresh tokens are valid for 100 days, and said n8n's authentication does not yet account for that. The original poster quoted the docs as saying the expiry is rolling and extended each time the token is used. The thread offers no confirmed explanation for why the failure came after about a month. Both quotes are user statements, not checked against Intuit's own page, so treat them as unverified.
How to fix it
- Read the exact error. Open the failed execution and read the full message. A rejected refresh token needs reconnecting. A scope or redirect URL error is a setup problem.
- Reconnect the credential. Open the credential in n8n and reconnect. In the QuickBooks thread, this cleared the error. Before changing a credential that live workflows depend on, note which workflows use it and run one of them manually afterward to confirm it works.
- Check the app settings in the vendor. For QuickBooks, confirm the Client ID and Secret, the Production versus Sandbox choice, and that the redirect URL from n8n is listed in your Intuit app. For HubSpot self-hosted, confirm the App ID, Client ID and Client Secret from the app's Auth tab, the scopes, and the redirect URL.
- Check which HubSpot method you use. If it is the deprecated API key or a legacy private app, move to a service key, as the n8n page recommends, noting the beta warning.
- Check which node holds the credential. The 2021 poster used the HTTP Request node with OAuth2 rather than the HubSpot node, and still reported expiry after an n8n fix was released; they ended up switching to API key authentication, which HubSpot has since deprecated. If you can, use the built-in HubSpot node with its own credential.
- Watch for the failure. Set an error workflow in n8n so a broken credential alerts you the day it breaks. n8n's error workflow starts with the Error Trigger.
- Test the cause, do not assume it. If failures repeat on a schedule, note the dates. A pattern tells you whether it is a time limit, an action someone took in the vendor account, or a bug.
When to get help
Get help when the connection feeds invoices, deals or customer records and a silent auth failure would cost you data, or when reconnecting keeps breaking and you cannot tell why.
We build automation that runs end to end with checks, and offer a fixed-fee audit when integrations misbehave. If you would rather talk it through, book a call.
About the Author
Founder & Principal Consultant
Josh helps SMBs implement AI and analytics that drive measurable outcomes. With experience building data products and scaling analytics infrastructure, he focuses on practical, cost-effective solutions that deliver ROI within months, not years.
Related Posts
November 15, 2026
November 15, 2026
November 15, 2026
Want help putting this to work?
Palavir does AI, analytics and data-products consulting for small and mid-sized businesses.