{"id":17308,"date":"2023-01-18T19:43:44","date_gmt":"2023-01-18T10:43:44","guid":{"rendered":"https:\/\/docs.c-bot.pro\/?p=17308"},"modified":"2023-09-02T10:53:05","modified_gmt":"2023-09-02T01:53:05","slug":"powerautomate_use_case_05","status":"publish","type":"post","link":"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/","title":{"rendered":"Add group data acquired by BOT to spreadsheet"},"content":{"rendered":"\n<p><a href=\"https:\/\/docs.c-bot.pro\/en\/\"><i class=\"fas fa-book\"><\/i>&nbsp;Home<\/a> &gt; <a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/\">Connect<\/a> &gt; <a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\">Power Automate<\/a> &gt; Add group data acquired by BOT to spreadsheet<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 id=\"outline__1\" class=\"wp-block-heading\"><strong>Creating a flow<\/strong><\/h2>\n\n\n\n<p>Create a flow that sequentially executes the process of writing to a spreadsheet using the list data obtained in the cloud BOT.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1310\" height=\"384\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/01\/powerautomate_use_case_image05.png\" alt=\"\" class=\"wp-image-16773\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>Cloud BOT\uff08When BOT execution is completed\uff09<\/strong><br>Get the BOT execution result when the BOT execution is completed.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>Control\uff08Apply to each\uff09<\/strong><br>The following actions are executed sequentially for the number of rows of group data acquired by the trigger.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>Google Sheets\uff08insert row\uff09<\/strong><br>Insert row data into the spreadsheet.<\/p>\n<\/div>\n<\/div>\n\n\n\n<h3 id=\"outline__1_1\" class=\"wp-block-heading\">Setting Cloud BOT<\/h3>\n\n\n\n<p>1. Click \"Create\" from the navigation menu on the left side of the screen and select \"Automated Cloudflow\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1440\" height=\"752\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/05\/po_07.png\" alt=\"\" class=\"wp-image-21220\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>2. Although a modal window of \"Build an automated cloud flow\" will be displayed, press the \"Skip\" button.\"<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1441\" height=\"753\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/05\/po_ex1_02.png\" alt=\"\" class=\"wp-image-21221\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>3.&nbsp;Search for \"Cloud BOT\" and click the icon.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1441\" height=\"753\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/05\/po_ex1_15.png\" alt=\"\" class=\"wp-image-21249\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>4.&nbsp;Select \"When the BOT execution is completed\" for the trigger.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1441\" height=\"753\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/05\/po_ex1_16.png\" alt=\"\" class=\"wp-image-21250\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>5. Set the trigger. Click&nbsp;<a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_trigger_action\/#outline__1_1_1\">here<\/a>&nbsp;for setting values.<\/p>\n\n\n\n<p><small>*Create a connection if it doesn't exist. Click&nbsp;<a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_manual\/#outline__2_1\">here<\/a>&nbsp;for information on creating a connection.<\/small><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_01-1.jpg\" alt=\"\" class=\"wp-image-23043\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 id=\"outline__1_2\" class=\"wp-block-heading\">Setting control<\/h3>\n\n\n\n<p>In order to process the group data sequentially, it is necessary to create an array for the number of columns of the group data. Also, you need to create an INDEX variable to refer to the row during sequential execution. Reference the next row in the array by incrementing the INDEX variable at the end of the sequence.<\/p>\n\n\n\n<p>Create a flow as follows.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/#outline__1_2_1\" data-type=\"URL\" data-id=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/#outline__1_2_1\"><strong>Create an array for the number of columns of group data<\/strong><\/a><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/#outline__1_2_2\" data-type=\"URL\" data-id=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/#outline__1_2_2\">Create an INDEX variable<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/#outline__1_2_3\" data-type=\"URL\" data-id=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/#outline__1_2_3\">Set up sequential execution<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/#outline__1_2_4\" data-type=\"URL\" data-id=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/#outline__1_2_4\">Increment the value of the INDEX variable<\/a><\/strong><\/li>\n<\/ul>\n\n\n\n<h4 id=\"outline__1_2_1\" class=\"wp-block-heading\">Create an array for the number of columns of group data<\/h4>\n\n\n\n<p>1. Select \"New Step\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_02-1.jpg\" alt=\"\" class=\"wp-image-23045\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>2. Search for \"variable\", click the icon and select \"Initialize variable\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1441\" height=\"753\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/05\/po_ex1_18.png\" alt=\"\" class=\"wp-image-21253\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>3. Specify \"Name\" and \"Type\".<\/p>\n\n\n\n<p>In this example, \"Name\" is \"acquired group name\", \"Type\" is \"Array\", and \"Value\" is \"output value obtained from trigger\".<\/p>\n\n\n\n<p>The output value Data1.product ID (text data of the group) obtained from the trigger is split with the delimiter (comma) using the split function to create a string array.<\/p>\n\n\n\n<p>Click <a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_trigger_action\/#outline__2\">here<\/a> for information about the text format of Cloud BOT.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_03.jpg\" alt=\"\" class=\"wp-image-23046\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>4. Initialize variable for the number of columns of the target group data that you want to set to the action.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_04.jpg\" alt=\"\" class=\"wp-image-23047\"\/><\/figure>\n\n\n\n<h4 id=\"outline__1_2_2\" class=\"wp-block-heading\">Create an INDEX variable<\/h4>\n\n\n\n<p>Create an INDEX variable (array subscript) to specify an element in the array. Add an \"Initialize variable\" action.<\/p>\n\n\n\n<p>In this example, specify \"INDEX\" for \"Name\", \"integer\" for \"Type\", and \"0\" for \"Value\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_05.jpg\" alt=\"\" class=\"wp-image-23048\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 id=\"outline__1_2_3\" class=\"wp-block-heading\">Set up sequential execution<\/h4>\n\n\n\n<p>1. Select \"New Step\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_07.jpg\" alt=\"\" class=\"wp-image-23049\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>2. Press the built-in tab and search for \"Control\". Click the \"Apply to each\" icon.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_06.jpg\" alt=\"\" class=\"wp-image-23050\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>3. Specify the variable you formatted earlier to \"Select an output from the previous steps\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_08.jpg\" alt=\"\" class=\"wp-image-23051\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 id=\"outline__1_2_4\" class=\"wp-block-heading\">Increment the value of the INDEX variable<\/h4>\n\n\n\n<p>1. Select \"Add an Action\". Set \"<a href=\"https:\/\/docs.c-bot.pro\/en\/connect\/powerautomate\/powerautomate_use_case_05\/?preview_id=16768&amp;preview_nonce=04891007c1&amp;preview=true#outline__1_3\">Google Sheets<\/a>\" first.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_09.jpg\" alt=\"\" class=\"wp-image-23052\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>2. Search for \"variables\" and click the icon. Select \"Increment variable\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_10.jpg\" alt=\"\" class=\"wp-image-23054\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>3. Specify the \"name\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_11.jpg\" alt=\"\" class=\"wp-image-23056\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 id=\"outline__1_3\" class=\"wp-block-heading\">Setting Google Sheets<\/h3>\n\n\n\n<p>1. Select \"Add an Action\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_12.jpg\" alt=\"\" class=\"wp-image-23057\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>2. Search for \"Google Sheets\" and click the icon.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_16.jpg\" alt=\"\" class=\"wp-image-23058\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>3. Select \"Insert row\".<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_17.jpg\" alt=\"\" class=\"wp-image-23059\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>4. Set the action. Set \"File\", \"Worksheet\" and specify \"Current item\" specified in \"Apply to each\".<\/p>\n\n\n\n<p><small>*Create a connection if it doesn't exist.<\/small><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_13.jpg\" alt=\"\" class=\"wp-image-23060\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In this example, variables and INDEX are specified in the variables function.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_14.jpg\" alt=\"\" class=\"wp-image-23061\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>A flow has been created. Check the operation from \"Test\" in the upper menu (upper right of the screen). If you can confirm the execution result, the setting is completed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"855\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_15.jpg\" alt=\"\" class=\"wp-image-23062\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If you actually check the spreadsheet, it will be written as follows.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"522\" src=\"https:\/\/docs.c-bot.pro\/wp-content\/uploads\/2023\/09\/pa_en_use_case_image_5_19.jpg\" alt=\"\" class=\"wp-image-23066\"\/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;Home &gt; Connect &gt; Power Automate &gt; Add group data acquired by BOT to spreadsheet Creating a flow Create a flow that sequentially executes the process of writing to a spreadsheet using the list data obtained in the cloud BOT. Cloud BOT\uff08When BOT execution is completed\uff09Get the BOT execution result when the BOT execution is completed. Control\uff08Apply to each\uff09The following actions are executed sequentially for the number of rows of group data acquired by the trigger. Google Sheets\uff08insert row\uff09Insert row data into the spreadsheet. Setting Cloud BOT 1. Click \"Create\" from the navigation menu on the left side of the screen and select \"Automated Cloudflow\". 2. Although a modal window of \"Build an automated cloud flow\" will be displayed, press the \"Skip\" button.\" 3.&nbsp;Search for \"Cloud BOT\" and click the icon. 4.&nbsp;Select \"When the BOT execution is completed\" for the trigger. 5. Set the trigger. Click&nbsp;here&nbsp;for setting values. *Create a connection if it doesn't exist. Click&nbsp;here&nbsp;for information on creating a connection. Setting control In order to process the group data sequentially, it is necessary to create an array for the number of columns of the group data. Also, you need to create an INDEX variable to refer to the row [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_locale":"en_US","_original_post":"https:\/\/docs.c-bot.pro\/?p=16768","footnotes":""},"categories":[50],"tags":[19],"class_list":["post-17308","post","type-post","status-publish","format-standard","hentry","category-powerautomate","tag-power-automate","en-US"],"_links":{"self":[{"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/posts\/17308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/comments?post=17308"}],"version-history":[{"count":9,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/posts\/17308\/revisions"}],"predecessor-version":[{"id":23069,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/posts\/17308\/revisions\/23069"}],"wp:attachment":[{"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/media?parent=17308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/categories?post=17308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.c-bot.pro\/wp-json\/wp\/v2\/tags?post=17308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}