Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting this error when using. Folder ID's are valid. Am I doing something wrong? #4

Open
whosjohn opened this issue Jun 10, 2023 · 3 comments

Comments

@whosjohn
Copy link

Error getting destination folder: Exception: Invalid argument: idException: Invalid argument: id
at createFolder (Code:236:38)
at createFolders (Code:139:27)
at processGoogleSheetData_ (Code:71:25)
at GS_INTERNAL_top_function_call.gs:1:8

@whosjohn
Copy link
Author

Screenshot 2023-06-10 at 3 41 50 AM

this is my input

@usaussie
Copy link
Owner

I just pulled down a brand new copy of the repo code, and then the template sheet (linked in the original blog post here -- https://www.techupover.com/create-google-drive-folder-structure-files)

I ran mine with the exact same info as yours (just substituting my folder ID and the Google Doc ID) and it worked without issues....so....so here's some suggestions of what to check:

  • Are you sure you copied in the full drive folder ID and didn't leave anything out? Commonly a folder ID in Google will have a couple of characters at the start of the string and then a hyphen. IE: 1w-JeOd7H2OgO1789uohfdsfQolMW0MkL5
  • Do you have permission to create folders/content in the target folder ID? If it's someone else's folder, and you only have view permissions, you wont be able to create new folders/documents in there.
  • It's failing at line 236, which is "var destinationFolder = DriveApp.getFolderById(destinationFolderId);" -- which is where it's looking up the place where you're going to create the new folder. If the destinationFolderId doesn't exist, or you dont have permission to it...then it will error out.

Check those things, and then let me know if you're still having issues. I'll try to troubleshoot and help.

@Stiiv0
Copy link

Stiiv0 commented Nov 20, 2023

I am having the same issue as the above poster. My only difference is I don't have a doc to put in the folder, so the Template Google Doc ID column contains no info.

Is this possibly an issue with trying to create the folders in a shared folder? The root folder ID is to a publicly facing folder, "Anyone on the internet with the link can view."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants