cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DD2020
Frequent Visitor

Forms uploaded file to library, based on answers to questions

Hi, I would like to take a file, uploaded via Forms, and put it in a folder structure, defined by the Forms answer.

If folder does not exist, create one, if it does exist, add in existing.
E.g.:
Form_Q1: folder archive level 1
Form_A1: Comp A
Form_Q2: folder archive level 2
Form_Q2: Doc type 1
File upload: entry.pdf

Results in entry.pdf being archived in:
Site\Library\Comp A\Doc type 1\entry.pdf

 

Thanking you in advance for helping,

1 ACCEPTED SOLUTION

Accepted Solutions
ChristianAbata
Super User II
Super User II

hi @DD2020  please follow this example

 

1.PNG2.PNG

 

json

 

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "name": {
                "type": "string"
            },
            "link": {
                "type": "string"
            },
            "id": {
                "type": "string"
            },
            "type": {},
            "size": {
                "type": "integer"
            },
            "referenceId": {
                "type": "string"
            },
            "driveId": {
                "type": "string"
            },
            "status": {
                "type": "integer"
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}


Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

4 REPLIES 4
ChristianAbata
Super User II
Super User II

hi @DD2020  please follow this example

 

1.PNG2.PNG

 

json

 

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "name": {
                "type": "string"
            },
            "link": {
                "type": "string"
            },
            "id": {
                "type": "string"
            },
            "type": {},
            "size": {
                "type": "integer"
            },
            "referenceId": {
                "type": "string"
            },
            "driveId": {
                "type": "string"
            },
            "status": {
                "type": "integer"
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}


Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Thank you @ChristianAbata 

 

I have copy/paste the syntax for "parse JSON", as in your message.

 

Get the following error (xxxxxxx replaces real names):

 

InvalidJSON. The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value 'file u[{"name":"12345_xxxxxxx.pdf","link":"https://xxxxxxx/xxxxxxx/xxxxxxx/Documents/Apps/Microsoft%20Forms/xxxxxxx/Question/12345_xxxxxxx.pdf","id":"01C5SL7SHKAW2S6GOSBZGKYI5UNORZFLP3","type":null,"size":52007,"referenceId":"01C5SL7SCSKTFAQD2GJRD2JFDJ6ZHJTHLS","driveId":"b!7eD4K1I0Pk2sbq3M3b0N0ZWTag5ZinFAqWfQ1Kzpfqy2R39XMKJHRpG8SSSY1kmn","status":1,"uploadSessionUrl":null}]' cannot be parsed: 'Error parsing boolean value. Path '', line 1, position 1.'.

 

???

you can generete your schema follow this example please 😉

 

getformsImage.gif



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Thank you @ChristianAbata !

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,646)