Does anyone know how to simply create a folder with the Google Drive API?

So far I am just effecting uploading a json file to drive named “Untitled” but want to create a folder named “TrialFolder”. I have tried using:

https://www.googleapis.com/upload/drive/v3/files?uploadType=media
as well as:
https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart

have messed around with various combos of Content-Type including “multipart/related” and “application/json”

Thanks a lot in advance.

Also, most recently had mimeType: application/vnd.google-apps.folder

Disregarding how to do this, does any one know if it even is possible?

Thanks a lot.

I’m not sure about Google Drive but have you looked into using Google Cloud Storage? There you can store files in subpaths like folder1/subfolder1/thing.pdf

1 Like

Hi, thank you for the response.

I will take a look at this for sure, but unfortunately I currently have a pretty fixed need for a Google Drive-related solution.

Hello,
Does anyone know if this is possible? I’m in the same situation where I need to create folders in Google Drive.
Thanks

yep Create and populate folders  |  Google Drive  |  Google for Developers

make a POST in your APi connector to https://www.googleapis.com/drive/v3/files

paramaters are:
name: name of the folder
mimeType: application/vnd.google-apps.folder
parents: the id of the folder where you want the new folder to live

1 Like