Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Retrieve an attachment from a form owned by a group

(0) ShareShare
ReportReport
Posted on by 36

Hi all! I've attempted searching but I'm not seeing this exact problem, so apologies if I missed it. 

 

I have a form that's owned by our Advancement group and it allows for a picture to be submitted as an attachment. Upon submission, I create a SharePoint list item with the responses, then check to see if an attachment was submitted. If there is no attachment, I send an email that contains the information. If there IS an attachment, I do a Parse JSON, then Get file content, then Add attachment to attach the file to the SP list item I created previously, then send the email with a link to the SP list attachment.

 

I've done this successfully with forms I owned, where I'm retrieving the file from my own OneDrive. Where I'm running into trouble now is that I can't seem to retrieve the file from the team site of the Advancement group. 

 

My connections are in place using a service account, and the service account has read/write access to the Advancement team site. I've verified that the files show up in that location. 

 

So ... is there a way I can indicate a specific directory, but include a variable from the JSON step to identify the correct file? Or another way to do this? 

 

Here come screenshots. 🙂 Let me know if more are needed.

 

zollingerc_0-1670015120992.pngzollingerc_1-1670015172306.pngzollingerc_2-1670015183869.png

 

  • zollingerc Profile Picture
    36 on at
    Re: Retrieve an attachment from a form owned by a group

    Worked like a dream! Thank you so much, Paul.

  • Verified answer
    Pstork1 Profile Picture
    66,824 Most Valuable Professional on at
    Re: Retrieve an attachment from a form owned by a group

    Yes, it can be done.  The link property provided by the Parse JSON has what you need, but youhave to do two things to it.

    1) Its the Full Path to the file including the Site address so you have to take the Site Address off the front using a SubString() function.  My Site address is 55 characters long.

    2) Put the result inside an EncodeUriComponent() function to create the file identifier.

    image.png

  • zollingerc Profile Picture
    36 on at
    Re: Retrieve an attachment from a form owned by a group

    One note: I did consider just rebuilding the form with the service account as owner. I'll do that if I need to, but I'd prefer to understand how to retrieve from a team site if what I'm attempting is possible.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >