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

8 REPLIES 8
Expiscornovus
Dual Super User
Dual Super User

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
Dual Super User
Dual Super User

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

Expiscornovus
Dual Super User
Dual Super User

@heyvOOn, great to hear you got it working 🙂

Hi heyvOOn,

 

would it be possible to copy and paste here the json you used for the card?  I would be very grateful if I could you the same design. 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,329)