Get Request Node (ERROR GET Request Illegal character in query)

Dear all,

I’m trying to get the list of the spreadsheet from google drive that I already create them.
I’m using google API v3 to get the LIST file on a specific day (Get files of the last week/last Day)

this is my full request that sent to GET Request node:

join("https://www.googleapis.com/drive/v3/files?q=mimeType='application/vnd.google-apps.spreadsheet' and modifiedTime > '2018-04-01T00:00:00' and createdTime > '2018-04-04T00:00:00'&access_token=",$access_token$)

The solution the request need to be like that
join("https://www.googleapis.com/drive/v3/files?q=mimeType%3d%27application%2fvnd%2egoogle%2dapps%2espreadsheet%27%20and%20modifiedTime%20%3e%20%272018%2d04%2d18T00%3a00%3a00%27%20and%20createdTime%20%3e%20%272018%2d04%2d18T00%3a00%3a00%27&access_token=",$access_token$)
Untitled
my problem here I have a variable date&time I want to add it to the query so the date will be dynamic

But the GET REQUEST node output give me an empty body with status 401 means my request is wrong


Please I’m looking for your suggestion to get more about this node how it works

Thanks

Problem solved
I have a date type string yyyy-MM-ddTHH:mm:ss (2018-04-18T00:00:00)

match : and replace it with %3a match - replace it with %2d
output date need to be like that 2018%2d04%2d18T00%3a00%3a00

by adding java snippet node
Untitled
// Enter your code here:

out_DateTime = c_DateTime.replace("-", "%2d").replace(":","%3a");;
3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.