Create New Dropbox Folder

Hello everyone!

I am wondering if there is a way to create a new folder inside Dropbox from AI.
In short, I am working on an app for recording a sales order or quote.
Ideally I would like to have a folder created for each order / quote inside Dropbox to accommodate the CSV JPG and PNG files created by the app.

I have attached my AIA file to make it easy to see the blocks that I am using.
Hopefully its organized enough to understand.
Dropbox would not let me "share" the Sales App folder without upgrading to their business level or something like that.
So if you want a screenshot of my Dropbox let me know.[dropbox_copy.aia|attachment]

As of right now I have everything doing what I want.
The New Folder is not 100 percent necessary at this time if it is not possible.
I thought it would be a nice feature to add, but for now I have every filename saving with the order / quote number along with line number and image / canvas number for identification.

Before anyone jumps on me for "not searching the forums for myself", just know that I tried hard to search online and of course specifically here first, yet I have not found anything close to a solution for this yet.
If anyone has any ideas or thoughts on a possible solution, I would love to see it.

Any questions or comments are very welcome, including critiques on anything you may see in the blocks that could be improved.
Lemme know if you need any more information or uploads on my end that could help.

Not here just looking for an easy handout, just a hint or direction to keep moving in.
For a couple weeks now, all the work in the project was done without posting any questions.
Searching and researching in the community, and of course A LOT of trial and error, have gotten me this far with my limited knowledge of programming and such.
So thank you all already for the help you have given me without even knowing!

Thanks again to any and all who read and or write back!
Look forward to hearing from you!


EDIT
I just tried building the APK and opening it on the phone (Samsung Galaxy Note 8), and it failed to even start the app.
I have never built an APK and tested it on the phone before.
I remember seeing in the posts here things about changing file paths when switching from the Companion to an actual APK.
I will keep working on it, but there is one more thing for others to chime in on.

*** SOLVED the app not starting ***
I had to enable the app permissions on the phone itself and it started right up.
I will be sure to add the permissions to the Screen1.initialize block later.


dropbox_copy.aia (69.0 KB)

please post only a sceenshot of your relevant blocks... I did not find the blocks you are using to create the folder?

and use the Dropbox API, see also this example https://puravidaapps.com/dropbox.php

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Sorry maybe it was confusing the way I worded things.

I have not attempted any blocks or anything to accomplish creating the new folder just yet.
This is an idea I was hoping to implement at some point for end user convenience.
I have been searching for ways to do it, and since I haven't found one yet I did not add any blocks to the project for it.

I am using the Dropbox API to send files to Dropbox already.
I just did not see a way to use it to create folders.
Perhaps I overlooked it while combing thru information for hours on end.

I should have mentioned this in my first post, but the example you linked in your reply is what I based this project around.
I started with your example and adapted and changed it to what you see now.

Lemme know anything else I can do to help you to help me LOL!

I will continue my due diligence and try to get it on my own as well.

Thank you so much!!

Hello Nick

Are you sure Dropbox is the best solution? Most would be using a relational database.

1 Like

Hi!

I am fairly new to all this still.
I have tried a lot of different things like Firebase and Google Sheets with javascript and everything.
Dropbox seemed like a great solution because I have been able to make it work hahahahaha!

Ideally the app should take in order information including a single or multiples of a canvas PNG and or a JPG file.
Then the app should send me a folder containing the CSV and other files pertaining to each individual order.

Another thought I just had is that from what I read (unless I misread) is that the Web1 can only process one file type at a time.
So I used multiple instances to allow one button to send three file type at once.
I could not find a way to send a directory of files through Web1 to Dropbox, which is what lead me to my original post seeing if anyone new of a way to create a folder in Dropbox to upload specifically to.

I am wondering if I just have to adjust the file name in the Web1/2/3 RequestHeaders action?

I would have to do more research on relational databases.
I remember seeing information about it but I cannot recall anything specific regarding that which I have put into practice yet.

My biggest obstacle has been getting the information uploaded to a place where I can easily access it and use it as a spreadsheet to then import into a specific program.

Do you know of any examples I could look at to get a better understanding of how relational databases could work for what I am going for?

Thanks so much for your reply!

If you want to revisit Google Drive/Google Sheets, everything you want to do is in this list, somewhere:

AI2 and Google Drive/Docs/Sheets
 
HOWTO: Query Any Google Sheet with a Web App.
UPDATED! HOWTO - Upload Any File to Google Drive !
HOWTO: Use AI2 to directly submit Google Form Data
HOWTO: Google Drive - Multiple Files Download (file by file)
HOWTO: Download Google sheet as CSV
HOWTO: Send Data to Google Sheet with Web App
HOWTO: Show Image from Google Drive
HOWTO: Upload Image to Google Drive using base64 and Google Apps Script Web App
HOWTO: Upload Image to Google Drive using base64 using Camera Image
HOWTO: Get Data from Private Google Sheet with A Google WebApp
HOWTO: Get the ID of Image after uploading using base64
HOWTO: Upload CSV or List to Google Sheet
HOWTO: AI2 - Google Sheets - Web App - Create/Read/Update/Delete
HOWTO: OCR Images and Camera Pictures with Google Docs
HOWTO: OCR pdf and image files using Google Docs OCR function
HOWTO: Upload "Any" File to Google Drive
HOWTO: Use google web app and google query to download filtered output as pdf from Google Sheet
HOWTO: Use Ai2 to Delete Images (or other files) on Google Drive
HOWTO: Take Photo, get GPS Location and Address, upload Image to Google Drive, and save Location data to spreadsheet 
HOWTO: Select a Single Row from a Spreadsheet, and howto EDIT that data
3 Likes

Thanks so much for that info!

I have seen you post this list to many people and I have tried almost everything on that list.
I always seem to run into problems on the scripting end and with getting things nested correctly.

As we all know there is never a post solving the exact question or issue with the details you need all in one hahaha!

As I am pretty deep into this project and really happy with it so far for the first thing I have ever really worked on in AI2, I want to try and stick with this method for now unless a really big roadblock arises.

Thank you just the same though!

Sounds like you need to read this too! But I get where you are coming from, no going back now!

HOWTO: Create a Google Apps Script Web App bound to a Spreadsheet

1 Like

Ha! Indeed I do!

And I will. Learning AI has been so much fun.
I will see how far I can take this project and then try something different.

Thanks so much!

I was just doing some more looking around.
Not sure how I did not find this earlier...

I have been having trouble trying to parse this together into the blocks to get it to work.
Not sure exactly what parameters I should be putting in certain places.
It needs to be something similar to these blocks below for the Web Post actions I would think, no?

blocks

yes, this would have been a good idea...

according to the API documentation you should use

  1. the create_folder path inside the URL
  2. the Content-Type application/json
  3. the Post block together with the folder you like to create... you are creating a folder and not uploading a file...

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

So sorry about that ...

Thanks for the tips!

I'm try to create a new folder, but the block not work.
Where is the error?

I'm following the directions on this site: HTTP - Developers - Dropbox

Is there a space after Bearer?
Which responseContent do you get back?
Taifun

I managed to create the folder inside my dropbox.
Is there the possibility to create a folder within the team space? I his Dropbox Business.

Great
What about providing a screenshot of the solution for the community?

I do not know... did you check the API documentation?

Taifun

1 Like

Of course:

I have the access token admin team, but I can't figure out how to create the correct code.

unfortunately I can't find the screenshot of your solution?

you might want to show us a screenshot of what you tried...
Taifun


This is the block.
Sorry, I was unable to upload before.

ok... great... probably someone else is in the mood to scroll through all your blocks...
Taifun