Hi everyone,
I'm starting a project to publish SharePoint News link to our intranet based on a RSS feed.
On the V1 I have no issue gathering the RSS feed information and posting a SPO News link, but now with the V2 I'm stuck getting and publishing the thumbnail.
I'm using a corrected version of what you can find here : https://pnp.github.io/blog/post/use-power-automate-to-automatically-create-sharepoint-news-links/ I just skipped the encoding and %27 wrapping step as recommended.
Unfortunately I got a BadGateway error the last step to post the News Link.
Can you help me solve this ?
Overview of the flow

Step to involving the Thumbnail



And the step to post

Input of the last failed run
{
"host": {
"connectionReferenceName": "shared_sharepointonline",
"operationId": "HttpRequest"
},
"parameters": {
"parameters/method": "POST",
"parameters/uri": "_api/sitepages/pages/reposts",
"parameters/headers": {
"accept": "application/json",
"content-type": "application/json;odata=verbose;charset=utf-8"
},
"parameters/body": {
"BannerImageUrl": "outputs('GetThumbnail')?['body']?['d']?['ThumbnailUrl']",
"Description": "The manufacturer has had to slow production of its popular 737 Max planes after a hole blew open on a jet during an Alaska Airlines flight in January.",
"IsBannerImageUrlExternal": true,
"ShouldSaveAsDraft": false,
"Title": "Boeing Loses $355 Million in Latest Quarter",
"__metadata": {
"type": "SP.Publishing.RepostPage"
}
}
}
}
Output of the last failed run
{
"statusCode": 502,
"headers": {
"Cache-Control": "no-store, no-cache",
"Pragma": "no-cache",
"Set-Cookie": "ARRAffinity=40237ffdc57de1390eeff374e782e979bae0af189a51754a0bc4cff0e861cdf3;Path=/;HttpOnly;Secure;Domain=sharepointonline-scus.azconn-scus-001.p.azurewebsites.net,ARRAffinitySameSite=40237ffdc57de1390eeff374e782e979bae0af189a51754a0bc4cff0e861cdf3;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-scus.azconn-scus-001.p.azurewebsites.net",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-datasourceerror": "True",
"x-ms-request-id": "ce2722a1-005f-5000-4719-7ce95137d584",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"x-ms-apihub-obo": "false",
"Date": "Wed, 24 Apr 2024 13:33:52 GMT",
"Content-Length": "708",
"Content-Type": "application/json",
"Expires": "-1"
},
"body": {
"error": {
"code": 502,
"source": "flow-apim-unitedstates-002-westus-01.azure-apim.net",
"clientRequestId": "3e8eba48-72a4-465c-a644-c2dab27563ab",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "{\"odata.error\":{\"code\":\"-2146232832, Microsoft.SharePoint.SPFieldValidationException\",\"message\":{\"lang\":\"en-US\",\"value\":\"Invalid URL: outputs('GetThumbnail')?['body']?['d']?['ThumbnailUrl'].\"}}}\r\nclientRequestId: 3e8eba48-72a4-465c-a644-c2dab27563ab\r\nserviceRequestId: ce2722a1-005f-5000-4719-7ce95137d584",
"errors": []
}
}
}
}