Replies: 3 comments 2 replies
-
|
Hi @ally687! I'm Dosu and I’m helping the dify team. This error is affecting multiple users and plugins on Dify Cloud, not just Google Drive. The root cause is likely a bug in how Dify validates plugin credentials or a mismatch between what the plugin expects and what Dify's backend requires—it's not a problem with your JSON or your setup. Common causes include missing or incorrectly formatted required fields, strict schema requirements, or backend bugs introduced in recent updates. Even if your service account JSON is valid, Dify may expect a different structure or extra fields that aren't documented, or the plugin's credential validation method may be broken due to a known bug pattern in Dify plugins (where credential checks are called incorrectly by the platform) [source]. There is no official fix or workaround yet for the Google Drive plugin, and the plugin code isn't available for direct troubleshooting. If you want to help pinpoint the problem, you can try capturing the exact request payload sent when you click "save" (using your browser's network tab) and check if any fields are missing or empty. Sometimes, updating all fields—even optional ones—can help, but in this case, it's likely a backend or plugin bug, not a user error [source]. For now, the best course is to monitor the related GitHub issue for updates. This is a known, unresolved problem and not something you can fix from your side. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Ohhh, that explains everything. The Readme on Dify plugin says to use a
JSON! That's why I was trying to do it that way. Wow, problem solved. Thank
you!!
OR, am I using the wrong plug-in?
Google Drive Tools
Author: yoshiki-0428
Version: 0.0.1
Type: tool
Description
This plugin provides a set of tools for integrating Google Drive with Dify
applications. It allows you to search, create, and manage files and folders
in Google Drive directly from your Dify workflows and agents.
Tools Included
1. File Search - Search for files in Google Drive by name
2. Folder Search - Find folders in Google Drive by name
3. Create File - Upload files to Google Drive
4. Create Folder - Create new folders in Google Drive
5. File Download - Download files from Google Drive (Google Workspace
files are automatically exported to PDF before download)
SetupPrerequisites
- A Google Cloud Platform account
- A Google Cloud project with the Google Drive API enabled
- A service account with appropriate permissions for Google Drive
Creating a Service Account
1. Go to the Google Cloud Console <https://console.cloud.google.com/>
2. Create a new project or select an existing one
3. Enable the Google Drive API for your project
4. Create a service account:
- Go to "IAM & Admin" > "Service Accounts"
- Click "Create Service Account"
- Give it a name and description
- Grant it appropriate roles (at least "Drive File Creator" and
"Drive Viewer")
- Click "Create"
5. Create a key for the service account:
- Click on the service account you just created
- Go to the "Keys" tab
- Click "Add Key" > "Create new key"
- Choose JSON format and click "Create"
- Save the downloaded JSON file securely
Configuration in Dify
1. In your Dify application, go to the Plugins section
2. Find and install the Google Drive plugin
3. When configuring the plugin, you'll need to provide:
- credentials_json: The entire content of the service account JSON
key file
*Allyson Redpath*
Founder/CEO, ForesightIQ
*914.330.1235*
ForesightIQ.com
[image: image.png]
…On Fri, Jan 30, 2026 at 1:01 PM dosubot[bot] ***@***.***> wrote:
The Google Drive plugin in Dify requires OAuth credentials (a client ID
and client secret), not a service account JSON. That’s why you’re seeing
the validation error—pasting a service account JSON will always fail for
this plugin. To set up Google Drive, you’ll need to create OAuth
credentials in the Google Cloud Console, configure the consent screen, and
enter the client ID and secret in Dify, then authorize via Google’s OAuth
page. Here’s a step-by-step guide for the correct setup: Google Drive
plugin setup instructions
<https://github.com/langgenius/dify-official-plugins/blob/main/datasources/google_drive/README.md#configuration-steps>
.
If you specifically need to use a service account JSON (for example, if
your files are in Google Cloud Storage, not Drive), you can use the Google
Cloud Storage plugin instead. This plugin does accept service account JSON
credentials and lets you browse and download files from GCS buckets. Setup
is straightforward: enable the Cloud Storage API, create a service account
with the right permissions, generate a JSON key, and paste it into the
plugin’s credentials field in Dify. Full instructions are here: Google
Cloud Storage plugin setup
<https://github.com/langgenius/dify-official-plugins/blob/main/datasources/google_cloud_storage/README.md#setup>
.
There’s no workaround for using a service account JSON with the Google
Drive plugin, and no official fix for the validation bug yet. If you need
help with the OAuth setup or want to try the Google Cloud Storage plugin as
a temporary solution, let me know what you’re trying to accomplish and I
can walk you through the steps.
*To reply, just mention @dosu <https://go.dosu.dev/dosubot>.*
------------------------------
How did I do? Good
<https://app.dosu.dev/response-feedback/7e8f52e6-608a-461b-a0bc-d91a0f5bef07?feedback_type=great_response>
| Irrelevant
<https://app.dosu.dev/response-feedback/7e8f52e6-608a-461b-a0bc-d91a0f5bef07?feedback_type=irrelevant_answer>
| Incorrect
<https://app.dosu.dev/response-feedback/7e8f52e6-608a-461b-a0bc-d91a0f5bef07?feedback_type=incorrect_sources>
| Verbose
<https://app.dosu.dev/response-feedback/7e8f52e6-608a-461b-a0bc-d91a0f5bef07?feedback_type=too_verbose>
| Hallucination
<https://app.dosu.dev/response-feedback/7e8f52e6-608a-461b-a0bc-d91a0f5bef07?feedback_type=hallucination>
| Report 🐛
<https://app.dosu.dev/response-feedback/7e8f52e6-608a-461b-a0bc-d91a0f5bef07?feedback_type=bug_report>
| Other
<https://app.dosu.dev/response-feedback/7e8f52e6-608a-461b-a0bc-d91a0f5bef07?feedback_type=other>
[image: Chat with Dosu]
<https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github>
[image: Open in Cursor]
<https://cursor.com/link/prompt?text=The%20Google%20Drive%20plugin%20in%20Dify%20requires%20OAuth%20credentials%20%28a%20client%20ID%20and%20client%20secret%29%2C%20not%20a%20service%20account%20JSON.%20That%E2%80%99s%20why%20you%E2%80%99re%20seeing%20the%20validation%20error%E2%80%94pasting%20a%20service%20account%20JSON%20will%20always%20fail%20for%20this%20plugin.%20To%20set%20up%20Google%20Drive%2C%20you%E2%80%99ll%20need%20to%20create%20OAuth%20credentials%20in%20the%20Google%20Cloud%20Console%2C%20configure%20the%20consent%20screen%2C%20and%20enter%20the%20client%20ID%20and%20secret%20in%20Dify%2C%20then%20authorize%20via%20Google%E2%80%99s%20OAuth%20page.%20Here%E2%80%99s%20a%20step-by-step%20guide%20for%20the%20correct%20setup%3A%20%5BGoogle%20Drive%20plugin%20setup%20instructions%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/main/datasources/google_drive/README.md%23configuration-steps%29.%0A%0AIf%20you%20specifically%20need%20to%20use%20a%20service%20account%20JSON%20%28for%20example%2C%20if%20your%20files%20are%20in%20Google%20Cloud%20Storage%2C%20not%20Drive%29%2C%20you%20can%20use%20the%20Google%20Cloud%20Storage%20plugin%20instead.%20This%20plugin%20does%20accept%20service%20account%20JSON%20credentials%20and%20lets%20you%20browse%20and%20download%20files%20from%20GCS%20buckets.%20Setup%20is%20straightforward%3A%20enable%20the%20Cloud%20Storage%20API%2C%20create%20a%20service%20account%20with%20the%20right%20permissions%2C%20generate%20a%20JSON%20key%2C%20and%20paste%20it%20into%20the%20plugin%E2%80%99s%20credentials%20field%20in%20Dify.%20Full%20instructions%20are%20here%3A%20%5BGoogle%20Cloud%20Storage%20plugin%20setup%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/main/datasources/google_cloud_storage/README.md%23setup%29.%0A%0AThere%E2%80%99s%20no%20workaround%20for%20using%20a%20service%20account%20JSON%20with%20the%20Google%20Drive%20plugin%2C%20and%20no%20official%20fix%20for%20the%20validation%20bug%20yet.%20If%20you%20need%20help%20with%20the%20OAuth%20setup%20or%20want%20to%20try%20the%20Google%20Cloud%20Storage%20plugin%20as%20a%20temporary%20solution%2C%20let%20me%20know%20what%20you%E2%80%99re%20trying%20to%20accomplish%20and%20I%20can%20walk%20you%20through%20the%20steps.>
[image: Join Discord] <https://go.dosu.dev/discord-bot> [image: Share on
X]
<https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/discussions/31783>
—
Reply to this email directly, view it on GitHub
<#31783 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B5SSWUUBZAIFAF7G5QMTAB34JOL6RAVCNFSM6AAAAACTO2BQZ6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKNRVGM3TSMI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I'm trying to use the Google Drive plugin (by yoshiki-0428) on Dify Cloud. When I paste my service account JSON and click save, I get 'Input payload validation failed.' The JSON validates correctly in JSONLint and the Google Drive API is enabled. Has anyone gotten this plugin to work on Dify Cloud?
2. Additional context or comments
I've already tried everything I can find for about a week. I can't use Dify until I fix this. Client waiting for product. (Please note I'm not a developer.)
Beta Was this translation helpful? Give feedback.
All reactions