web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Form attachment using ...
Power Automate
Answered

Form attachment using Parse JSON

(1) ShareShare
ReportReport
Posted on by 26
Hi,
 
I''ve got a flow that's triggered by a from response. The response ID is passed to a Parse JSON action using the following to pick up a form file upload:
 
{
    "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"
        ]
    }
}
 
 
This is then picked up using the Get file content using path action with the following path and expression
filepath/first(body('Parse_JSON'))?['name']
 
As you can see, this creats the file in the format filename_form username. 
 
My question is, how to create the correct expression in the get content using path action to return just the attachment filename, not filename_form username.
 
Hope this makes sense! 
 
Thanks for looking
Categories:
I have the same question (2)
  • Suggested answer
    CFernandes Profile Picture
    8,482 Most Valuable Professional on at
    Hey @steveg01 Why don't you the "Get file content" and use the "id" instead.
     
    I did a video you can find details here - https://www.youtube.com/watch?v=YDWpGW1BaBU  
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
     

    Does this answer your question? Check the box :-)
     

     
     
    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
     
  • Sayan Profile Picture
    818 Moderator on at
    Hey @steveg01 Can you please share the workflow?
  • steveg01 Profile Picture
    26 on at
    Hi @Sayan
     
    This is the overall flow:
     
    I get the form response:
     
    Then get the attachment field info:
     
    Then get the file content from a SharePoint shared site where the form is hosted:
     
    Above is where the expression is 
    first(body('Parse_JSON'))?['name']
    This same expression is then used in the Send email with options to send the attachment, and the Add attachment section to add it to the SharePoint list item.
  • Suggested answer
    CFernandes Profile Picture
    8,482 Most Valuable Professional on at
     
    I shared a tutorial in which you can easily get the document using ID, has it not worked for you.
     
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
     

    Does this answer your question? Check the box :-)
     

     
     
    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
     
  • steveg01 Profile Picture
    26 on at
    Hi. @CFernandes​​​​​​​ Personal form file uploads are stored in Onedrive yes, but Group form file uploads are stored in SharePoint. As this is on a group SharePoint site, it stores them in the SharePoint doc library, which is why my get file content using path is pulling from there.
     
    I presume this is why the filename is appended with the username, but I would like to try and remove the username from the attachment filename when emailed.
  • Suggested answer
    CFernandes Profile Picture
    8,482 Most Valuable Professional on at
    Can paste the URL of the Attachment in SharePoint? 
     
    The idea here would be hard code the filePath and the keep the Filename dynamic
     
    and correct the name contains Filename and username and it should be "Name"
     
    this is my URL to folder
     
    /Shared Documents/Apps/Microsoft Forms/Untitled form/Question/
     
    I then added the name dynamically screenshot below
     
    Complete Flow.
     
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
     

    Does this answer your question? Check the box :-)
     

     
     
    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
     
     
  • Verified answer
    CFernandes Profile Picture
    8,482 Most Valuable Professional on at
    Hey Mate, 
     
    If you are still struggling. I created a video tutorial - 
     
    Please find the video Tutorial here - https://www.youtube.com/watch?v=X7z3txj7geI 
     
    This Video:
    • Microsoft Forms Basics – Creating and customizing Forms
    • Exploring Templates in Microsoft Forms
    • Difference Between My Forms vs Group Forms
    • How to Move a Personal Form to a Group Form
    • Setting up a SharePoint List with fields mapped to a Form
    • Power Automate Flow to save form responses (Text, Numbers, Choices, Multiple Choices)
    • Handling Form Attachments and saving them as List Attachments

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
     

    Does this answer your question? Check the box :-)
     

     
     
    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard