Tool Configurations
googledrive
Common Issues

Google Drive tool common issues

Here are some common errors and issues with the Google Drive tool and steps to resolve or troubleshoot them.

Google hasn't verified this app

Google Cloud app becoming unauthorized

Google Drive OAuth error

If using the OAuth authentication method, you may see an error indicating that you can't sign in because the app doesn't meet Google's expectations for keeping apps secure.

Most often, the actual cause of this issue is that the URLs don't match between Google's OAuth configuration and nuhello. To avoid this, start by reviewing any links included in Google's error message. This will contain details about the exact error that occurred.

If you are self-hostin nuhello, check the nuhello configuration items used to construct external URLs. Verify that the N8N_EDITOR_BASE_URL and WEBHOOK_URL environment variables use fully qualified domains.

Get recent files from Google Drive

To retrieve recent files from Google Drive, you need to sort files by modification time. To do this, you need to search for existing files and retrieve their modification times. Next you can sort the files to find the most recent file and use another Google Drive tool target the file by ID.

The process looks like this:

  1. Add a Google Drive tool to your canvas.
  2. Select the File/Folder resource and the Search operation.
  3. Enable Return All to sort through all files.
  4. Set the What to Search filter to Files.
  5. In the Options, set the Fields to All.
  6. Connect a Sort tool to the output of the Google Drive tool.
  7. Choose Simple sort type.
  8. Enter modifiedTime as the Field Name in the Fields To Sort By section.
  9. Choose Descending sort order.
  10. Add a Limit tool to the output of the Sort tool.
  11. Set Max Items to 1 to keep the most recent file.
  12. Connect another Google Drive tool to the output of the Limit tool.
  13. Select File as the Resource and the operation of your choice.
  14. In the File selection, choose By ID.
  15. Select Expression and enter {{ $json.id }} as the expression.