Upload Google sheets JSON feed to FTP server on a daily basis - python

I need a simple script to upload my google sheets JSON feed to ftp server on a daily basis.
I am planning to use Python and Task Scheduler, but I am looking for another solution. Maybe it is possible with Google Apps Script.
Thank you in advance.

Hello Lasha Dolenjashvili,
This is not possible with Google Apps Script.
To make outbound FTP requests from Google Apps Script there is a similar restriction from App Engine as well. You are alternatives are unless to find an HTTP interface to the server, some sites offer both HTTP and FTP.
You can check the log Issue

Related

What Google app engine Auth to use to only expose my "intranet" site only to my GSuite users?

I am pretty new Google app engine, and though I have hacked around with alot of languages, I am finding the google documentation a little overwhelming. I have successfully launched a static site, and successfully run some python code from the console. But I have not run any python from my static site.
I am a Small company trying to setup a google app engine static/dynamic website that I only want to expose to my Gsuite users.
I have some python code I want to run on my app engine, which will download a file from gdrive/teamdrive, process the file, create a new file from the results and then upload the resulting file to the same folder.
I may also at a later date have this static/dynamic website also interfacing with Cloud SQL(mysql) or an external database.
my Questions
What authentication method to use to only expose this website to my gsuite users?
Though I have worked through some of the GDrive api examples whats the best and easiest method of passing GDrive text files to my python code? (though I have hacked around with python lots in the past, the html and python combination perplexes me)
Thanks!
You would use OAuth2.0 to acquire a token which you can then use to interact with that user's files through the GDrive API (see "About Authorization" as well as this quickstart Python example).

Can Python on Google App Engine act as an FTPs(FTP TLS) or sFTP client?

Despite multiple posts on StackOverflow suggesting Google App Engine not supporting FTP using Python, FTP does now work. (We have posted an example of working code here.)
Given GAE's progress with basic FTP, has anyone found a way for a Google App Engine script to serve as an sFTP or FTPS(FTP TLS) client?

how to allow my own google drive app to only upload files

I want to develop a backup app, I wish that the app will be able only to upload files without any permissions to delete files (or any other permission).
is it possible ?
Yes, it's possible. Start by looking for a python library that lets you communicate with the Google Drive API. See Google APIs Client Library and PyDrive (you'll find easy code as example here).

Accessing Google Groups Services on Google Apps Script in Google App Engine?

I'm trying to work out if it is possible to use Google Apps Scripts inside Google App Engine?
And if there is a tutorial in doing this out there ?
Through reading Google's App Script site I get the feeling that you can only use app scripts inside Google Apps like Drive, Docs etc?
What I would like to do is to be able to use the Groups Service that is in GAS inside GAE to Create, delete and only show the groups that a person is in, all inside my GAE App.
Thanks
No you can't. AS and GAE are totally different things and won't work together.
What you can really do is (abstract):
write an AS that does what you need
redirect from GAE to the AS url to make sure that the user logs-in/grants permissions.
perform what you needed to do with AS
send back the user to GAE with a bunch of parameters if you need to
If you need GAE in Google Apps script, you can write a webservice in GAE using UrlFetch in Apps Script: https://developers.google.com/apps-script/service_urlfetch
To give you an example: I created an Apps Script to get report data (json) from an appengine webservice. This data is added to a google apps spreadsheet.

Send emails from Google App Engine

I have a web server with Django, hosted with Apache server. I would like to configure Google App Engine for the email server. My web server should be able to use Google App Engine, when it makes any email send using EmailMessage or sendmail infrastructure of Google Mail API.
I learnt that by using Remote API, I can access Google App Engine server from my main web server. However, I could not access the Mail APIs supported by Google App Engine.
Is the Remote API strictly for Datastore? If so, can only the DB read from it and no other API calls can?
The example code for the remote APi gives you an interactive console from which you can access any of the modules in your application. I see no requirement that they be only datastore operations.
You may want to use a third-party SMTP relaying service. Here's a list.
Most of them have a simple API that lets you forward your email to their service. That way, you're not bound by the AppEngine's limits. The more reputable ones also take care of headers necessary so your app isn't tagged as a spam sender (which hopefully, it isn't :-)

Categories