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

When image added to sharepoint folder post it to specific channel in microsoft teams

i am trying to create a flow that When image added to SharePoint folder a new post added to a specific channel in Microsoft teams with image attached not only a link but the problem is that the image sometimes appear and sometimes appear like the following image

and if i open the link the image appears normally

4 REPLIES 4
Frequent Visitor

1.png2.png3.png

Community Support
Community Support

Hi @drweby2,

 

I have made a test on my side and the flow works well. Please take a try with the following workaround:

To determine whether the file type created in SharePoint is an image, I found that the name extension of some images is uppercase such as .PNG, so I expanded the condition, as below:

@or(contains(triggerBody()?['{FilenameWithExtension}'], '.jpg'),contains(triggerBody()?['{FilenameWithExtension}'], '.png'),contains(triggerBody()?['{FilenameWithExtension}'], '.JPG'),contains(triggerBody()?['{FilenameWithExtension}'], '.PNG'))

Then insert the url of the image in Post Message, as below:

 

<img alt="Embedded Image" src="URL OF THE IMAGE FILE/ATTACHMENT" />

 

Image reference:

5.PNG

It works, as below:

6.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Administrator
Administrator

Hello, @drweby2!

Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-bacao-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

Thank you for being an active member of the Flow Community!

-Gabriel
Flow Community Manager

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager
Power Platform Communities

I try it, it fixes part of the problem in Microsoft teams web version and all the images now appear but the images still not appear in mobile or desktop app

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (7,749)