Forum Discussion

Artem_Slonko's avatar
Artem_Slonko
Copper Contributor
Jan 22, 2024

Is there a way to show all OneDrive folders before a submition a Microsoft Form?

Hi, there. I have an idea that will simplify some manual processes within a company. We have a representative who uploads images to OneDrive. We've already had the folder structure in OneDrive, we are not considering changing it anyway. 

The OneDrive structure is the following:

- Order 1

-- Image type A 1

-- Image type B 1

-- Image type C 1

 

- Order 2

-- Image type A 2

-- Image type B 2

-- Image type C 2

 

etc.

 

The idea is to present all these folders and subfolders in the form and provide access for selecting one for the representative. That is the core step.

 

The next step is when the representative selects the folder, he may upload up to 5 images to OneDrive. These images will go to the exact selected directory. 

The form should look like this:

MS FORM
Section1 (must)
Label Name: <--- insert the order number

Section2 (must)
Select the OneDrive folder: <-- select folder

Section3 (must)
Select the image from the phone: <-- insert the image
Select category radio button: <-- select category

Section 4 -- 7 are the duplicates of Section 3 and they are optional/


When a form is submitted, each image must be renamed according to the made UI elements selection in the past. (For example, the representative put the order number on the UI label as "12345". And he selected one of the options from the radio button list, "apple", "banana", "orange" or another "{name}".

The images' names must be the following:

- Image 1 has the name "order12345  -- banana".

- Image 2 has the name "order12345  -- apple".

- Image 3 has the name "order12345  -- potato" (another option was selected).

 

All these images go to the right folder in OneDrive after submission of the form

path: OneDrive/order12345/image_grocery (grocery is a category, we may have cleaning, bakery etc.)

images: three images will be uploaded to the path and keep the right naming based on the past selection

 

OR 

 

Is there a way to pop up a form when the representative uses the OneDrive mobile app before uploading images to rename them? 

 

Thank you for any assistance,

Artem

  • LeonPavesic's avatar
    LeonPavesic
    Silver Contributor

    Hi Artem_Slonko,

    your idea of streamlining the image upload process and automating the organization in OneDrive using Microsoft Forms is interesting.

    Microsoft Forms does not have a built-in feature to display all OneDrive folders for selection before submission. Additionally, Forms doesn't directly support the dynamic creation of folders or the renaming of files based on user input.

    The general approach should involve using Microsoft Power Automate. Here's a general concept:

    1. Microsoft Forms Setup:

      • Create a Microsoft Form with the necessary sections and questions, including the order number, folder selection, image uploads, and category selection.
      • Ensure that the form is set up to collect the necessary information for renaming and organizing the images.
    2. Power Automate Workflow:

      • Create a Power Automate workflow triggered by the submission of the Microsoft Form.
      • Use the "Get response details" action to retrieve the information submitted in the form.
      • Use conditions and actions to rename the images based on the submitted data (order number, category, etc.).
    3. OneDrive Integration:

      • Use Power Automate actions to create folders dynamically in OneDrive based on the order number if they don't already exist.
      • Move the uploaded images to the appropriate folder in OneDrive.
      • Rename the images according to the specified naming convention.


    Please click Mark as Best Response & Like if my post helped you to solve your issue.
    This will help others to find the correct solution easily. It also closes the item.


    If the post was useful in other ways, please consider giving it Like.


    Kindest regards,


    Leon Pavesic
    (LinkedIn)

    • Artem_Slonko's avatar
      Artem_Slonko
      Copper Contributor

      LeonPavesic 

      Alright. So, I made a try to build a simple upload project to my OneDrive. I use "Create File OneDrive" block.

      I connected input with the output of Compose block and assigned properties like:

      Input Create File | Output Compose
      -------------------------------------------------------
      Folder Path is a folder in | N/A
      OneDrive disk |
      --------------------------------------------------------
      File Name | name
      --------------------------------------------------------
      Content of the file | link

      "link" is an actual link to SharePoint. If I copy and paste it I can see an image to my browser.

      But

      when OneDrive creates a file, the format is not readable even if the file is downloaded to PC.

      That's weird.

      What am I missing here?

       

       

      Here is the output of the Compose block



      Here is how the file looks like after creating



      No preview, nothing. The file is damaged because it is not displayed even if I download it.

    • Artem_Slonko's avatar
      Artem_Slonko
      Copper Contributor
      Hi. No, I am trying to save exactly in OneDrive. At this time I am just practicing with the process flow out of the real folders to prevent crushes in the system. The question exists still taking content from the "Get Detailed response" bloc k and provide it to "Create file" block?

Resources