top of page

Send Aria Operations Reports to Google Drive

Brock Peterson

I wanted to send Aria Operations Reports to Google Drive, but couldn't find an email to use, couldn't find a Webhook to send to, but did find Google Apps Scripts! So, here's what I did.


For reference, Google App Scripts is a SaaS JavaScript platform powered by Google Drive that lets you integrate with automate tasks across Google products, as indicated here. After digging around a little bit, it looked like I could create a Google Apps Script to run against emails with attachments in Google Mail. So, tell me what you know ChatGPT!

I took that piece of code and created a script.

I pasted the code from ChatGPT into the body and adjusted lines 2 and 3 to reflect my environment.

The SEARCH_QUERY is the "from" address of the email coming from Aria Operations, mine looks like this.

The DRIVE_FOLDER_NAME is the Google Drive Folder name I created for these Reports.

Once adjusted (and named) I deployed the Google Apps Script top right by clicking Deploy - New deployment.

You can also Run, Debug, and explore the Execution log from the editor. Clicking Run at the top gives me this.

You'll notice the log at the bottom, indicating Attachments have been saved successfully, let's look.

And there they are! The Google Apps Script found these attachments in my Inbox and added them to Google Drive.

Rather than running this manually I created a Trigger to run it on a schedule (think Linux cron).

All sorts of ways to schedule the run, I scheduled min to run every 15m.

Keep in mind, if the Aria Operations Report email is sitting in your inbox it will continue to be imported into Google Drive on each Trigger.

So many use cases here, enjoy!

Kommentare


    bottom of page