Sending from a service account isn’t as easy as you’d think. There are a lot of parts to it and configuration issues on the google site of things. I’m going to document the code part, assuming you have a service account with the proper permissions already. Here are the steps
Using Google Drive: Server to Server
While many people have client-side applications that post to Google Drive, our applications generate files like PDFs that need to be saved on our user’s GoogleDrive. We also do things like add watermarks to images before having them put on google drive. So, we have to set up communications between our server and the Google Servers. We do this by using the Google.Apis.Drive.v3 plugin. Once you get it working, it’s a snap.
Paging with online PDF modules
On of the biggest challenges for web-based systems is the printed document. Our clients must be able to print out multi-page reports that are in a stable and clean format regardless of what machine downloads them, what browser they are using, and what printer is being used.