Send mail via Google Apps Gmail using service account domain wide delegation in nodejs

So I was half-step close to the solution, the problem was that while creating const jwtClient = new google.auth.JWT(googleKey.client_email, null, googleKey.private_key, [‘https://www.googleapis.com/auth/gmail.send’], null); i did not mention the account to be impersonated. The correct initialization should be: const jwtClient = new google.auth.JWT(googleKey.client_email, null, googleKey.private_key, [‘https://www.googleapis.com/auth/gmail.send’], ‘user@domain.com’); To summarize, the correct steps are: Created a project … Read more

How to upload a file via POST (doPost) to a Google Script’s Web App?

Files cannot be uploaded directly by “doPost()” of GAS from HTML form on local PC. Because “multipart/form-data” may be not able to be used for “doPost()”. So converting Base64 leads to the solution as you say. There are 2 ways for uploading files by “doPost()”. 1. Upload a file from HTML form on GAS project … Read more

Getting Google Spreadsheet CSV into A Pandas Dataframe

Seems to work for me without the StringIO: test = pd.read_csv(‘https://docs.google.com/spreadsheets/d/’ + ‘0Ak1ecr7i0wotdGJmTURJRnZLYlV3M2daNTRubTdwTXc’ + ‘/export?gid=0&format=csv’, # Set first column as rownames in data frame index_col=0, # Parse column values to datetime parse_dates=[‘Quradate’] ) test.head(5) # Same result as @TomAugspurger BTW, including the ?gid= enables importing different sheets, find the gid in the URL.

Send Email via C# through Google Apps account

There is no need to hardcode all SMTP settings in your code. Put them in web.config instead. This way you can encrypt these settings if needed and change them on the fly without recompiling your application. <configuration> <system.net> <mailSettings> <smtp from=”example@domain.example” deliveryMethod=”Network”> <network host=”smtp.gmail.com” port=”587″ userName=”example@domain.example” password=”password”/> </smtp> </mailSettings> </system.net> </configuration> End when you send … Read more