I would like to know if it possible to read automatically google spreadsheet file using google sheets Reader without any interaction of the third party.
Mean if have a google spreadsheet in my google drive read it automatically no need to select the file inside the node.
looking for your suggestion. Thanks
There is no node to list the files in Google Drive (yet), but if you want to realize this now, you should be able to do so with a workaround using REST nodes.
Authentication works like in this blog post, it describes how to access Google Sheets through using the REST nodes. You would have to adapt it to use the Google Drive API to get a list of your Files in Google Drive.
… I modified the workflow from the blog post a bit, and made it list the files sorted by modifiedTime. Then I filtered for Google Spreadsheets. The API has a lot more to offer, see Google Drive API (Especially: The list part). The results from that query can be fed in to the Google Sheets Reader node as flow variable.
@oole thank you for the suggestion I configure the node Post Request Wizard like the description in the website but when I execute the node POST Request I received this error “Execute failed: Duplicate column name “body” at positions 0 and 3.” what does mean?
Thanks
That happened to me as well on the first try, it is a little confusing, but I can walk you through it:
On the first try you will need to deselect Refresh token. After the first successful authentication you will receive a Refresh Token, which you can input to the Authorization code/ Refresh token field and select Refresh token. You will get the Refresh Token from the JSON Processing metanode.
Some other things:
Did you find the Client Secret? (It is hidden in the JSON which you can download from the credentials page)
Also did you enable the Google Drive API for these credentials in the Google Admin panel?
I also wanted to attach the proper URL for the authentication (using the necessary scope), here it is, remember to set the Client ID:
@oole yes I tired I grant the project of Google API the access to my google drive and I got the authorization code. I Enable the google drive API but the same problem:-(.
Take a look my screenShot
yes i tired also i add another node Post i configure it like the other one but the same error
also I enable Google Drive API and google sheets API both and generate new code authorization
Grab the JSON for that client using the little download button on the far right side (look for this:)
From the JSON get the necessary credentials for the authentication metanode. These are the client_id and the client_secret.
Put the client_id into this URL: https://accounts.google.com/o/oauth2/v2/auth?client_id=<Your_Client_ID>&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code &scope=https://www.googleapis.com/auth/drive.metadata.readonly
Copy this URL to the browser of your choice and follow the instructions
Copy the authentication token to you authentication metandode.
Make sure that Refresh token is not selected.
You should now be able to execute the first three nodes.
From the third node you will receive the refresh token through the output table.
Copy the refresh token to the first metanode and select Refresh token. This way your authentication will renew as long as you don’t revoke access to your account via the Connected Apps Settings
Now the workflow should be executable.
This might be way to detailed, but if others have the same problem this will help them as well. I really hope it works now, I tried this procedure multiple times and it worked for me.
Excuse me for deleting your post @Mokrani, I did it for your own safety, sharing access tokens is not a good idea
It is because I forgot to include the important step of actually creating the correct request URL. It is fixed here:google_sheet_and_drive_rest_api.knwf (255.2 KB)