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 / How to format URL link...
Power Automate
Answered

How to format URL link for Teams incoming webhook?

(0) ShareShare
ReportReport
Posted on by

Hello Everyone.

 

I have a PAD flow that takes website screenshots and saves them to a OneDrive location which is located on the C drive of the machine running PAD.

 

I want to then share these images to a Teams channel using a Teams incoming webhook.

 

I think I have the JSON correct, it's just that when I add the image URL PAD fails and says that the incoming webhook has a bad payload.  If I remove the image URL then no errors are reported.

 

The JSON looks like this:

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Container",
            "items": [
                {
                    "type": "TextBlock",
                    "text": "My Order Bot",
                    "wrap": true
                },
                {
                    "type": "Image",
                    "url": "\"image link goes here\""
                }
            ]
        }
    ],
    "version": "1.2"
}

 

Each image is hosted online on OneDrive for Business and the URL looks like this:

https://MYCOMPANY-my.sharepoint.com/personal/myname_mysurname_mycompany_co_uk/Documents/My%20Image%20Folder/Image1%20PAD%20Flow/Images/CDSOHIMAGE.jpg

In all the examples on how to do this, none of the URLs contain special characters like an underscore, just a direct link (e.g. https://myimagesharing.com/myimage1.jpg).

 

How can I get the correct URL format that gives a direct link to the image if they are stored on OneDrive and the URL contains special characters?

If not, how can PAD upload those images to a SharePoint location that I specify, and I then get the direct image link to that?

Hope this makes sense.

 

Regards.

I have the same question (0)
  • Verified answer
    CU-19081228-9 Profile Picture
    on at

    For anyone struggling with this, I gave up with the webhook.

     

    Instead, I used a cloud flow that listened for the image files to be modified and then posted a separate message to the same Teams channel.

    The flow format is:

    1 - OneDrive for Business (when file is modified) - point to the folder with the image.
    2 - OneDrive for Business (get image thumbnail) - point to the image inside the folder.

    3 - Post message with image thumbnail in Teams, this needs the HTML below:

    <img src="dynamic content link to thumbnail URL" width = "xx" height = "xx">

    Hope this helps others.

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard