Google Drive Search failed ( How to escape filenames for Google Drive API with apostrophe('))

Status: Closed · Asked by salasia on · 0 views

salasia — Question ·

Hi, one of our workflows failed because it was searching for the following file on Google Drive:

1_They DON'T HAVE TO let us RACE! A MASSACRE_Pre-edit.mp4

Here's the "Data In" result:

{
"Api Endpoint Url": "https://www.googleapis.com/drive/v3/files?corpora=allDrives&includeItemsFromAllDrives=true&supportsAllDrives=true&supportsTeamDrives=true&q=name+%3D+'1_They%20DON%27T%20HAVE%20TO%20let%20us%20RACE%21%20A%20MASSACRE_Pre-edit.mp4'+and+mimeType!='application/vnd.google-apps.folder'&fields=*"
}

And here's the "Data Out" response:
{
"Error Errors 0 Domain": "global",
"Error Errors 0 Reason": "invalid",
"Error Errors 0 Message": "Invalid Value",
"Error Errors 0 LocationType": "parameter",
"Error Errors 0 Location": "q",
"Error Code": 400,
"Error Message": "Invalid Value"
}

Is it due to the apostrophe in "DON'T"?
Thanks in advance!
Sergio

Pabblymember11 — Reply ·

Hey @salasia

Could you please share the name of the workflow in which you are facing such an error?

salasia — Reply ·

Hi @Supreme
Affected workflow name is "Shared start of workflow".

Best regards
Sergio

Pabblymember11 — Reply ·

Hey @salasia

We have tested the same on the Postman application and Google Drive is not accepting the apostrophe on the text.

Though you can try searching the file by replacing the apostrophe with blank/nothing and can use "Substring" as a method.

salasia — Reply ·

Hi @Supreme

thank you for your reply. Is there any list of unaccepted characters I can refer to?
Kind regards

Sergio

Pabblymember11 — Reply ·

Hey @salasia

You can refer to Google's API documentation perhaps they might have mentioned it. Else you can try reproducing the unaccepted characters.

Back to all forum threads · Log in to reply