Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
Export Google Doc URLs from a specific Google Sheet cell and convert to PDF

I have created a gs script to autofill certain information from G-Sheet to a G-Doc template (so to make the final G-Doc content more personalized).

I managed to write a script to create G-Doc url automatically once its autofilled. Now, I want to convert the G-Doc URL to PDF.

Please help!

See below, the first column is where the G-Doc URL is automatically created, how do I do auto-create PDF URL on the second column?

columns where the URLs sit

here is the final part of the script for creating and saving G-doc URL:

 doc.saveAndClose();
 const url = doc.getUrl();
 sheet.getRange(index +1,154).setValue(url)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can try the following:

doc.saveAndClose();
const url = doc.getUrl();
const docID = doc.getId();
const pdfURL = url.toString().replace("/open?id=" + docID, "/document/d/" + docID + "/export?format=pdf");

And just add the last line to specify where in the sheet you want to set the pdfURL

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!