Skip to main content

Notifications

Power Automate - General Discussion
Answered

Rss Feed to SPO News link with thumbnail

(0) ShareShare
ReportReport
Posted on by 9

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

TbVdl_0-1713967046045.png

Step to involving the Thumbnail 

 

TbVdl_1-1713967134861.png

 

TbVdl_2-1713967160317.png

 

TbVdl_3-1713967178286.png

And the step to post

 

TbVdl_5-1713967411330.png

 

Input of the last failed run 

{
    "host": {
        "connectionReferenceName": "shared_sharepointonline",
        "operationId": "HttpRequest"
    },
    "parameters": {
        "dataset": "https://m365x75926529.sharepoint.com",
        "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": []
            }
        }
    }
}
  • TbVdl Profile Picture
    TbVdl 9 on at
    Re: Rss Feed to SPO News link with thumbnail

    Many thanks this worked 😅

  • Verified answer
    Expiscornovus Profile Picture
    Expiscornovus 31,144 on at
    Re: Rss Feed to SPO News link with thumbnail

    Hi @TbVdl,

     

    In the screenshot of the Initialize variable action (BannerImageUrl) I can see you have added the expression as plain text. Can you add it as an expression via the fx button instead?

     

    Below is your screenshot where I spotted that.

     

    plaintext_expression.png

     

    An example where the fx button is located

     

    fxbutton.png

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard