Subject: Issue exporting Google Sheets as PDF (range A1:J until lastRow+2)
Hello Make Support Team,
I’m trying to automate exporting a Google Sheet as a PDF in a scenario.
Requirements:
-
Only export columns A–J
-
Only up to a dynamic row number = LastrowNumber + 2 (I calculate LastrowNumber earlier in the scenario).
What I’ve tried so far:
-
HTTP → Make a request with the URL:
https://docs.google.com/spreadsheets/d/<SpreadsheetID>/export?format=pdf&gid=<gid>&range=<sheetName>!A1:J<LastrowNumber+2>&portrait=true&fitw=true&gridlines=false&printtitle=false→ Result: 401 Unauthorized or a Google login HTML page instead of the PDF.
-
Custom OAuth2 connection with Client ID / Client Secret and redirect URI → Authentication works, but the export still returns the login page.
-
Google Drive → Make an API Call (files.export) → works, but it only exports the entire spreadsheet. Unfortunately, I cannot specify a
rangeorgidthere.
My questions:
-
What is the correct way in Make to export only a specific range of a Google Sheet (e.g.
Allgaier!A1:J384) as PDF? -
Can this be done via Google Sheets → Make an API Call, or is the HTTP module with a special configuration the only option?
-
How can I make sure the OAuth token is passed correctly? (Currently I always get 401 Unauthorized.)
Thank you very much for your support!
Best regards,
Toni