cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
heyvOOn
Helper I
Helper I

Post Adaptive Card to Teams when Sharepoint News is created/modified

Hello Everyone,

 

I've been trying to configure a Flow to post messages to Teams whenever a News post is created/update in Sharepoint. I've tried every possible combination and could not get it right. Does anyone have accomplished this? Any help would be great appreciated. 

I understand that all site news are under;

heyvOOn_0-1614096133144.png

So in theory, if I use;

heyvOOn_1-1614096195270.png

I could get the job done. Wrong! I can't get this to work;

heyvOOn_2-1614096344198.png

 

Thank you all in iadvance and stay safe 😉

1 ACCEPTED SOLUTION

Accepted Solutions
heyvOOn
Helper I
Helper I

Mission accomplished! 

The following flow will send an Adaptive Card to a Teams channel of your choice whenever a News is created/updated in your Sharepoint Site.

heyvOOn_0-1614588240898.png

 

Thank you @Expiscornovus  for you help on this one. 

 

I leave here a link to a video tutorial I've made on how to achieve this step-by-step.

https://youtu.be/sHUPqGDKqpk

View solution in original post

7 REPLIES 7
Expiscornovus
Super User II
Super User II

Hi @heyvOOn,

 

I would use the Get file properties action instead of the Get Files (properties only) action.

 

Use the GUID of the site pages library as a custom value in the Library Name. And use the following expression to retrieve the id from the x-ms-file-etag field from the trigger action.

replace(split(triggerOutputs()?['headers/x-ms-file-etag'], ',')?[1], '"', '')

 

getfilesitepage.png

heyvOOn
Helper I
Helper I

Hi @Expiscornovus 

 

Thank you for your help. Your Function seem to helped me pass the error. But now I can't seem to get the GUID from the library below? 

heyvOOn_0-1614168144134.png

 

Expiscornovus
Super User II
Super User II

Hi @heyvOOn,

 

You should be able to find that GUID on the library settings page.

 

1. Go to the Site Page Library. Click on Library settings in the settings menu.

 

sitepages_librarysettings.png

 

2. Spot the ID in the address bar after List= between the curly brackets.

 

listid_sitepages.png

heyvOOn
Helper I
Helper I

I found the GUID and put there where you said but it doesn't work. 

heyvOOn_0-1614181694060.png

 

heyvOOn
Helper I
Helper I

Hi @Expiscornovus

 

Seem like I got it to work with the library name instead of the GUID but I still have an issue. 

The Adaptive Card it's sending to Teams is not the one that I've I changed. When I change a page. The flow detects the change in the folder but it sends an Adaptive Card to Teams with a random page, not the one I've updated.

heyvOOn_0-1614183334733.png

 

 

heyvOOn
Helper I
Helper I

Mission accomplished! 

The following flow will send an Adaptive Card to a Teams channel of your choice whenever a News is created/updated in your Sharepoint Site.

heyvOOn_0-1614588240898.png

 

Thank you @Expiscornovus  for you help on this one. 

 

I leave here a link to a video tutorial I've made on how to achieve this step-by-step.

https://youtu.be/sHUPqGDKqpk

View solution in original post

Expiscornovus
Super User II
Super User II

@heyvOOn, great to hear you got it working 🙂

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (1,132)