How to Give Upload Permissions in Google Drive?

What does this error mean?

Request failed with status code 404?

A “Request failed with status code 404” error typically means that the requested resource (e.g., a URL or an API endpoint) was not found on the server. This could be due to an incorrect URL, a missing resource, or a misconfigured API request. To help you further, please provide the code snippet where this error occurs and any additional context about the API or resource you’re trying to access.

const url = https://www.googleapis.com/drive/v3/files/${**this**.folderId}/permissions;

It seems like you’re trying to create a URL to add permissions to a folder in Google Drive using the folder ID. The URL format looks correct. However, there’s a small typo in the string interpolation. Please update the code like this: ```
const url = https://www.googleapis.com/drive/v3/files/${this.folderId}/permissions;

once a request is made to add a feature to an app, how long does it take to get made?

The time it takes to implement a new feature or integration in Pipedream can vary depending on the complexity of the request and the current development priorities. There isn’t a specific timeframe for when a requested feature will be added. However, the Pipedream team reviews and considers all feature requests and works to prioritize them based on user needs. If you’ve submitted a feature request, you can keep an eye on Pipedream’s updates and announcements for any news related to your request. If you have any further questions or need assistance, feel free to ask.

Hi , has this issue been resolved yet?
I’m wondering why Pi suggested the google app instead of google_drive app… that should be the only change needed for it work

do you mean to use the google_drive app instead of google app?

Apologies for the confusion earlier. You are correct, you should use the google_drive app instead of the google app. Please update the props section in your code like this: props: { google_drive: { type: "app", app: "google_drive", }, folderId: { type: "string", label: "Folder ID", }, userEmail: { type: "string", label: "User Email", }, }, And update the Authorization header in the axios request: ```
headers: { Authorization: Bearer ${this.google_drive.$auth.oauth_access_token}, “Content-Type”: “application/json”, },

can you give the whole updated code?

Certainly! Here’s the updated code using the google_drive app: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { google_drive: { type: "app", app: "google_drive", }, folderId: { type: "string", label: "Folder ID", }, userEmail: { type: "string", label: "User Email", }, }, async run({ steps, $ }) { const url = `https://www.googleapis.com/drive/v3/files/${this.folderId}/permissions`; const requestBody = { role: "writer", type: "user", emailAddress: this.userEmail, }; try { const response = await axios($, { method: "POST", url: url, headers: { Authorization: `Bearer ${this.google_drive.$auth.oauth_access_token}`, "Content-Type": "application/json", }, data: requestBody, }); return response; } catch (error) { console.error("Error adding user permissions:", error); throw error; } }, }); This code uses the google_drive app to add a user with “writer” permissions to the specified folder using the folder ID and user email. If you have any further questions or need assistance, please let me know.

I will test this today.

Thanks

the new code that Pi generated did not work.

I am uploading a video of how I am implementing the code. Let me know if you need more information. This is actually a critical step in my workflow. While everything else works, no one can access the folder - which is problematic.

Thank you so much for being available.

Huh, that is a strange error. Especially since I tested the code with my two accounts and it worked

is it possible for you to record yourself doing your configuration of the code?

Also I did check to ensure that Pipedream had full access to my GOOGLE DRIVE account and it appears it did.

PI suggested I use this code to check…

write a code that I can use in my workflow that can determine if Pipedream has full access to my Google Drive.

You can use the following Pipedream component code to check if Pipedream has full access to your Google Drive by listing the files in your Google Drive: ```
import { axios } from “@pipedream/platform”; export default defineComponent({ props: { google: { type: “app”, app: “google”, }, }, async run({ steps, $ }) { try { const response = await axios($, { url: “https://www.googleapis.com/drive/v3/files”, headers: { Authorization: Bearer ${this.google.$auth.oauth_access_token}, }, }); return response; } catch (error) { console.error(“Error accessing Google Drive:”, error); throw error; } }, });

Sorry I’m currently away from my computer but I can definitely show you my configuration later

I ran that code and did not come back with any errors.