Skip to main content
How to generate Google Docs with BigQuery?

Learn how to automatically generate PDF with data from a BigQuery table.

Karoline Fernezlian avatar
Written by Karoline Fernezlian
Updated over 10 months ago

This article will show how Sheetgo creates Google Docs and PDF files based on a Google Docs template.

In the article you read, Sheetgo copied data from the BigQuery table sales_representative seen in the screenshot below and pasted its data into a Google Sheets.

documentsbigquery1

From this table, Sheetgo can copy specific data to replace the placeholder as it generates a note for each sales representative who closed a deal (column: status = Closed sale). The Google Docs template can be designed as illustrated in the picture below. Sheetgo will replace the smart tags with the corresponding data in the column where the sales rep closed the sale.

documentsbigquery2

Using the command in the query editor as seen in the picture below, our Sheetgo connection will generate the file(s) needed for each representative.

documentsbigquery3

The next step is to generate Google Docs and then PDFs (if necessary). In the article How to connect to BigQuery? you noticed that after the query editor the connection was set up to copy data in a single file which is what generated the spreadsheet at the end.

We could create documents from the spreadsheet but instead, Sheetgo will go from the content of a table in BigQuery to creating files based on the Google Docs template selected.

documentsbigquery4

Press Finish and save then run the connection or workflow.

Just like that, Sheetgo has generated various files based on the Google Docs template coupled with data it read in the BigQuery table.

documentsbigquery5

To generate a PDF or an email, select the next available step after Generate Documents in the connection setup.

documentsbigquery6

Need more help?

Contact us via chat, on our email ([email protected]), or send us a ticket!

Visit our Community for help, tips, tricks, and feedback for Sheetgo.

Did this answer your question?