Google Drive - COPY Slides into PDF: “Forbidden - perhaps check your credentials” Error in n8n

Hi everyone,

I’m facing an issue while trying to download a Google Slides presentation as a PDF using n8n. I’m getting the following error:

Google Drive - “Forbidden - perhaps check your credentials”  
Request failed with status code 403

Details:

  • I’m using the Google Drive node in n8n to download the file.
  • The file is a Google Slides presentation, and I’ve set the conversion to PDF.
  • I’ve already tried the following:
    • Checked file permissions (it’s shared with my account).
    • Re-authorized Google Drive credentials in n8n.
    • The Google Slides API is enabled in Google Cloud Console.
    • I added the following OAuth Scopes:
      • https://www.googleapis.com/auth/drive
      • https://www.googleapis.com/auth/drive.file
      • https://www.googleapis.com/auth/presentations.readonly

Issue:

  • Despite having everything set up, I still get the 403 Forbidden error.
  • The same Google Account has access to the file and is connected to n8n.

Question:

  • Has anyone else faced this issue while trying to convert Google Slides to PDF?
  • Is there something I’m missing in the OAuth or API setup?
  • Any workarounds or tips would be greatly appreciated!

Thanks in advance!

  • n8n version: 1.69.2
  • Database (default: SQLite): QLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): self-hosted in google cloud
  • Operating system: Windows10

Just out of curiosity, have you tried accessing a file that you’ve created and not “shared” with you? Just trying to check if that’s causing an issue. It’s probably not it, but worth a shot.

Hey there @Kiremit, I think the issue is due to Google does not allow direct “Download” actions on Slides but requires an export URL.

Try setting the Google Drive node → File ID like this:

https://docs.google.com/presentation/d/YOUR_FILE_ID/export/pdf

Here are some references for you:

and

1 Like

I suggest you to remove existing Google Drive credentials in n8n and create new ones with these exact scopes.

Can you provide the full message returned by the Google Drive node?

Based on your description, it’s likely that the file you’re attempting to download is too large for this Google Drive node.

If you click the “From Google Drive” title in the “Error details” section below the error message, you will find more information. However, this data is encoded in a buffer, which you can decode using Buffer.from(data).toString('utf-8') in Node.

It conveys the same message as the picture above. The decoded message reads:

{
  "error": {
    "code": 403,
    "message": "This file is too large to be exported.",
    "errors": [
      {
        "message": "This file is too large to be exported.",
        "domain": "global",
        "reason": "exportSizeLimitExceeded"
      }
    ]
  }
}

which is quite self-explanatory.

To overcome this limitation, you can use the Google API directly through the HTTP nodes, as described in the workflow below.

You will also need to make the file publicly accessible.

Note :
It is probably not the case for the slides, but for the Google Docs and Sheets, since the introduction of the “tabs” in google documents, the tab name is added in the first page. It is a known and already reported bug.

Please mark this answer as the solution if it solves you problem :wink:

2 Likes

Thanks for the great answers. If now someone knows how I can set up docker in a way that it does not auto store these files and that I can limit the RAM for the instance so that I can loop these events without crashing N8N on my private Google Cloud VM that would be great.
I am currently running it with the free tier 1GB of RAM which makes files as large as 90MB and upwards impossible to download without crashing things.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.