Jump to content

Publishing Seeq Notifications to Microsoft Teams with Webhooks


Tatum OKennedy

Recommended Posts

  • Seeq Team

Update July 2024 - Microsoft has announced the retirement of O365 connectors.  We are evaluating alternative approaches using Power Automate.  https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/

-----

In this video you will learn how to publish Seeq notifications to Microsoft Teams using Webhooks. For this example, we will summarize all the high temperature events from several assets we are monitoring using an asset tree.  We will send summary of these events to Microsoft Teams on a regular basis.

 

Edited by Patrick
Webhooks retirement by MS
Link to comment
Share on other sites

  • 3 months later...

Hello Tatum,

Can this webhook work without an asset framework structure?, I just want to use it as a way to communicate when a variable is out of range or specs.

Thanks for your comments.

 

Regards

 

Link to comment
Share on other sites

  • Seeq Team

Hi Ricardo - An Asset Structure is not required.  You can modify the script to look for specific conditions instead.  See this post for a copy of the existing script:

You would need to modify the search to find specific conditions rather than searching for conditions in an Asset Tree Path - see code comments:

try:
    monitoring_conditions=pd.read_pickle(pkl_file_name)

except:
    monitoring_conditions=spy.search({'Name':monitoring_condition,
                                      'Type':'Condition',
                                      'Path':asset_tree}, #Remove Path to search for non-Asset associated conditions
                                     workbook=workbook_id,quiet=True)
    monitoring_conditions.to_pickle(pkl_file_name)
#Pull capsules present during the specified time range
events=spy.pull(monitoring_conditions,start=start,end=end,group_by=['Asset'],header='Asset',quiet=True) #Remove group_by if not associated with an Asset
number_of_events=len(events)
events

Please note, starting in R64, Seeq has the ability to trigger Webhooks as part of the built-in Notifications.  I plan to post a how-to about this functionality this month.  It will negate the need to search for new capsules via a scheduled Seeq DataLab notebook, so stay tuned!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...