cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
drweby2
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
drweby2
Frequent Visitor

1.png2.png3.png

v-bacao-msft
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.
GabrielStJohn
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



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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (47,381)