{"id":1416,"date":"2018-01-18T20:54:41","date_gmt":"2018-01-18T20:54:41","guid":{"rendered":"https:\/\/officedevblogs.wpengine.com\/?p=1416"},"modified":"2018-01-18T20:54:41","modified_gmt":"2018-01-18T20:54:41","slug":"flow-scenario-2-get-response-from-custom-kaizala-forms","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/flow-scenario-2-get-response-from-custom-kaizala-forms\/","title":{"rendered":"Flow scenario #2: Get response from custom Kaizala forms"},"content":{"rendered":"<p>When you need folks to respond on demand, you could use a Kaizala Form. You could design a form from the group up using HTML \/ JS and KASClient SDK [<em>documented\u00a0<a href=\"https:\/\/github.com\/Microsoft\/kaizala-docs-preview\/blob\/master\/kaizala\/platform\/v1\/docs\/actions\/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a><\/em>] or you could design a form from the\u00a0<a href=\"https:\/\/manage.kaiza.la\/\">Kaizala Management Portal<\/a>\u00a0[<em>demonstrated in this post<\/em>].<\/p>\n<p>For the demo, I am picking a scenario where user in the group could\u00a0<strong>Report a Lost Item<\/strong>\u00a0using a custom form and send out an email notification whenever a response is submitted.<\/p>\n<p>Though in this example, we would be emailing the response, you could use Flow connectors to store responses in a data base, add an item on a SharePoint list, etc. You get the idea. I will write another post to extend the flow built here to store responses in Excel sheet.<\/p>\n<p>Broadly, I would divide this task in two parts:<\/p>\n<ul>\n<li><strong>Part A:<\/strong>\u00a0Design a custom form on Kaizala Management Portal and assign it to a group<\/li>\n<li><strong>Part B:<\/strong>\u00a0Design a flow to send an email<\/li>\n<\/ul>\n<h2 id=\"PartA\">Part A: Design a custom form on Kaizala Management Portal<\/h2>\n<p>In Part A, I would be creating a custom form and associating it with a Kaizala group. The form would I will create a simple form to report a lost item which will have two fields:<\/p>\n<ul>\n<li>Text field to capture the lost item<\/li>\n<li>Date field to capture the date when item was lost<\/li>\n<\/ul>\n<p>Steps:<\/p>\n<ol>\n<li>Navigate to\u00a0<a href=\"https:\/\/manage.kaiza.la\/\">https:\/\/manage.kaiza.la<\/a><\/li>\n<li>If you are not already logged in, hit\u00a0<strong>SIGN IN\u00a0<\/strong>button\u00a0and log in<\/li>\n<li>Click on the\u00a0<strong>New Kaizala Action<\/strong>\u00a0button and choose\u00a0<strong>Create action<\/strong><\/li>\n<li>Customize the card\n<ol>\n<li>Select an icon for the card<\/li>\n<li>Enter the title and description<\/li>\n<li>Enter the questions \/ fields for the form<\/li>\n<li>Customize the strings (if required)<\/li>\n<li>Hit\u00a0<strong>Submit\u00a0<\/strong>button<\/li>\n<\/ol>\n<\/li>\n<li>You will be taken to the page of the newly created action that will have its details<\/li>\n<\/ol>\n<h4>Creating the custom form<\/h4>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-121\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-custom-action-1.gif?w=1100\" alt=\"Create custom action - 1\" data-attachment-id=\"121\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/create-custom-action-1\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-custom-action-1.gif?w=1100\" data-orig-size=\"568,484\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Create custom action \u2013 1\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-custom-action-1.gif?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-custom-action-1.gif?w=1100?w=568\" \/><\/p>\n<h4>Adding questions to the form<\/h4>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-122\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-custom-action-2.gif?w=1100\" alt=\"Create custom action - 2\" data-attachment-id=\"122\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/create-custom-action-2\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-custom-action-2.gif?w=1100\" data-orig-size=\"586,494\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Create custom action \u2013 2\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-custom-action-2.gif?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-custom-action-2.gif?w=1100?w=586\" \/><\/p>\n<h4>Modify strings<\/h4>\n<p>You could customize the strings by hitting the\u00a0<strong>Modify Strings\u00a0<\/strong>button<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-123\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/modify-strings.png?w=1100\" alt=\"modify strings\" data-attachment-id=\"123\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/modify-strings\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/modify-strings.png?w=1100\" data-orig-size=\"525,383\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"modify strings\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/modify-strings.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/modify-strings.png?w=1100?w=525\" \/><\/p>\n<h4>Custom form created<\/h4>\n<p>Once the custom form is created you will be taken to the page like below. Note the action package id, we will be using it to subscribe to this form \/ action\u2019s responses.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-125\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/action-package-details.png?w=1100\" alt=\"action package details\" data-attachment-id=\"125\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/action-package-details\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/action-package-details.png?w=1100\" data-orig-size=\"746,215\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"action package details\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/action-package-details.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/action-package-details.png?w=1100?w=746\" \/><\/p>\n<h4>Map the action to a group<\/h4>\n<p>Navigate to the group where you want this action to be present and click on the\u00a0<strong>ACTIONS<\/strong>\u00a0tab. Click on\u00a0<strong>Add\u00a0<\/strong>to add the action and subsequently click on the link\u00a0<strong>here<\/strong>\u00a0to configure showing action on the palette for the group.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-140\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/action-package-mapping.png?w=1100\" alt=\"action package mapping\" data-attachment-id=\"140\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/action-package-mapping\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/action-package-mapping.png?w=1100\" data-orig-size=\"777,222\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"action package mapping\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/action-package-mapping.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/action-package-mapping.png?w=1100?w=777\" \/><\/p>\n<p>Add action to the group by searching for the action, select it and click\u00a0<strong>Publish<\/strong>\u00a0button. Make sure you want to give permissions to Members \/ Admins (selected both here).<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-139\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/add-action-to-group.png?w=1100\" alt=\"add action to group\" data-attachment-id=\"139\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/add-action-to-group\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/add-action-to-group.png?w=1100\" data-orig-size=\"589,367\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"add action to group\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/add-action-to-group.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/add-action-to-group.png?w=1100?w=589\" \/><\/p>\n<p>Manage the action palette by clicking on\u00a0<strong>here<\/strong>\u00a0link\u00a0and selecting for whom the action palette should be managed. What this means is, only those actions that are configured here would show up for those users in the action palette on the phone.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-141\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/manage-action-palette.png?w=1100\" alt=\"manage action palette\" data-attachment-id=\"141\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/manage-action-palette\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/manage-action-palette.png?w=1100\" data-orig-size=\"525,266\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"manage action palette\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/manage-action-palette.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/manage-action-palette.png?w=1100?w=525\" \/><\/p>\n<h2><\/h2>\n<h2>Part B: Design a flow to send an email<\/h2>\n<p>In order to get the responses from the form, we would need a trigger on action response. In the absence of a trigger in Kaizala Flow connector for action response, we could use a HTTP trigger in Flow and register a webhook to it.<\/p>\n<blockquote><p>At the time of writing this blog post, Kaizala Flow connector did not support getting responses for custom actions and hence used the WebHook approach. However, this has now been released by Kaizala team making it very simple to get responses from custom forms \u2013 refer the post,\u00a0<a href=\"https:\/\/kaizala007.wordpress.com\/2018\/04\/13\/get-response-from-custom-kaizala-forms\/\">Flow scenario #2b: Get response from custom Kaizala forms<\/a>.<\/p><\/blockquote>\n<p>To send an email notification on action response, what we would be doing is:<\/p>\n<ol>\n<li>Create a flow with a HTTP trigger and add an action to send email of the body (which would be the json of the action response)<\/li>\n<li>Save the flow to get the URL<\/li>\n<li>Use the URL got in the above step to register a webhook on action response<\/li>\n<li>Send a sample response from the card<\/li>\n<li>Use the JSON to parse the answers and build the flow to send specific fields<\/li>\n<\/ol>\n<h4>Step 1: Create the flow<\/h4>\n<p>Go to\u00a0<a href=\"http:\/\/flow.microsoft.com\/\" rel=\"nofollow\">http:\/\/flow.microsoft.com<\/a>\u00a0to create the flow. In case you are new to flow, you could read this\u00a0<a href=\"https:\/\/kaizala007.wordpress.com\/2018\/01\/12\/automating-business-process-using-kaizala-flow-connector\/\">post<\/a>\u00a0to get started. Add a HTTP trigger and an action to send an email. Use the\u00a0<strong>Body\u00a0<\/strong>from the HTTP trigger for the email (this would be the JSON for the Action Response). Save the flow.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-126\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-flow.png?w=1100\" alt=\"create flow\" data-attachment-id=\"126\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/create-flow\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-flow.png?w=1100\" data-orig-size=\"547,554\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"create flow\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-flow.png?w=1100?w=296\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/create-flow.png?w=1100?w=547\" \/><\/p>\n<h4>Step 2: Copy the URL<\/h4>\n<p>After you have saved the flow, the HTTP POST URL would appear, click on the copy button to copy the URL.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-127\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/http-post-url.png?w=1100\" alt=\"HTTP Post URL\" data-attachment-id=\"127\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/http-post-url\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/http-post-url.png?w=1100\" data-orig-size=\"543,322\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"HTTP Post URL\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/http-post-url.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/http-post-url.png?w=1100?w=543\" \/><\/p>\n<h4>Step 3: Setup a webhook for the form response<\/h4>\n<p>Subscribe to the ActionResponse event for the ActionPackage \/ form we just created in Part A by registering a webhook. (In case you are new to webhooks, refer this\u00a0<a href=\"https:\/\/kaizala007.wordpress.com\/2017\/12\/30\/exploring-kaizala-webhooks\/\">post<\/a>). I have used Postman REST client to register webhook on the ActionPackage with the HTTP POST URL from flow.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-128\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/webhook-registration.png?w=1100\" alt=\"webhook registration\" data-attachment-id=\"128\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/webhook-registration\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/webhook-registration.png?w=1100\" data-orig-size=\"642,312\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"webhook registration\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/webhook-registration.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/webhook-registration.png?w=1100?w=642\" \/><\/p>\n<h4>Step 4: Send a sample response from the card<\/h4>\n<p>Since we have an email notification of the HTTP trigger body, we should receive an email with the ActionResponse payload. Underlined the portions in JSON that we will extract in the next step.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-129\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/email-json.png?w=1100\" alt=\"email json\" data-attachment-id=\"129\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/email-json\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/email-json.png?w=1100\" data-orig-size=\"809,327\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"email json\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/email-json.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/email-json.png?w=1100?w=809\" \/><\/p>\n<h4>Step 5: Parse the JSON in flow to extract the form response<\/h4>\n<p>We will parse the JSON as a 2 step process: first extract the answer array \u2013\u00a0<strong>responseWithQuestions<\/strong>\u00a0and then\u00a0 parse the JSON of the individual answers (element in the array). Add an action to Parse JSON as the second step.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-132\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/parse-json-action.png?w=1100\" alt=\"Parse json action\" data-attachment-id=\"132\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/parse-json-action\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/parse-json-action.png?w=1100\" data-orig-size=\"543,439\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Parse json action\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/parse-json-action.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/parse-json-action.png?w=1100?w=543\" \/><\/p>\n<p>After you have inserted, click on\u00a0<strong>\u201cUse sample payload to generate schema\u201d\u00a0<\/strong>link<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-131\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/parse-json-action-inserted.png?w=1100\" alt=\"Parse json action inserted\" data-attachment-id=\"131\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/parse-json-action-inserted\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/parse-json-action-inserted.png?w=1100\" data-orig-size=\"543,477\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Parse json action inserted\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/parse-json-action-inserted.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/parse-json-action-inserted.png?w=1100?w=543\" \/><\/p>\n<p>In order to parse the responseWithQuestions without parsing the answers, copy the JSON from email and remove the answers from the array (red box below).<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-130\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/json-trimming.png?w=507&amp;h=654\" alt=\"Json trimming\" width=\"507\" height=\"654\" data-attachment-id=\"130\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/json-trimming\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/json-trimming.png?w=507&amp;h=654\" data-orig-size=\"601,775\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Json trimming\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/json-trimming.png?w=507&amp;h=654?w=233\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/json-trimming.png?w=507&amp;h=654?w=601\" \/><\/p>\n<p>Add three \u201c<strong>Initialize variable\u201d<\/strong>\u00a0actions to store<\/p>\n<ul>\n<li>response array<\/li>\n<li>lost item<\/li>\n<li>lost time<\/li>\n<li>Add a\u00a0<strong>Apply To Each\u00a0<\/strong>action to iterate through the response array and parse the item\u2019s JSON to get the details.<\/li>\n<li><\/li>\n<\/ul>\n<p>Add a\u00a0<strong>Switch\u00a0<\/strong>action for each question to get their responses and store in the respective variables using\u00a0<strong>Set variable<\/strong>\u00a0action.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-134\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/switch-case.png?w=1100\" alt=\"switch case\" data-attachment-id=\"134\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/switch-case\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/switch-case.png?w=1100\" data-orig-size=\"1285,435\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"switch case\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/switch-case.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/switch-case.png?w=1100?w=1024\" \/><\/p>\n<p>Now you could modify the Send email action to have a refined subject with the responder\u2019s name and the email body to have the response details (like below).<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-135\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/final-email-action.png?w=1100\" alt=\"final email action\" data-attachment-id=\"135\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/final-email-action\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/final-email-action.png?w=1100\" data-orig-size=\"607,236\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"final email action\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/final-email-action.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/final-email-action.png?w=1100?w=607\" \/><\/p>\n<p>Submitting a response now should send an email notification that looks like this:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-136\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/final-email-received.png?w=1100\" alt=\"final email received\" data-attachment-id=\"136\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/final-email-received\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/final-email-received.png?w=1100\" data-orig-size=\"540,252\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"final email received\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/final-email-received.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/final-email-received.png?w=1100?w=540\" \/><\/p>\n<p>I have exported the flow created in the process as a .zip file and shared\u00a0<a href=\"https:\/\/drive.google.com\/open?id=1InYtpG6EMZYuTIKda4k0pyLZVXfaDNTu\">here<\/a>. In case you want to take a look at the flow, you can I<strong>mport\u00a0<\/strong>on\u00a0<a href=\"https:\/\/flow.microsoft.com\/\">https:\/\/flow.microsoft.com<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-137\" src=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/import-flow.png?w=1100\" alt=\"import flow\" data-attachment-id=\"137\" data-permalink=\"https:\/\/kaizala007.blog\/2018\/01\/18\/flow-scenario-2-get-response-from-custom-kaizala-forms\/import-flow\/\" data-orig-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/import-flow.png?w=1100\" data-orig-size=\"473,56\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"import flow\" data-image-description=\"\" data-medium-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/import-flow.png?w=1100?w=300\" data-large-file=\"https:\/\/kaizala007.files.wordpress.com\/2018\/01\/import-flow.png?w=1100?w=473\" \/><\/p>\n<p>I hope that was helpful. I plan to write a follow-up blog to have the responses stored in an Excel file. In case you found any step unclear \/ face any problems during the process, please drop me a note through the\u00a0<a href=\"https:\/\/kaizala007.wordpress.com\/contact\/\">contact<\/a>\u00a0page.<\/p>\n<div id=\"jp-post-flair\" class=\"sharedaddy sd-like-enabled sd-sharing-enabled\">\n<div class=\"sharedaddy sd-sharing-enabled\">\n<div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\">\n<h3 class=\"sd-title\"><\/h3>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>When you need folks to respond on demand, you could use a Kaizala Form. You can design a form from the group up using HTML, JavaScript and KASClient SDK or you could design a form from the Kaizala Management Portal. This post demonstrates how to do this.<\/p>\n","protected":false},"author":69216,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11],"tags":[87],"class_list":["post-1416","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office-add-ins","tag-kaizala"],"acf":[],"blog_post_summary":"<p>When you need folks to respond on demand, you could use a Kaizala Form. You can design a form from the group up using HTML, JavaScript and KASClient SDK or you could design a form from the Kaizala Management Portal. This post demonstrates how to do this.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1416","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=1416"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1416\/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=1416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=1416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=1416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}