Export/import data from Google Sheets

  1. Is there a way to get cells value from Google Sheets?
  2. Is there a way to put data into the cell?

Are there plans to add a Google Docs connector?

We do not have a direct integration with Google Docs or Google Sheets at this time, but we’ll add it to our product backlog.

Google Sheets does have an API, so it’s possible to use an HTTP node in a workflow to read from or write to your sheets.

If you’re an IFTTT user, you can skip the API integration and push data to a Google Sheet using an IFTTT webhook trigger and a Google Drive action. You would still use the HTTP node to send a web request to your IFTTT webhook and it would take care of interacting with your spreadsheet.

We actually wrote a blog article on this topic last year; the interfaces for both IFTTT and Losant have changed a bit since then but the general idea is the same.

Thanks. Unfortunately, as I know, IFTTT only supports “add new row” action. I need “update cell value” action.

Finally, I figured out how to read google sheet cells data using HTTP node but still can’t find the solution how to write (update) data in specific cell.
Can you explain, is it possible in Losant?
Thanks.

Since you’re not the first person to try and do something like this, I’m going to write up a tutorial on our blog for some custom interactions with Google Sheets. I should have something up by the middle of next week, and will let you know when it is published.

3 Likes

@niam_frost we just created a series of workflow nodes to create, verify and decode JSON Web Tokens. I believe those nodes will make it possible to complete the integration with Google Sheets.

I still hope to write this up as a blog post; we’re working on some other Google service integrations, and once we have those a little further along, I’ll take our learnings from there and apply them to your use case.

Thanks for your patience. If you feel like taking this on and have any questions about how the nodes work, feel free to reach out.

@Dylan_Schuster
Hi Dylan

I am trying to work out how to do this as well

I am following the instructions here:
https://developers.google.com/identity/protocols/OAuth2ServiceAccount#makingrequest

I am using the JWT Create Node with the following template:
{
“iss”:(my service account email),
“aud”:“https://www.googleapis.com/oauth2/v4/token”,
“scope”:“https://www.googleapis.com/auth/spreadsheets”
}

My private key that i received from google is in the “Secret Template” and i have set the algorithm type to RS256.

The output from this feeds into the HTTP node which is set to POST to https://www.googleapis.com/oauth2/v4/token, the body is:
{
“grant_type”:“urn:ietf:params:oauth:grant-type:jwt-bearer”,
“assertion”:{{myJWT}}
}
In the header, Content-Type is set to application/x-www-form-urlencoded

When i try to run, i get an error back from google saying “unsupported_grant_type”.

I cant see what i have set wrong. Have you got any advice?

Thanks

1 Like