
Announcements
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:
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.
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.