Schedule Apps Script PDF Conversion with a Time Trigger

A time-based trigger turns a manual Apps Script function into a fully automated job. Set it once, and your Google Docs export to PDF every day, every week, or at whatever interval your workflow requires.

Creating a trigger in the editor

In the Apps Script editor, click the clock icon on the left sidebar to open the Triggers panel. Click Add Trigger, choose your conversion function, set the event source to Time-driven, and select the frequency. Click Save. The trigger is now active and will run independently of you.

Choosing the right interval

For daily reports, use a day timer set to a time when Drive activity is low, such as early morning. For weekly exports, use a week timer on a specific day. For near-real-time processing, an hourly trigger checks the source folder every hour and converts any new documents added since the last run.

Avoiding duplicate conversions

If a trigger runs every hour and the same document is in the folder each time, it will convert the same file repeatedly. Use PropertiesService to store a log of which files have already been converted, or move converted files to a separate folder after processing to prevent re-processing.

Frequently Asked Questions

Can I set a trigger to run at a specific time of day?

Yes. When adding a time-based trigger, choose 'Day timer' and select the hour range. Apps Script runs the function at a random time within that one-hour window.

How do I know if the scheduled trigger ran successfully?

Check the execution log in the Triggers panel. Each run shows the start time, duration, and whether it succeeded or failed. You can also add an email notification in your script.

Ready to Try It?

Install the free Chrome extension and start converting your Google Docs to PDF in one click.

Install Free Extension