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

When a new channel message is added - attachments

Hi guys,

TRIGGER: When a new channel message is added

 

I am trying to create a flow that takes the attachments, in my case images and loads them as attachments to a share point list item. Sharepoint add attachment requires a file name which I can generate but I am struggling with the File Content.

 

I am just looking for help with the manipulation of the object contained in the array so that I can strip out the correct data to create that attachment.

 

Has anyone done this yet?

 

Thanks

 

Below is the input as shown in the compose action, there were 2 images added in the conversation and some text "Plot 001"

 

<div>
<div>
Plot 001
<br>

<img alt="Captured photo" src="https://graph.microsoft.com/beta/teams/752a5e26-32ee-4479-bda7-b913a960bf45/channels/19:48ead667b1c1..." width="1512" height="2687">
<img alt="Captured photo" src="https://graph.microsoft.com/beta/teams/752a5e26-32ee-4479-bda7-b913a960bf45/channels/19:48ead667b1c1..." width="1512" height="2687">
</div>
</div>

 

   

2 REPLIES 2
Gareth1
Resolver IV
Resolver IV

Hi @Malcyt 

 

One way of doing this could be using the Parse JSON action on the Message Attachments value from the Teams Message, this would then allow you to use the Get File Content using Path action for Sharepoint.

 

Screen Shot 2020-01-30 at 6.42.00 pm.png

Malcyt
Frequent Visitor

Thanks Gareth,

 

I should have been more specific I am using teams on a mobile device and capturing photos using the camera. It seems that attachments via the paperclip are treated differently from photos captured via the camera icon. The paperclip ends up with a copy of the file being uploaded to files are in the SP Team....... Images captured via the phone don't seem to be anywhere other that viable withing the teams channel.

 

They must be stored somewhere but can't see them 🙂

 

So I think you solution will work for those attached and therefore resident in SP but not for Camera captured images.

 

Regards

Malcolm

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,986)