Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Send news from sharepoint to a channel in teams

(0) ShareShare
ReportReport
Posted on by

Hey,
we are using Sharepoint as an internal webpage for our company. Where you can find informations and specifical documents.

Now i need your help to implement a Flow:
i want to create a automacial flow for the follwing situation.

"News" got released in a specific public room --> this "news" (like - "Be prepared tomorrow is an update of a company-application") should automaticly send to a channel in TEAMS (channels name is like "support").

So the workers have to ways to get the informations:
1.) looking in sharepoint for the "news"
2.) looking/getting an information in there TEAMS

Thanks for help

  • pax1 Profile Picture
    4 on at
    Re: Send news from sharepoint to a channel in teams

    I now also created another flow which follows exactly your instructions (I only left out the Compose First Published and Contact parts) but when I click on Post to Teams, it opens a pane on the right side where it displays an ever turning loading circle and nothing happens. sorry for this one I found my typo error

  • pax1 Profile Picture
    4 on at
    Re: Send news from sharepoint to a channel in teams

    I have a problem with the automatic trigger:
    I implemented the flow using both @RobElliott as well as @Anonymous solution. I used @Anonymous's trigger "when a file is created in a folder" instead of @RobElliott's Post to Teams button. It works seamlessly when I test the flow, but when I close the flow and post a new post or page, it doesn't trigger the flow. When I open the flow and re-save it, it starts posting the posts/pages it didn't process before, but when I don't click on it, it ignores that I have created new items. However, in the Flow overview, it says "Your flow is ready to go. It's turned on and will trigger when you add a file to the SharePoint folder you selected."
    Any idea?

  • Community Power Platform Member Profile Picture
    on at
    Re: Send news from sharepoint to a channel in teams

    After search all over for this solution and without success. I was able to achieve this and I leave a link to a video tutorial I've made on how to achieve this step-by-step in a very quick way;

     

    Microsoft Sharepoint News to Teams Channel as Adaptive Card with Power Automate Flow

    https://youtu.be/sHUPqGDKqpk

  • dangermousie Profile Picture
    8 on at
    Re: Send news from sharepoint to a channel in teams

    Hi! As 14 months has passed, is there an easier way of doing this? I have one site with 10 channels. Not all news posts are relevant to the to every channel. I'd like to automate the channel post upon creation of a news post with a set page property - a new column named "Product". It looks like the solution in this post would only work for one channel. I'd love to hear any ideas! I'd have thought this is a standard feature by now.

  • Verified answer
    RobElliott Profile Picture
    10,118 Super User 2025 Season 1 on at
    Re: Send news from sharepoint to a channel in teams

    Hi @Anonymous we are doing the same thing to send news published on various SharePoint asites in our hub to the relevant Teams channel with a nice adaptive card. @MattWeston365 may have a better method but what I do is shown below.

    First of all you need to have a single line of text column inn your Site Pages  library where the news items are:
    0-list-with-button.jpg

     Then you format the column using JSON code:

    1-format-column.jpg

    You need to format the column making sure that the id at the bottom of your JSON code has the ID of your flow.  

     

    {
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "button",
    "txtContent": "Publish to Teams",
    "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\": \"021ec4e0-8f85-46b3-a557-a4456960a4eb\"}"
    }
    }

    Your flow needs to have a SharePoint For a selected file trigger. We then add the FileID into a Compose action and use the output of that in a Get file properties action. 

    2-flow-trigger-compose-getfileproperties.jpg

    I want the date shown on the adaptive card in Teams in UK format so to ensure this happens I've added another Compose control with a formatDateTime expression. I also want the author of the news item (added below the title of the news item in the SharePoint page) so I've added another Compose control and selected Author Byline from the dynamic content which gets wrapped in an Apply to each control.

    3-composePublished-applyAuthor-composeContact.jpg

     The more complex part of the flow is now to add JSON code for the adaptive card into a Teams Post your own adaptive card as the Flow bot to a channel action. You can try out JSON code at https://adaptivecards.io/ where there are samples that you can use as the basis of your code. But I ended up getting most of JSON code below from a really good blog post by Laura Rogers at https://wonderlaura.com/2019/04/10/sharepoint-news-notifications-in-teams/ 

    4-post-adaptive-card.jpg

     As you can see from the screenshot you can also add in dynamic content which I've done to get the Title, description (i.e the text content of the story), the published date and a link to the full story back on our SharePoint site. The JSON code in mine is:
    {
    "type": "AdaptiveCard",
    "body": [
    {
    "type": "ColumnSet",
    "columns": [
    {
    "type": "Column",
    "items": [
    {
    "type": "TextBlock",
    "text": "Infrastructure Consultancy News on the REI Hub",
    "wrap": true
    },
    {
    "type": "TextBlock",
    "spacing": "None",
    "size": "Large",
    "weight": "Bolder",
    "text": "@{body('Get_file_properties')?['Title']}"
    },
    {
    "type": "TextBlock",
    "spacing": "None",
    "text": "@{outputs('Compose_First_Published')} - @{outputs('Compose_Contact')}",
    "isSubtle": true
    },
    {
    "type": "TextBlock",
    "size": "Small",
    "text": "@{body('Get_file_properties')?['Description']}",
    "wrap": true
    },
    {
    "type": "Image",
    "url": "@{body('Get_file_properties')?['BannerImageUrl']}"
    }
    ],
    "width": 2
    }
    ]
    }
    ],
    "actions": [
    {
    "type": "Action.OpenUrl",
    "title": "Go to news article",
    "url": "@{body('Get_file_properties')?['{Link}']}"
    }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
    }

    So when you press the button in the Site Pages library, the flow starts and I think the result in the Teams channel looks really good: 

    5-result-Teams.jpg

     

    I'm no JSON expert by a long way but a couple of hours of trial and error on the site I linked to above eventually got this result which we're now rolling out across all the sites and Teams in our hub.

    I hope it helps but come back with any questions.

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • MattWeston365 Profile Picture
    1,701 on at
    Re: Send news from sharepoint to a channel in teams

    Hi @Anonymous is the news being created on the SharePoint site which is associated with the team? If it is then you can do this without the need for Power Automate as you can use the SharePoint connector in Teams. If it's elsewhere then please let me know and I'll happily aid you in putting the automation together.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow