1

We have a python script that uses gspread to execute an import mechanism from a Google Sheets worksheet into the next system. This is a command-line interface where the script is given the worksheet id, then connects to the Google Sheet, parses the data and imports it to the next system.

We would like to streamline the process so that the worksheet in Google Sheets has an 'Import' button that the user can simply click once the data is ready to import. Googling for a solution with gspread listener gives one Q&A from stackoverflow:

Gspread - Change Listener?

But there is no mention on to use a listen method in the gspread package, or how to hook it up to an App Script button.

What would be a good solution for this button+listener idea?

719016
  • 9,922
  • 20
  • 85
  • 158
  • From your Google Sheets file, you'll only be able to run Apps Script. You could certainly make an Http request from Apps Script to a URL of your choice that includes things like the workbook ID, sheet ID, sheet data, etc. – tehhowch May 09 '18 at 12:35

1 Answers1

1

For the button idea follow a tutorial, for example, this one is tried and tested:

http://googleappscripting.com/google-spreadsheet-button/

However, there is no easy way to run the script directly using Apps Script.

dgb
  • 133
  • 1
  • 4