Converts current doc to PDF and sends it to Lob as a job.
Note: You could publish the script as an official add-on to avoid these steps. For more information on publishing a Docs add-on, see this article.
- Open any Google Doc.
- Under the
Tools
menu item, selectScript Editor
. (This will open a new window.) - In the new window, select
Create Script for Blank Project
. - This should create a new
code.gs
file. Delete its contents and replace with them with the includedcode.gs
file. - Fill in your
LIVE_API_KEY
andTEST_API_KEY
incode.gs
. - Create a new HTML file called
sidebar.html
for this Google script. (File
>New
>Html file
) - Delete the initial contents of the file and replace them with the included
sidebar.html
. - Click back to editing
code.gs
and on the top menu bar, selectonOpen
and then hitRun
. - Navigate back to your doc and you're ready to Lob your doc to anyone!
The script will stay with your doc, so anyone who opens the doc will have access to the script. Be careful who you trust with your API keys!