{"id":16974,"date":"2024-12-31T17:04:05","date_gmt":"2024-12-31T08:04:05","guid":{"rendered":"https:\/\/84office.jp\/?p=16974"},"modified":"2024-12-31T17:04:06","modified_gmt":"2024-12-31T08:04:06","slug":"gas-pop-up","status":"publish","type":"post","link":"https:\/\/84office.jp\/en\/gas-pop-up\/","title":{"rendered":"Enhance User Interaction with Google Apps Script: How to Add Confirmation Pop-Ups to Prevent Mistakes"},"content":{"rendered":"<div class=\"codoc-evacuations\" style=\"display:none;\" data-shortcode=\"\"><\/div>\n<p>When you add a script execution button to a Google Spreadsheet, it\u2019s convenient to run the script with just one click. However, have you ever felt worried about accidentally clicking it?<\/p>\n\n\n\n<p>This concern is especially significant for scripts involving actions like sending emails or deleting data, as executing such processes without confirmation could lead to major mistakes.<\/p>\n\n\n\n<p>In this article, we\u2019ll introduce a method to display an &#8220;OK&#8221; or &#8220;Cancel&#8221; confirmation pop-up when using Google Apps Script.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">By implementing this feature, you can effectively utilize scripts while preventing operational errors.<\/p>\n\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-60\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/f60a52f8c88a44afd5fd6f7844c73d02-300x158.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/84office.jp\/script-execution-simple\/\">GAS\u306e\u5b9f\u884c\u3092\u3082\u3063\u3068\u7c21\u5358\u306b\uff01\u56f3\u5f62\u30dc\u30bf\u30f3\u3068\u30de\u30af\u30ed\u30a4\u30f3\u30dd\u30fc\u30c8\u306e\u6d3b\u7528\u8853<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Google Apps Script (GAS) \u3092\u4f7f\u3048\u3070\u65e5\u3005\u306e\u696d\u52d9\u3092\u52b9\u7387\u5316\u3067\u304d\u307e\u3059\u304c\u3001\u6bce\u56deGAS\u30a8\u30c7\u30a3\u30bf\u304b\u3089\u5b9f\u884c\u3059\u308b\u306e\u304c\u9762\u5012\u3060\u3068\u611f\u3058\u308b\u3053\u3068\u3042\u308a\u307e\u305b\u3093\u304b\uff1f \u3082\u3063\u3068\u624b\u8efd\u306b\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u304b&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h2 class=\"wp-block-heading\">Example Output<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full is-resized u-mb-ctrl u-mb-30\"><img decoding=\"async\" width=\"841\" height=\"564\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-120.png\" alt=\"\" class=\"wp-image-16975\" style=\"width:417px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-120.png 841w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-120-300x201.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-120-768x515.png 768w\" sizes=\"(max-width: 841px) 100vw, 841px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list has-border -border02 u-mb-ctrl u-mb-50 has-swl-pale-03-background-color has-background\">\n<li>A pop-up is displayed with a confirmation message: <strong>&#8220;Do you want to send the email?&#8221;<\/strong>, and two buttons, <strong>&#8220;OK&#8221;<\/strong> and <strong>&#8220;Cancel&#8221;<\/strong>, are presented.<\/li>\n\n\n\n<li>If <strong>&#8220;OK&#8221;<\/strong> is clicked, the email sending process is executed, and the result is displayed in another pop-up.<\/li>\n\n\n\n<li>If <strong>&#8220;Cancel&#8221;<\/strong> is clicked, the email is not sent, and a pop-up appears stating that the process was canceled.<\/li>\n<\/ul>\n\n\n\n<p>When the script is executed via a trigger, the pop-up is ignored, and the script continues without waiting for user interaction.<\/p>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\">How to Create a Pop-Up<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Sample Script Example<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"function sendEmailWithConfirmation() {\n    \/\/ Get the UI for the Spreadsheet\n    var ui = SpreadsheetApp.getUi();\n    \n    \/\/ Display a confirmation pop-up\n    var response = ui.alert(&quot;Confirmation&quot;, &quot;Do you want to send the email?&quot;, ui.ButtonSet.OK_CANCEL);\n    \n    if (response == ui.Button.OK) {\n        \/\/ Email sending process\n        try {\n            \/\/ Write specific email sending code here\n            \/\/ Example: GmailApp.sendEmail(email, subject, body);\n            Logger.log(&quot;The email has been sent!&quot;);\n            \n            \/\/ Show a success message in a pop-up\n            ui.alert(&quot;Success&quot;, &quot;The email has been sent!&quot;, ui.ButtonSet.OK);\n        } catch (e) {\n            \/\/ Handle errors\n            Logger.log(&quot;Failed to send the email: &quot; + e.message);\n            \n            \/\/ Show an error message in a pop-up\n            ui.alert(&quot;Error&quot;, &quot;Failed to send the email. Details: &quot; + e.message, ui.ButtonSet.OK);\n        }\n    } else if (response == ui.Button.CANCEL) {\n        Logger.log(&quot;The email sending was canceled.&quot;);\n        \n        \/\/ Show a cancel message in a pop-up\n        ui.alert(&quot;Canceled&quot;, &quot;The email sending has been canceled.&quot;, ui.ButtonSet.OK);\n    }\n}\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">sendEmailWithConfirmation<\/span><span style=\"color: #F8F8F2\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #88846F\">\/\/ Get the UI for the Spreadsheet<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> ui <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> SpreadsheetApp.<\/span><span style=\"color: #A6E22E\">getUi<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #88846F\">\/\/ Display a confirmation pop-up<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> response <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Confirmation&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Do you want to send the email?&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK_CANCEL);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (response <\/span><span style=\"color: #F92672\">==<\/span><span style=\"color: #F8F8F2\"> ui.Button.OK) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #88846F\">\/\/ Email sending process<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #F92672\">try<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            <\/span><span style=\"color: #88846F\">\/\/ Write specific email sending code here<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            <\/span><span style=\"color: #88846F\">\/\/ Example: GmailApp.sendEmail(email, subject, body);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;The email has been sent!&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            <\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            <\/span><span style=\"color: #88846F\">\/\/ Show a success message in a pop-up<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Success&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;The email has been sent!&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        } <\/span><span style=\"color: #F92672\">catch<\/span><span style=\"color: #F8F8F2\"> (e) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            <\/span><span style=\"color: #88846F\">\/\/ Handle errors<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Failed to send the email: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> e.message);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            <\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            <\/span><span style=\"color: #88846F\">\/\/ Show an error message in a pop-up<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Error&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Failed to send the email. Details: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> e.message, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    } <\/span><span style=\"color: #F92672\">else<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (response <\/span><span style=\"color: #F92672\">==<\/span><span style=\"color: #F8F8F2\"> ui.Button.CANCEL) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        Logger.<\/span><span style=\"color: #A6E22E\">log<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;The email sending was canceled.&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #88846F\">\/\/ Show a cancel message in a pop-up<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Canceled&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;The email sending has been canceled.&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"swell-block-accordion u-mb-ctrl u-mb-50\">\n<details class=\"swell-block-accordion__item is-opened\" open data-swl-acc=\"wrapper\"><summary class=\"swell-block-accordion__title\" data-swl-acc=\"header\"><span class=\"swell-block-accordion__label\">Script Explanation<\/span><span class=\"swell-block-accordion__icon c-switchIconBtn\" data-swl-acc=\"icon\" aria-hidden=\"true\" data-opened=\"true\"><i class=\"__icon--closed icon-caret-down\"><\/i><i class=\"__icon--opened icon-caret-up\"><\/i><\/span><\/summary><div class=\"swell-block-accordion__body\" data-swl-acc=\"body\">\n<dl class=\"swell-block-dl\">\n<dt class=\"swell-block-dl__dt\"><strong>Creating a Pop-Up<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li>Use <code>SpreadsheetApp.getUi()<\/code> to access the Spreadsheet&#8217;s UI and <code>ui.alert<\/code> to display a pop-up.<\/li>\n\n\n\n<li>Specify <code>ui.ButtonSet.OK_CANCEL<\/code> to display two buttons: &#8220;OK&#8221; and &#8220;Cancel.&#8221;<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\">Behavior of &#8220;OK&#8221; and &#8220;Cancel&#8221;<\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li>If &#8220;OK&#8221; is selected, the email sending process is executed, and the result is displayed in another pop-up.<\/li>\n\n\n\n<li>If &#8220;Cancel&#8221; is selected, the process is aborted, and a message indicating the cancellation is displayed.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong><strong>Error Handling<\/strong><\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>Use a <code>try-catch<\/code> block to handle errors appropriately if an issue occurs during the email sending process.<\/p>\n<\/dd>\n<\/dl>\n<\/div><\/details>\n<\/div>\n\n\n\n<p>Write the specific code you want to execute in the following section of the script.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-50\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"\/\/ Write specific email sending code here\n\/\/ Example: GmailApp.sendEmail(email, subject, body);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88846F\">\/\/ Write specific email sending code here<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88846F\">\/\/ Example: GmailApp.sendEmail(email, subject, body);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p><strong><strong>Example: Sending an Email with a Fixed Recipient and Content<\/strong><\/strong><\/p>\n\n\n\n<p>If the recipient, subject, and body are fixed, you can write the following:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"GmailApp.sendEmail(&quot;example@example.com&quot;, &quot;Test Email&quot;, &quot;This email was sent via a script.&quot;);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">GmailApp.<\/span><span style=\"color: #A6E22E\">sendEmail<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;example@example.com&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Test Email&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;This email was sent via a script.&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a>example@example.com<\/a><\/strong>: The recipient&#8217;s email address.<\/li>\n\n\n\n<li><strong>&#8220;Test Email&#8221;<\/strong>: The subject of the email.<\/li>\n\n\n\n<li><strong>&#8220;This email was sent via a script.&#8221;<\/strong>: The body of the email.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">How to Customize the Messages<\/h3>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">The messages displayed in this script can be customized by modifying the following four sections:<\/p>\n\n\n\n<dl class=\"swell-block-dl u-mb-ctrl u-mb-60\">\n<dt class=\"swell-block-dl__dt\"><span class=\"swl-fz u-fz-l\"><strong>Confirmation Message Title and Body<\/strong><\/span><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>The confirmation message in the pop-up is set using the first and second arguments of the <code>ui.alert<\/code> function.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Confirmation&quot;, &quot;Do you want to send the email?&quot;, ui.ButtonSet.OK_CANCEL);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Confirmation&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Do you want to send the email?&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK_CANCEL);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>First Argument (&#8220;Confirmation&#8221;)<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">Sets the title of the pop-up.<\/p>\n\n\n\n<p>Example: Change it to <code>\"Action Confirmation\"<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Action Confirmation&quot;, &quot;Do you want to send the email?&quot;, ui.ButtonSet.OK_CANCEL);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Action Confirmation&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Do you want to send the email?&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK_CANCEL);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When the script is executed, it will change as follows:<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"725\" height=\"458\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/c6f1e68307372e6f9b9974630f5b2834.png\" alt=\"\" class=\"wp-image-16976\" style=\"width:340px\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/c6f1e68307372e6f9b9974630f5b2834.png 725w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/c6f1e68307372e6f9b9974630f5b2834-300x190.png 300w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/figure>\n<\/div>\n\n\n<p>Second Argument (&#8220;Do you want to send the email?&#8221;)<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">Sets the body message displayed in the pop-up.<\/p>\n\n\n\n<p>Example: Change it to <code>\"Do you want to delete the selected data?\"<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Confirmation&quot;, &quot;Do you want to delete the selected data?&quot;, ui.ButtonSet.OK_CANCEL);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Confirmation&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Do you want to delete the selected data?&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK_CANCEL);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When the script is executed, it will change as follows:<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"768\" height=\"449\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/5896ed901e72bd0f627ae56559969bbf.png\" alt=\"\" class=\"wp-image-16977\" style=\"width:342px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/5896ed901e72bd0f627ae56559969bbf.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/5896ed901e72bd0f627ae56559969bbf-300x175.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div><\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><span class=\"swl-fz u-fz-l\"><strong>Message for the Processing Result<\/strong><\/span><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>The result messages after a successful email send or when an error occurs can be customized by modifying the following sections.<\/p>\n\n\n\n<p>Message for Successful Execution<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Success&quot;, &quot;The email has been sent!&quot;, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Success&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;The email has been sent!&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>First Argument (&#8220;Success&#8221;)<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">The title of the pop-up for successful execution.<\/p>\n\n\n\n<p>Example: Change it to <code>\"Completed\"<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Completed&quot;, &quot;The email has been sent!&quot;, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Completed&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;The email has been sent!&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When the script is executed, it will change as follows:<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"723\" height=\"461\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7a4aab3690315dec872e5835e71a9c6.png\" alt=\"\" class=\"wp-image-16978\" style=\"width:340px\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7a4aab3690315dec872e5835e71a9c6.png 723w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7a4aab3690315dec872e5835e71a9c6-300x191.png 300w\" sizes=\"(max-width: 723px) 100vw, 723px\" \/><\/figure>\n<\/div>\n\n\n<p>Second Argument (&#8220;The email has been sent!&#8221;)<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">The detailed message for successful execution.<\/p>\n\n\n\n<p>Example: Change it to <code>\"The data has been successfully sent!\"<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Success&quot;, &quot;The data has been successfully sent!&quot;, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Success&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;The data has been successfully sent!&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When the script is executed, it will change as follows:<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"729\" height=\"486\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/382e2f784b86c6b4b0ace5cd0de57ccf.png\" alt=\"\" class=\"wp-image-16979\" style=\"width:340px\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/382e2f784b86c6b4b0ace5cd0de57ccf.png 729w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/382e2f784b86c6b4b0ace5cd0de57ccf-300x200.png 300w\" sizes=\"(max-width: 729px) 100vw, 729px\" \/><\/figure>\n<\/div><\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong><span class=\"swl-fz u-fz-l\">Message for Errors<\/span><\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Error&quot;, &quot;Failed to send the email. Details: &quot; + e.message, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Error&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Failed to send the email. Details: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> e.message, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>First Argument (&#8220;Error&#8221;)<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">The title of the pop-up for errors.<\/p>\n\n\n\n<p>Example: Change it to <code>\"Send Failed\"<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Send Failed&quot;, &quot;Failed to send the email. Details: &quot; + e.message, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Send Failed&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Failed to send the email. Details: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> e.message, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When the script is executed, it will change as follows:<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"926\" height=\"481\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/1071553dade65805c13757d321b10a24.png\" alt=\"\" class=\"wp-image-16980\" style=\"width:340px\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/1071553dade65805c13757d321b10a24.png 926w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/1071553dade65805c13757d321b10a24-300x156.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/1071553dade65805c13757d321b10a24-768x399.png 768w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/figure>\n<\/div>\n\n\n<p>Second Argument (&#8220;Failed to send the email. Details: &#8221; + e.message)<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">The detailed message for the error.<\/p>\n\n\n\n<p>Example: Change it to <code>\"There was an issue while sending the data. Details: \" + e.message<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Error&quot;, &quot;There was an issue while sending the data. Details: &quot; + e.message, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Error&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;There was an issue while sending the data. Details: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> e.message, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When the script is executed, it will change as follows:<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"403\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/264c92352dfcf4b6cf05730bd1f26d3d-1024x403.png\" alt=\"\" class=\"wp-image-16982\" style=\"width:503px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/264c92352dfcf4b6cf05730bd1f26d3d-1024x403.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/264c92352dfcf4b6cf05730bd1f26d3d-300x118.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/264c92352dfcf4b6cf05730bd1f26d3d-768x303.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/264c92352dfcf4b6cf05730bd1f26d3d.png 1160w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div><\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><span class=\"swl-fz u-fz-l\">Message for Cancellation<\/span><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Canceled&quot;, &quot;The email sending has been canceled.&quot;, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Canceled&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;The email sending has been canceled.&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>First Argument (&#8220;Canceled&#8221;)<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">The title of the pop-up for cancellation.<\/p>\n\n\n\n<p>Example: Change it to <code>\"Operation Aborted\"<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Operation Aborted&quot;, &quot;The email sending has been canceled.&quot;, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Operation Aborted&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;The email sending has been canceled.&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When the script is executed, it will change as follows:<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"743\" height=\"474\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/b3ab742caac580b46758718af38f8075.png\" alt=\"\" class=\"wp-image-16983\" style=\"width:340px\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/b3ab742caac580b46758718af38f8075.png 743w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/b3ab742caac580b46758718af38f8075-300x191.png 300w\" sizes=\"(max-width: 743px) 100vw, 743px\" \/><\/figure>\n<\/div>\n\n\n<p>Second Argument (&#8220;The email sending has been canceled.&#8221;)<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">The detailed message for cancellation.<\/p>\n\n\n\n<p>Example: Change it to <code>\"The process has been canceled.\"<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-30\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Canceled&quot;, &quot;The process has been canceled.&quot;, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Canceled&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;The process has been canceled.&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When the script is executed, it will change as follows:<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"732\" height=\"466\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/29f02c1a767d3f2d042b0450bb4aa765.png\" alt=\"\" class=\"wp-image-16984\" style=\"width:340px\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/29f02c1a767d3f2d042b0450bb4aa765.png 732w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/29f02c1a767d3f2d042b0450bb4aa765-300x191.png 300w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/figure>\n<\/div><\/dd>\n<\/dl>\n\n\n\n<h2 class=\"wp-block-heading\">Types of Button Sets<\/h2>\n\n\n\n<p>Google Apps Script provides several button sets for pop-ups, which can be selected based on your needs.<\/p>\n\n\n\n<p>Here are the main examples:<\/p>\n\n\n\n<dl class=\"swell-block-dl\">\n<dt class=\"swell-block-dl__dt\"><strong><span class=\"swl-fz u-fz-l\"><strong>OK Button Only<\/strong><\/span><\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>Used for providing notifications or information.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"ui.alert(&quot;Notification&quot;, &quot;The process is complete.&quot;, ui.ButtonSet.OK);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F8F8F2\">ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Notification&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;The process is complete.&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong><span class=\"swl-fz u-fz-l\">OK and Cancel<\/span><\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>Useful when you want to confirm whether to proceed with an operation.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"var response = ui.alert(&quot;Confirmation&quot;, &quot;Do you want to continue?&quot;, ui.ButtonSet.OK_CANCEL);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> response <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Confirmation&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Do you want to continue?&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.OK_CANCEL);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n<\/dd>\n<\/dl>\n\n\n\n<p><span class=\"swl-fz u-fz-l\"><strong><strong>Yes and No<\/strong><\/strong><\/span><\/p>\n\n\n\n<p>Used when you need a clear answer to a question.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro u-mb-ctrl u-mb-60\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"var response = ui.alert(&quot;Question&quot;, &quot;Are you sure you want to execute this?&quot;, ui.ButtonSet.YES_NO);\n\" style=\"color:#F8F8F2;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki monokai\" style=\"background-color: #272822\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> response <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> ui.<\/span><span style=\"color: #A6E22E\">alert<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Question&quot;<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #E6DB74\">&quot;Are you sure you want to execute this?&quot;<\/span><span style=\"color: #F8F8F2\">, ui.ButtonSet.YES_NO);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>With Google Apps Script, you can easily add pop-up functionality to create a system for preventing mistakes or confirming actions.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">Google Apps Script with pop-ups can be applied to various use cases beyond email sending, such as data deletion, updates, or conditional processing.<\/p>\n\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-30\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/f60a52f8c88a44afd5fd6f7844c73d02-300x158.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/84office.jp\/script-execution-simple\/\">GAS\u306e\u5b9f\u884c\u3092\u3082\u3063\u3068\u7c21\u5358\u306b\uff01\u56f3\u5f62\u30dc\u30bf\u30f3\u3068\u30de\u30af\u30ed\u30a4\u30f3\u30dd\u30fc\u30c8\u306e\u6d3b\u7528\u8853<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Google Apps Script (GAS) \u3092\u4f7f\u3048\u3070\u65e5\u3005\u306e\u696d\u52d9\u3092\u52b9\u7387\u5316\u3067\u304d\u307e\u3059\u304c\u3001\u6bce\u56deGAS\u30a8\u30c7\u30a3\u30bf\u304b\u3089\u5b9f\u884c\u3059\u308b\u306e\u304c\u9762\u5012\u3060\u3068\u611f\u3058\u308b\u3053\u3068\u3042\u308a\u307e\u305b\u3093\u304b\uff1f \u3082\u3063\u3068\u624b\u8efd\u306b\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u304b&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"p-postListWrap u-mb-ctrl u-mb-30\"><ul class=\"p-postList -type-simple\"><li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/google-sheets-ga4-linked-add-on\/\" class=\"p-postList__link\">\n\t\t<div class=\"p-postList__body\">\n\t\t\t<div class=\"p-postList__meta\">\n\t\t\t\t<div class=\"p-postList__times c-postTimes u-thin\">\n\t<time class=\"c-postTimes__posted icon-posted\" datetime=\"2025-01-16\" aria-label=\"\u516c\u958b\u65e5\">2025\u5e741\u670816\u65e5<\/time><\/div>\n\t\t<span class=\"p-postList__cat u-thin icon-folder\" data-cat-id=\"12\">Google Sheets<\/span>\n\t\t\t\t<\/div>\n\t\t\t<h2 class=\"p-postList__title\">How to Connect GA4 Data to Google Sheets: A Step-by-Step Guide Using the Official Google Analytics Add-On<\/h2>\t\t<\/div>\n\t<\/a>\n<\/li>\n<li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/gas%ef%bd%b0send-email\/\" class=\"p-postList__link\">\n\t\t<div class=\"p-postList__body\">\n\t\t\t<div class=\"p-postList__meta\">\n\t\t\t\t<div class=\"p-postList__times c-postTimes u-thin\">\n\t<time class=\"c-postTimes__posted icon-posted\" datetime=\"2024-11-15\" aria-label=\"\u516c\u958b\u65e5\">2024\u5e7411\u670815\u65e5<\/time><\/div>\n\t\t<span class=\"p-postList__cat u-thin icon-folder\" data-cat-id=\"12\">Google Sheets<\/span>\n\t\t\t\t<\/div>\n\t\t\t<h2 class=\"p-postList__title\">Boost Productivity: Automate Gmail to Multiple Recipients with Google Sheets and Apps Script<\/h2>\t\t<\/div>\n\t<\/a>\n<\/li>\n<li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/google-sheets-information-sharing-easy\/\" class=\"p-postList__link\">\n\t\t<div class=\"p-postList__body\">\n\t\t\t<div class=\"p-postList__meta\">\n\t\t\t\t<div class=\"p-postList__times c-postTimes u-thin\">\n\t<time class=\"c-postTimes__posted icon-posted\" datetime=\"2025-01-07\" aria-label=\"\u516c\u958b\u65e5\">2025\u5e741\u67087\u65e5<\/time><\/div>\n\t\t<span class=\"p-postList__cat u-thin icon-folder\" data-cat-id=\"12\">Google Sheets<\/span>\n\t\t\t\t<\/div>\n\t\t\t<h2 class=\"p-postList__title\">Google Sheets Tips: Easily Share Information with the Cell Link Feature<\/h2>\t\t<\/div>\n\t<\/a>\n<\/li>\n<\/ul><\/div>\n\n\n<p class=\"is-style-emboss_box has-swl-pale-02-background-color has-background\">Our company offers support for improving work efficiency through the use of Google Apps Script. <br>If you need assistance with Google Apps Script customization or error resolution, please feel free to contact us. <br>We are fully committed to supporting your business improvements.<br><br><a href=\"https:\/\/84office.jp\/contact\/\">Contact us here<br><\/a><\/p>\n\n\n\n<script src=\"https:\/\/codoc.jp\/js\/cms.js\" data-css=\"rainbow\" data-usercode=\"pQLZofrBiA\" charset=\"UTF-8\" defer><\/script>\n <div id=\"codoc-entry-9lNr9PuMXQ\" class=\"codoc-entries\" data-without-body=\"1\" data-support-button-text=\"Support with a Tip\" data-support-message=\"We will keep offering tools and information to boost work efficiency. Your support helps us provide even better content.\"><\/div>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>When you add a script execution button to a Google Spreadsheet, it\u2019s convenient to run the script with just on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":16986,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","_locale":"en_US","_original_post":"https:\/\/84office.jp\/?p=16023","footnotes":""},"categories":[12],"tags":[],"class_list":["post-16974","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12","en-US"],"_links":{"self":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/16974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/comments?post=16974"}],"version-history":[{"count":2,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/16974\/revisions"}],"predecessor-version":[{"id":16987,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/16974\/revisions\/16987"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media\/16986"}],"wp:attachment":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media?parent=16974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/categories?post=16974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/tags?post=16974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}