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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Retrieve an attachment...
Power Automate
Unanswered

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

 

Categories:
I have the same question (0)
  • zollingerc Profile Picture
    36 on at

    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.

  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    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

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard