Search code examples
google-apps-scriptgoogle-sheetsgoogle-maps-api-2

Launch Google Spreadsheet function remotely?


Hopefully this is the last step in automating a little piece of my workflow.

  1. Windows scheduler/vbs performs a collection of exports from our SFDC app - done

  2. Windows scheduler/vbs imports the exported data into database tables - done

  3. Windows scheduler/vbs runs SQL queries to produce the necessary data collections to produce Google Maps app data, then drops the result into my Google Drive as a .csv file - done

  4. Added a function to a Published Google Spreadsheet to import the csv data into the spreadsheet. But, requires a manual click on spreadsheet to accomplish - done

  5. Google Maps app points to the google spreadsheet data via JSON call - done

Question - Any way remotely run the function in the Google Spreadsheet, or at least automate the manual "click" on mentioned in step (4).

Hope you can assist.

Thanks!

PS> I did look at JDBC options for the data, but that's more than I'd like to tackle for this last piece - Java is outside my narrow skillset.


Solution

  • If I understand what you're trying to achieve correctly, this is possible.

    At the moment I'm guessing you have a button on the top of your spreadsheet that says something like "Import from CSV" and this then runs a function from your Google Scripts. You can go to the script manager and set a trigger to run this script at specific times in the day.

    Triggers are in

    Tools > Script Manager > *EDIT SCRIPT* > Resources > Triggers