Intermittent 403 Forbidden Error from Google Apps Script to Webhook

Describe the problem/error/question

I’m experiencing intermittent 403 Forbidden errors when sending POST requests from Google Apps Script to an n8n webhook. The same exact request works 100% of the time when executed from a browser’s developer console using fetch().

Key symptoms:

  • Intermittent: Sometimes works, sometimes fails with the same code

  • Not authentication related: Happens with and without Basic Auth

What I’ve Tested

1. Different Headers Configurations

  • Minimal headers (none)

  • Browser-like User-Agent (Chrome, Firefox, Safari)

  • Default Apps Script headers

  • Postman-like headers

  • Various combinations of Accept, Cache-Control, etc.

Result: 403 errors persist with all configurations

2. Authentication Methods

  • No authentication

  • Basic Auth (username:password)

  • Bearer token

  • Custom headers

Result: 403 errors occur regardless of auth method

3. Request Timing & Retry Logic

  • Added exponential backoff (2s, 4s, 8s delays)

  • Random delays between requests (0.5-3 seconds)

  • Reduced request frequency

  • Sequential requests vs parallel

Result: Intermittency remains

4. Payload Variations

  • Small payload (~1KB)

  • Large payload (~50KB)

  • Different data formats

  • With/without metadata

Result: Size/content doesn’t affect 403 rate

5. Network & Infrastructure

  • Same Google Account across tests

  • Same Apps Script project

  • Same n8n instance/URL

Questions

  1. Is this a known issue between Google Apps Script and n8n webhooks?

  2. Could this be related to:

    • Google’s IP ranges being treated differently?

    • Some hidden rate limiting in n8n?

    • CORS/preflight issues?

    • User-Agent blacklisting?

  3. Why does the exact same request work 100% from browser but fails intermittently from Apps Script?

  4. Are there specific n8n webhook configurations that work better with Apps Script?

Webhook Configuration

What is the error message (if any)?

{“message”: “Forbidden”,“status”: 403}

Please share your workflow

https://n8n-prod.cadastra.com/workflow/9Hbcp5yacCRfHro6

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.9.4
  • Database (default: SQLite): postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker (self-hosted)
  • Operating system:
1 Like

HI @lightofheaven Welcome!
I think you can add google IP ranges to the IP whitelist in your webhook node options, also another thing to try is that if you have N8N_RATE_LIMIT_ENABLED=true set in your docker environment disable or raise the limit, as this would make sure that your IP range is not being blocked or rate limited by google.

Read this conversation for more info about that rate limit thing:

And for whitelisting:

Hi @Anshul, thanks for your suggestions and the quick response!

I’ve tested with the IP(s) Allowlist empty in the webhook node options (which should allow all IPs), and the 403 errors still occur intermittently. However, I haven’t explicitly added Google’s IP ranges to the allowlist yet - that’s definitely worth trying!

Will report back ASAP

1 Like

Let me know if that works @lightofheaven

Hello, @Anshul_Namdev,

I’ve whitelisted all the Google IPs addresses and the problem still persists, gonna reach out to my IT team who look after n8n instance to gather more info about the rate limit being enabled.

Get back later at this topic for more info,

1 Like