Hi,
I have a few folders shared to my Google account that I have connected on Pipedream. I have editor access on the folders and I have editor access on some of the files but I can still only see the files on my own Google Drive. Is there something I’m doing wrong or do I need to have a different workflow?
Hi @carl.w,
Based on your description, it seems that you’re trying to access shared folders and files on Google Drive through Pipedream. If you have editor access to these folders and files, you should be able to see and interact with them through the Google Drive API, provided that the correct OAuth scopes are included in your Pipedream Google app connection.
The default OAuth scopes for the Google integration in Pipedream include both https://www.googleapis.com/auth/drive and https://www.googleapis.com/auth/drive.readonly. These scopes should allow you to access files and folders on Google Drive, including those that are shared with you.
If you’re having trouble seeing the shared files, please ensure that:
- The Google account you’ve connected to Pipedream has the necessary permissions to access the shared folders and files.
- The OAuth scopes required for accessing shared files on Google Drive are correctly configured in your Pipedream Google app connection.
If you’ve confirmed both of the above and are still experiencing issues, you may need to adjust your workflow to specifically list shared files or folders. The Google Drive API allows you to list files that are shared with you by setting the q parameter in the API request to 'sharedWithMe = true'.
Here’s an example of how you might list shared files using Pipedream component code:
import { axios } from "@pipedream/platform";
export default defineComponent({
props: {
google: {
type: "app",
app: "google",
},
},
async run({ steps, $ }) {
return await axios($, {
url: `https://www.googleapis.com/drive/v3/files`,
params: {
q: 'sharedWithMe = true',
},
headers: {
Authorization: `Bearer ${this.google.$auth.oauth_access_token}`,
},
});
},
});
This component will make a GET request to the Google Drive API to list files that are shared with the connected Google account. If you’re still having issues after trying this, please visit https://pipedream.com/support for more support options.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double-check my answers and code! Learn how to build your own.