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

Power Automate - action "Get file content using path" - error while reading image field from SharePoint online list - BadGateWay
Power Automate - action "Get file content using path" - error while reading image field from SharePoint online list - BadGateWay

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
fig : SharePoint online list - Newsletter
fig : SharePoint online list – Newsletter
  • Our SharePoint Online list have a field of type – Hyperlink or Picture
fig : SharePoint Online - List having field of type - Hyperlink or Picture
fig : SharePoint Online – List having field of type – Hyperlink or Picture
  • In Power Automate we are reading our list – “Newsletter”
fig : Power Automate - action "Get items" - reading items from "Newsletter" list
fig : Power Automate – action “Get items” – reading items from “Newsletter” list
  • 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
fig : Power Automate - reading image content - using action - "Get file content using path"
fig : Power Automate – reading image content – 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”
    }
  }
}

.

fig : Power Automate - action "Get file content using path" - error while reading image field from SharePoint online list - BadGateWay
fig : Power Automate – action “Get file content using path” – error while reading image field from SharePoint online list – BadGateWay

Solution

  • Issue is related with the way we are specifying the URL in image field
fig : SharePoint Online - URL specified in Image column of type - HyperLink or Picture
fig : SharePoint Online – URL specified in Image column of type – HyperLink or Picture
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

fig : SharePoint Online - specifying correct image path in Image field
fig : SharePoint Online – specifying correct image path in Image field
  • If then we run Power Automate it ran successfully as
fig : Power Automate - ran successfully when we specify the correct URL in image field of SharePoint online list
fig : Power Automate – ran successfully when we specify the correct URL in image field of SharePoint online list

I hope this will save your time. Thanks for reading!!!

HAVE A FANTASTIC TIME AHEAD !!!

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: