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 / Adding attachment from...
Power Automate
Unanswered

Adding attachment from Form to Teams

(0) ShareShare
ReportReport
Posted on by 30

Hi All, 

 

I was wondering if someone might be able to help. I created a flow which, when a MS Form is submitted:

1. Sends an email notification to relevant people

2. Creates a message in the relevant channel in MS Teams

 

I use Dynamic content to include all the answers from the Form questions, which works well.

 

But one thing doesn't seem to work in very well, especially in Teams. One of the Form questions allows responders to upload a file. I can get that file to show in the email (although it doesn't looks pretty - name and clickable link of the file. Do you have any idea how to make it look better? - see the Upload maps row).

 

 

 

SandraA_0-1651458260527.png

 

 

But in the Teams notification it doesn't seem to work at all. All I get is this:

 

*****

Map uploads: [{"name":"QLD-Map_Sandra Adams 1.jpg","link":"https://eskmappingcomau705-my.sharepoint.com/personal/sandra_adams_eskmapping_com_au/Documents/Apps/Microsoft%20Forms/Drone%20Survey%20-%20Forestry/Question/QLD-Map_Sandra%20Adams%201.jpg","id":"01I7E6KRHO6QXMX7QVZZBIXM5Y2SFLFPAI","type":null,"size":46335,"referenceId":"01I7E6KRBFTNCIMO6TPBGJM5FHJAXZPEA4","driveId":"b!RWXiKKneQEypERhLd2k5B2NZqp_BW3hBv4HtXjpAoFPyNQZN7H78T6awQhQ78nDV","status":1,"uploadSessionUrl":null}]

 *****

 

Is there a way to attached the files from the Form into the Teams channel notification?

 

Many thanks,

Sandra

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @SandraA 

    When you upload a file when responding to a Forms form, the file is stored in the OneDrive storage area of the user who created the flow, where only this user has access (unless he/she shares it with other users). Therefore, the best idea should be to create a copy of the file to the Teams folder (something like this):

    forms-teams.png

     

    1) Get response details

    2) Parse the content of the file question (in this case, "Business justification"). The parse json schema would be:

    {
     "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"
     ]
     }
    }

    3) Then, you could select link property to get the url of the file, and name to get its name, and use those actions to get the content and copy it to the Sharepoint document library related to Teams. 

    Hope it helps!

    Ferran

  • SandraA Profile Picture
    30 on at

    Thank you for your reply. I passed this on to our Dev team and asked them for help, as it's way above my abilities 😊

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard