Small Tricks and Tips – PowerPlatform – PowerAutomate – related to SharePoint online Hyperlink field – resolving error – BadGatway / URL is not for this web

Hi All,
Greetings for the day!!!
Today new issue and solution.
Use Case / Background
- We have a Power Automate reading the items from the sharepoint list
- Our SharePoint Online list have a field of type – Hyperlink or Picture
- In Power Automate we are reading our list – “Newsletter”

- To render image field in outlook, we need to read the content of file
- To read content of file we are using action – “Get file content using path“

- We are using “Dynamic content” – “Image” field from previous action – “Get items” as shown in above figure
- While reading content of file using “Get file content using path” – we are getting an error – BadGateway
Error / Issue
BadGateway
{
“error”: {
“code”: 502,
“source”: “india-001.azure-apim.net”,
“clientRequestId”: “393c7c84-aeae-431d-8bd3-dcc6c70cb55a”,
“message”: “BadGateway”,
“innerError”: {
“status”: 500,
“message”: “URL is not for this web\r\nclientRequestId: 393c7c84-aeae-431d-8bd3-dcc6c70cb55a\r\nserviceRequestId: 393c7c84-aeae-431d-8bd3-dcc6c70cb55a”
}
}
}
.

Solution
- Issue is related with the way we are specifying the URL in image field

https://knowledgejunction1.sharepoint.com//:i:/s/Demo/EdXn4h3C9ntCmFU8l9I0Ow4B7ovKz4UNmDvxZOB9yC-x3g?e=79WivJ
- Actually we need to specify URL in following given format
https://knowledgejunction1.sharepoint.com/sites/Demo/SiteAssets/sharepoint.png

- If then we run Power Automate it ran successfully as

I hope this will save your time. Thanks for reading!!!
HAVE A FANTASTIC TIME AHEAD !!!
You must log in to post a comment.