{"id":3782,"date":"2019-12-04T13:01:21","date_gmt":"2019-12-04T20:01:21","guid":{"rendered":"https:\/\/developer.microsoft.com\/en-us\/office\/blogs\/?p=3782"},"modified":"2019-12-04T13:01:21","modified_gmt":"2019-12-04T20:01:21","slug":"how-to-empower-your-microsoft-365-team-with-a-microsoft-graph-and-ifttt-integration","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/how-to-empower-your-microsoft-365-team-with-a-microsoft-graph-and-ifttt-integration\/","title":{"rendered":"How to empower your Microsoft 365 team with a Microsoft Graph and IFTTT integration!"},"content":{"rendered":"<p>We are excited to give you the opportunity to utilize If This Then That (IFTTT) to create and run recipes with Microsoft Teams, Calendar, Contacts, and OneNote services. Exciting stuff!<\/p>\n<h3 class=\"wp-block-heading\">What is IFTTT?<\/h3>\n<p><a href=\"https:\/\/ifttt.com\/\">IF-This-Then-That<\/a> is the free\nway to do more with hundreds of the apps and devices you love, including\nTwitter, Dropbox, Evernote, Nest, Fitbit, [and more]&nbsp; &#8212; IFTTT site<\/p>\n<p>These items, called Services, are chained together very\neasily on IFTTT to create sometimes complex conditional chains, called Applets.<\/p>\n<p>An Applet connects two or more apps or devices together. It\nenables you to do something that those apps or devices couldn&#8217;t do on their\nown. IFTTT enables your business to create the connected experiences customers\nwant, at a fraction of the cost. &#8212; IFTTT site<\/p>\n<p>An applet is triggered by new items, events, or changes to\nexisting items within the &#8220;This&#8221; part of the services.&nbsp; &#8220;Then&#8221;, the <em>action<\/em> on the\nservice attached as the &#8220;That&#8221; part of the applet is fired. Rephrased,\n<em>if<\/em> this service&#8217;s <em>trigger<\/em> is fired, execute the <em>action<\/em> on\nthis other service; this is a common model of IFTTT Applets.<\/p>\n<h3 class=\"has-very-dark-gray-color has-text-color wp-block-heading\">A Microsoft Graph Service for IFTT<\/h3>\n<p> To give developers a starting point, and to show how easy it is to add Graph data to your node projects, we have posted an Open Source sample on GitHub as a demonstration of what a <a href=\"https:\/\/developer.microsoft.com\/graph\">Microsoft Graph<\/a> service on <a href=\"https:\/\/ifttt.com\/\">IFTTT<\/a> could look like. It is a sample service for IFTTT that consists of a pre-built node.js service that is ready to integrate with the IFTTT platform. It supports several IFTTT Actions and Triggers focused around integration with the Microsoft Teams, OneNote, Calendar, and other elements of M365 products. This is an opportunity for you to explore integrations using Microsoft Graph and by leverage the IFTTT platform. This solution utilizes the rich set of data provide by Graph platforms like Teams, OneNote, Calendar, User data, and all the analytics available in typical M365 organizations.<\/p>\n<\/p>\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2019\/12\/Microsoft-Graph-empowered-IFTTT-Applets-image-1024x640.png\" alt=\"Microsoft Graph empowered IFTTT Applets!\u201d\" class=\"wp-image-3784\" width=\"768\" height=\"480\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2019\/12\/Microsoft-Graph-empowered-IFTTT-Applets-image-1024x640.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2019\/12\/Microsoft-Graph-empowered-IFTTT-Applets-image-300x188.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2019\/12\/Microsoft-Graph-empowered-IFTTT-Applets-image-768x480.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2019\/12\/Microsoft-Graph-empowered-IFTTT-Applets-image-1536x960.png 1536w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2019\/12\/Microsoft-Graph-empowered-IFTTT-Applets-image.png 1920w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<p>To learn more about what the service can do, follow the <a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-ifttt-sample\/blob\/master\/docs\/project-setup.md\">project\nsetup instructions<\/a> to try the service out for yourself!<\/p>\n<p>If you plan on implementing your own triggers and actions with\nthis code, here&#8217;s some interesting tidbits that may make this much easier.<\/p>\n<p>We have provided some simple base classes\nthat will automatically format the responses to IFTTT in a way that meets their\nrequirements. These classes are the <a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-ifttt-sample\/blob\/master\/src\/models\/trigger-response-model.ts\">trigger\nresponse class<\/a> and the <a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-ifttt-sample\/blob\/master\/src\/models\/options-response-model.ts\">options\nresponse class<\/a>. They will format the JSON payload back to IFTTT correctly with\nlittle effort on your part.<\/p>\n<p>We have provided a <a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-ifttt-sample\/blob\/master\/src\/helpers\/graph-client.ts\">Graph\nClient class<\/a> that allows you to use the official Graph SDK in your classes.\nThis takes the incoming auth key from IFTTT and creates a custom provider for the\nGraph Client to use.<\/p>\n<p>There is also some <a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-ifttt-sample\/blob\/master\/src\/helpers\/middleware.ts\">middleware<\/a>\nfor use in the responses to IFTTT that will ease the work of checking things like\nService Key and Auth Key validation.<\/p>\n<p> If you would like to play with the code yourself, you can find it <a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-ifttt-sample\">here<\/a>. We hope that you find the code useful, should you be interested in developing Graph integrations of your own into IFTTT!<\/p>\n<\/p>\n<p>Happy coding,<\/p>\n<p>Herrick Spencer, Shane Weaver, and Gary Hsu<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to utilize If This Then That (IFTTT) to create and run recipes with Microsoft Teams, Calendar, Contacts, and OneNote services<\/p>\n","protected":false},"author":69076,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3,128,11],"tags":[71,12],"class_list":["post-3782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","category-microsoft-teams","category-office-add-ins","tag-onenote","tag-outlook"],"acf":[],"blog_post_summary":"<p>Learn how to utilize If This Then That (IFTTT) to create and run recipes with Microsoft Teams, Calendar, Contacts, and OneNote services<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/3782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69076"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=3782"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/3782\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=3782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=3782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=3782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}