Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching Python script from Google Apps Script

I've been searching for some time, and, as I couldn't find an answer, I'm asking this one. My issue is quite simple:

I have a form linked to a sheet. Bound to this sheet, I have a script running, performing calculations based on the just inserted data, and taking actions. Although, I would like to perform a request on a given API. For so, I have a working script in python (something about 100 lines), and I'm not willing to rewrite it in JS (and I don't even know if that would be possible, considering some limitations on Google Apps Script JS), nor do I want to pay for Google App Engine.

Is there anyway to run an external file, like a DOS command line, from my script in Google Apps Script?

I've seen something similar here, but this doesn't fit my cases because the asker is willing to use GAE.

Thanks in advance!

like image 365
Lucas Lima Avatar asked Apr 07 '26 07:04

Lucas Lima


1 Answers

No. You'll either have to run the python app in a 3rd party service and then call it from GAS using UrlFetch(); or call a GAS function from python using Google's execution API. I don't think there's any other way.

like image 143
Sujay Phadke Avatar answered Apr 09 '26 19:04

Sujay Phadke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!