web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Teams Channel Posts to...
Power Automate
Answered

Teams Channel Posts to SharePoint News Web-Part

(1) ShareShare
ReportReport
Posted on by 13
Hi everyone, I am trying to make a flow that allows my team channel posts along with any attachments to be posted directly to the SharePoint News Web-part on my site. I have been trying to find resources on how to proceed with HTTP Requests to SharePoint but have not been able to find success. If anyone could help me with what sort of URI, headers, and Body I should be using in the http requests as well as the structure of the HTTP Requests, or if there is a better way than to use the SharePoint Rest API, it would be greatly appreciated.
Categories:
I have the same question (3)
  • Verified answer
    Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at
     
    You can use the create a new page method in the Graph API for this. In this case you want to use the promotionKind newsPost.
     
    Below is an example, if that helps?
     
    1. I reused the sample payload from the documentation and added the promotionkind property. And the innerHtml uses the body/body/plainTextContent of the Get message details action.
     
    {
      "@odata.type": "#microsoft.graph.sitePage",
      "name": "testingnewspost@{variables('Rand')}.aspx",
      "title": "testing news post @{variables('Rand')}",
      "pageLayout": "article",
      "promotionKind": "newsPost",
      "showComments": true,
      "showRecommendedPages": false,
      "titleArea": {
        "enableGradientEffect": true,
        "imageWebUrl": "https://cdn.hubblecontent.osi.office.net/m365content/publish/005292d6-9dcc-4fc5-b50b-b2d0383a411b/image.jpg",
        "layout": "colorBlock",
        "showAuthor": true,
        "showPublishedDate": false,
        "showTextBlockAboveTitle": false,
        "textAboveTitle": "TEXT ABOVE TITLE",
        "textAlignment": "left",
        "imageSourceType": 2,
        "title": "sample1"
      },
      "canvasLayout": {
        "horizontalSections": [
          {
            "layout": "oneThirdRightColumn",
            "id": "1",
            "emphasis": "none",
            "columns": [
              {
                "id": "1",
                "width": 8,
                "webparts": [
                  {
                    "id": "6f9230af-2a98-4952-b205-9ede4f9ef548",
                    "innerHtml": "<p><b>@{outputs('Get_message_details')?['body/body/plainTextContent']}</b></p>"
                  }
                ]
              },
              {
                "id": "2",
                "width": 4,
                "webparts": [
                  {
                    "id": "73d07dde-3474-4545-badb-f28ba239e0e1",
                    "webPartType": "d1d91016-032f-456d-98a4-721247c305e8",
                    "data": {
                      "dataVersion": "1.9",
                      "description": "Show an image on your page",
                      "title": "Image",
                      "properties": {
                        "imageSourceType": 2,
                        "altText": "",
                        "overlayText": "",
                        "siteid": "0264cabe-6b92-450a-b162-b0c3d54fe5e8",
                        "webid": "f3989670-cd37-4514-8ccb-0f7c2cbe5314",
                        "listid": "bdb41041-eb06-474e-ac29-87093386bb14",
                        "uniqueid": "d9f94b40-78ba-48d0-a39f-3cb23c2fe7eb",
                        "imgWidth": 4288,
                        "imgHeight": 2848,
                        "fixAspectRatio": false,
                        "captionText": "",
                        "alignment": "Center"
                      },
                      "serverProcessedContent": {
                        "imageSources": [
                          {
                            "key": "imageSource",
                            "value": "/_LAYOUTS/IMAGES/VISUALTEMPLATEIMAGE1.JPG"
                          }
                        ],
                        "customMetadata": [
                          {
                            "key": "imageSource",
                            "value": {
                              "siteid": "0264cabe-6b92-450a-b162-b0c3d54fe5e8",
                              "webid": "f3989670-cd37-4514-8ccb-0f7c2cbe5314",
                              "listid": "bdb41041-eb06-474e-ac29-87093386bb14",
                              "uniqueid": "d9f94b40-78ba-48d0-a39f-3cb23c2fe7eb",
                              "width": "4288",
                              "height": "2848"
                            }
                          }
                        ]
                      }
                    }
                  }
                ]
              }
            ]
          }
        ]
      }
    }



    2. Testing a channel post


    3. The newly created (draft) news post


     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard