{"id":1379,"date":"2018-03-07T19:57:51","date_gmt":"2018-03-07T19:57:51","guid":{"rendered":"https:\/\/officedevblogs.wpengine.com\/?p=1379"},"modified":"2018-03-07T19:57:51","modified_gmt":"2018-03-07T19:57:51","slug":"send-a-document-to-new-member-on-joining-group","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/send-a-document-to-new-member-on-joining-group\/","title":{"rendered":"Flow scenario #5: Send a document to new member on joining group"},"content":{"rendered":"<p>In a Managed Hub and Spoke group (Public Group) created for any event, it is a common requirement to send a message \/ document to the member who joins the group. I have picked up a case where a member joining the group would be sent a brochure (document) on joining the group. In order to achieve this in Flow, I would need to do the follow the below steps:<\/p>\n<ol>\n<li>Upload the document to Kaizala and get the Media Resource string<\/li>\n<li>Build a Flow to send the document to the subscriber joining the group<\/li>\n<\/ol>\n<h2>Upload document to Kaizala and get Media Resource string<\/h2>\n<p>We could avoid this step and directly upload the document \/ brochure in the same flow that would be sending the document. But I wanted to avoid uploading the same document to Kaizala each time a subscriber joins the group. This could be done by manually uploading the document to Kaizala using a REST client (like Postman) or a script using APIs. You could use the below API present in the Postman API collection for Kaizala\u00a0<em>(if you are new to Kaizala API, please refer\u00a0<a href=\"https:\/\/kaizala007.wordpress.com\/2017\/12\/30\/getting-started-with-kaizala-apis\/\">Getting started with Kaizala APIs<\/a>).<\/em><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1380\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/upload-document.png\" alt=\"Screenshot of upload media\" width=\"664\" height=\"256\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/upload-document.png 664w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/upload-document-300x116.png 300w\" sizes=\"(max-width: 664px) 100vw, 664px\" \/><\/p>\n<p>Once you choose the document and hit send, the API would return you a\u00a0<strong>mediaResource<\/strong>\u00a0string. Cache this string, we will be using it in the subsequent step.<\/p>\n<h2>Build a flow to send document to new subscriber<\/h2>\n<p>Now you could build a simple Flow to automate this scenario by going to\u00a0<a href=\"https:\/\/flow.microsoft.com\/\">https:\/\/flow.microsoft.com<\/a>. It would just have one trigger and one action:<\/p>\n<ol>\n<li>Trigger: When member is added to a group<\/li>\n<li>Action: Send action on a group<\/li>\n<\/ol>\n<h3>Add the trigger: When member is added to a group<\/h3>\n<p>You can browse for connectors and triggers, search for Kaizala to select the Kaizala connector. Subsequently, search for the trigger \u201cWhen member is added to a group\u201d and add it. Configure it by selecting the group you want to build this scenario on.<\/p>\n<p>Note: This group should be a Managed Hub &amp; Spoke group (or Public Group) as a regular group does not support targeted sending of content. Also, the person joining should be a subscriber.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1381\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/member-added-trigger.png\" alt=\"Screenshot of when a member is added to a group\" width=\"643\" height=\"145\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/member-added-trigger.png 643w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/member-added-trigger-300x68.png 300w\" sizes=\"(max-width: 643px) 100vw, 643px\" \/><\/p>\n<h3>Add action: Send action on a group<\/h3>\n<p>Click on add an action and search for \u201cSend action on a group\u201d. Configure the action by clicking on \u201cShow advanced options\u201d to reveal\u00a0<strong>Subscribers\u00a0<\/strong>field on the action.<\/p>\n<ul>\n<li>Click the\u00a0<strong>Subscribers<\/strong>\u00a0field and select the\u00a0<strong>Member Mobile Number\u00a0<\/strong>from the dynamic content popup\n<img decoding=\"async\" class=\"alignnone size-full wp-image-1382\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/dynamic-content.png\" alt=\"Screenshot of add dynamic content\" width=\"431\" height=\"588\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/dynamic-content.png 431w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/dynamic-content-220x300.png 220w\" sizes=\"(max-width: 431px) 100vw, 431px\" \/><\/li>\n<li>Select document from the\u00a0<strong>action<\/strong>\u00a0dropdown<\/li>\n<li>Select the\u00a0<strong>group<\/strong>\u00a0to which you want to send the document<\/li>\n<li>Add a\u00a0<strong>caption<\/strong>\u00a0for the document<\/li>\n<li>Paste the media resource string cached in the previous step into the\u00a0<strong>Media Resource<\/strong>\u00a0field<\/li>\n<\/ul>\n<p>The following screenshot demonstrates this:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1383\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/send-brochure.png\" alt=\"screenshot of send brochure\" width=\"642\" height=\"393\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/send-brochure.png 642w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/06\/send-brochure-300x184.png 300w\" sizes=\"(max-width: 642px) 100vw, 642px\" \/><\/p>\n<p>Click <strong>Update Flow<\/strong> to save the Flow.<\/p>\n<h2>Conclusion<\/h2>\n<p>This Flow would be triggered when a subscriber joins the group and would send the document targeted to the particular subscriber. The same could be replaced with sending an image \/ action.<\/p>\n<p>Hope this was helpful. Do let me know if you have any comments \/ questions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a Managed Hub and Spoke group (Public Group) created for any event, it is a common requirement to send a message \/ document to the member who joins the group. I have picked up a case where a member joining the group would be sent a brochure (document) on joining the group. <\/p>\n","protected":false},"author":69216,"featured_media":1382,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11],"tags":[87],"class_list":["post-1379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office-add-ins","tag-kaizala"],"acf":[],"blog_post_summary":"<p>In a Managed Hub and Spoke group (Public Group) created for any event, it is a common requirement to send a message \/ document to the member who joins the group. I have picked up a case where a member joining the group would be sent a brochure (document) on joining the group. <\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1379","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\/69216"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=1379"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1379\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/1382"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=1379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=1379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=1379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}