Google Drive node common issues
Documentation for common questions and solutions in the Google Drive node in n8n, a workflow automation platform. Includes details of the issue and suggested resolutions.
Google Drive node common issues
Here are some common errors and issues with the Google Drive node and steps to resolve or troubleshoot them.
Google hasn't verified this app
If using the OAuth authentication method, you might see the warning Google hasn't verified this app. To avoid this:
- If your app User Type is Internal, create OAuth credentials from the same account you want to authenticate.
- If your app User Type is External, you can add your email to the list of testers for the app: go to the Audience page and add the email you're signing in with to the list of Test users.
If you need to use credentials generated by another account (by a developer or another third party), follow the instructions in Google Cloud documentation | Authorization errors: Google hasn't verified this app.
Google Cloud app becoming unauthorized
For Google Cloud apps with Publishing status set to Testing and User type set to External, consent and tokens expire after seven days. Refer to Google Cloud Platform Console Help | Setting up your OAuth consent screen for more information. To resolve this, reconnect the app in the n8n credentials modal.
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 n8n. 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 n8n, check the n8n 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 node target the file by ID.
The process looks like this:
- Add a Google Drive node to your canvas.
- Select the File/Folder resource and the Search operation.
- Enable Return All to sort through all files.
- Set the What to Search filter to Files.
- In the Options, set the Fields to All.
- Connect a Sort node to the output of the Google Drive node.
- Choose Simple sort type.
- Enter
modifiedTimeas the Field Name in the Fields To Sort By section. - Choose Descending sort order.
- Add a Limit node to the output of the Sort node.
- Set Max Items to 1 to keep the most recent file.
- Connect another Google Drive node to the output of the Limit node.
- Select File as the Resource and the operation of your choice.
- In the File selection, choose By ID.
- Select Expression and enter
{{ $json.id }}as the expression.
[[ workflowDemo("file:///integrations/builtin/app-nodes/n8n-nodes-base.googledrive/get-most-recent-file.json") ]]
Last updated on
Google Drive node documentation
Learn how to use the Google Drive node in n8n. Follow technical documentation to integrate Google Drive node into your workflows.
Google Drive File and Folder operations
Documentation for the File and Folder operations in Google Drive node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.
