{"id":16959,"date":"2024-12-30T22:40:28","date_gmt":"2024-12-30T13:40:28","guid":{"rendered":"https:\/\/84office.jp\/?p=16959"},"modified":"2024-12-30T22:40:29","modified_gmt":"2024-12-30T13:40:29","slug":"about-gas-trigger","status":"publish","type":"post","link":"https:\/\/84office.jp\/en\/about-gas-trigger\/","title":{"rendered":"Boost Productivity with Google Apps Script Triggers: Types and How to Set Them Up"},"content":{"rendered":"<div class=\"codoc-evacuations\" style=\"display:none;\" data-shortcode=\"\"><\/div>\n<p>With Google Apps Script, you can streamline your workflow, but doesn\u2019t it feel cumbersome to run the script manually every time?<\/p>\n\n\n\n<p>By using Google Apps Script triggers, you can integrate with Google services like Sheets and Forms to automate script execution seamlessly.<\/p>\n\n\n\n<p>This eliminates the need for manual operations, enabling greater efficiency and significant time savings in your workflow.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">In this article, we will introduce the types of Google Apps Script triggers and explain how to set them up.<\/p>\n\n\n<div class=\"swell-block-postLink\">\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\/a47fc3ec7fda9f2e79b340ab994294c8-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\/gas-pop-up\/\">GAS\u3067\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\uff01\u78ba\u8a8d\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8ffd\u52a0\u3057\u3066\u64cd\u4f5c\u30df\u30b9\u3092\u9632\u3050\u65b9\u6cd5<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u4e0a\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\u30dc\u30bf\u30f3\u3092\u8a2d\u7f6e\u3059\u308b\u3068\u3001\u30af\u30ea\u30c3\u30af\u3059\u308b\u3060\u3051\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u52d5\u304f\u4fbf\u5229\u3055\u3092\u611f\u3058\u308b\u53cd\u9762\u3001\u300c\u9593\u9055\u3048\u3066\u62bc\u3057\u3066\u3057\u307e\u3046\u304b\u3082\u300d\u3068\u4e0d\u5b89\u3092\u611f\u3058\u308b\u3053\u3068&#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 u-mb-ctrl u-mb-30\"><strong>Main Types of Triggers<\/strong><\/h2>\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><strong><strong>Triggers Based on Spreadsheet Actions<\/strong><\/strong><\/li>\n\n\n\n<li><strong><strong>Time-Driven Triggers<\/strong><\/strong><\/li>\n\n\n\n<li><strong><strong>Triggers Based on Calendar Events<\/strong><\/strong><\/li>\n<\/ul>\n\n\n\n<p>Triggers are mechanisms that automatically execute scripts based on specific conditions or events.<\/p>\n\n\n\n<p>This allows you to save effort and efficiently manage your tasks.<\/p>\n\n\n\n<p>Here, we\u2019ll introduce the main types of triggers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><strong>Triggers Based on Spreadsheet Actions<\/strong><\/strong><\/h3>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-30\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"632\" height=\"492\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-113.png\" alt=\"\" class=\"wp-image-16961\" style=\"width:385px\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-113.png 632w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-113-300x234.png 300w\" sizes=\"(max-width: 632px) 100vw, 632px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-border -border02 u-mb-ctrl u-mb-40 has-swl-pale-03-background-color has-background\"><strong>Scripts can be executed based on actions in Google Sheets, such as cell edits or sheet modifications, serving as triggers to automate tasks.<\/strong><\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">You can choose from the following options:<\/p>\n\n\n\n<figure class=\"wp-block-table is-all-centered--va u-mb-ctrl u-mb-60\"><table><tbody><tr><td><strong>On Open<\/strong><\/td><td>Executes the script when the spreadsheet is opened.<\/td><\/tr><tr><td><strong><strong>On Edit<\/strong><\/strong><\/td><td>Executes the script when a cell in the spreadsheet is edited.<\/td><\/tr><tr><td><strong><strong>On Change<\/strong><\/strong><\/td><td>Executes the script when the structure of the sheet is modified (e.g., adding or deleting a sheet).<\/td><\/tr><tr><td><strong><strong>On Form Submit<\/strong><\/strong><\/td><td>Executes the script when data submitted through a Google Form is added to the spreadsheet.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Time-Driven Triggers<\/strong><\/h3>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-30\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"613\" height=\"478\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-114.png\" alt=\"\" class=\"wp-image-16962\" style=\"width:385px\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-114.png 613w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-114-300x234.png 300w\" sizes=\"(max-width: 613px) 100vw, 613px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-border -border02 u-mb-ctrl u-mb-40 has-swl-pale-03-background-color has-background\"><strong>Time-driven triggers execute scripts at specific time intervals or according to a predefined schedule. These triggers are ideal for automating recurring tasks.<\/strong><\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">Here are the available options:<\/p>\n\n\n\n<figure class=\"wp-block-table is-all-centered--va u-mb-ctrl u-mb-60\"><table><tbody><tr><td><strong>Specific date and time<\/strong><\/td><td>Execute the script only once at a specific date and time.<\/td><\/tr><tr><td><strong>Minute Timer<\/strong><\/td><td>Runs the script every 1, 5, 10, 15, or 30 minutes.<\/td><\/tr><tr><td><strong>Hourly Timer<\/strong><\/td><td>Executes the script every hour or at specific hourly intervals.<\/td><\/tr><tr><td><strong>Daily Timer<\/strong><\/td><td>Schedules the script to run once a day, with options to specify the time of execution.<\/td><\/tr><tr><td><strong>Weekly Timer<\/strong><\/td><td>Runs the script on specific days of the week at a predefined time.<\/td><\/tr><tr><td><strong>Monthly Timer<\/strong><\/td><td>Executes the script on a specific day of the month at a specified time.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Triggering by Calendar Events<\/h3>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-30\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"626\" height=\"634\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-115.png\" alt=\"\" class=\"wp-image-16963\" style=\"width:385px\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-115.png 626w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-115-296x300.png 296w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-border -border02 u-mb-ctrl u-mb-40 has-swl-pale-03-background-color has-background\"><strong>Triggers Based on Calendar Events<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table is-all-centered--va u-mb-ctrl u-mb-60\"><table><tbody><tr><td><strong>Calender updated<\/strong><\/td><td>Runs the script whenever an existing event is modified.<br>By using this trigger, you can automate processes based on changes made to your calendar.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Writing Triggers in Scripts<\/strong><\/h3>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-30\">\n<figure class=\"alignleft size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"537\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-116-1024x537.png\" alt=\"\" class=\"wp-image-16964\" style=\"width:640px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-116-1024x537.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-116-300x157.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-116-768x403.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-116.png 1529w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-border -border02 u-mb-ctrl u-mb-40 has-swl-pale-03-background-color has-background\">To set up triggers programmatically, you can use the ScriptApp service in Google Apps Script. This allows you to create, manage, and customize triggers directly within your script.<\/p>\n\n\n\n<p>For example, you can schedule a script to fetch Google Analytics data precisely at 7:00 AM every morning, or execute it under specific conditions, providing finer control compared to standard time-based triggers.<\/p>\n\n\n\n<p>This enables the automation of daily data collection, streamlining data management and improving efficiency.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Set Up Triggers<\/h2>\n\n\n\n<p>(Excluding the method of writing triggers directly in the script)<\/p>\n\n\n\n<div class=\"swell-block-step u-mb-ctrl u-mb-60\" data-num-style=\"circle\">\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Open the Script Editor<\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"933\" height=\"591\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/98efceb7a335447039dff05eb8d70d3d.png\" alt=\"\" class=\"wp-image-16537\" style=\"width:447px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/98efceb7a335447039dff05eb8d70d3d.png 933w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/98efceb7a335447039dff05eb8d70d3d-300x190.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/98efceb7a335447039dff05eb8d70d3d-768x486.png 768w\" sizes=\"(max-width: 933px) 100vw, 933px\" \/><\/figure>\n<\/div>\n\n\n<p>In Google Sheets, click on <code>Extensions<\/code> > <code>Apps Script<\/code>.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Access the Trigger Menu<\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-30\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"828\" height=\"632\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/3256891b94bd2d55738478a1564604e4.png\" alt=\"\" class=\"wp-image-16965\" style=\"width:475px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/3256891b94bd2d55738478a1564604e4.png 828w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/3256891b94bd2d55738478a1564604e4-300x229.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/3256891b94bd2d55738478a1564604e4-768x586.png 768w\" sizes=\"(max-width: 828px) 100vw, 828px\" \/><\/figure>\n<\/div>\n\n\n<p>In the Apps Script editor, click the clock icon \ud83d\udd52 on the left sidebar, or go to <code>Triggers<\/code> > <code>Current project's triggers<\/code>.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Add a New Trigger<\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-30\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"502\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/9990215993a6bd1ab3643c002a380d43-1024x502.png\" alt=\"\" class=\"wp-image-16966\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/9990215993a6bd1ab3643c002a380d43-1024x502.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/9990215993a6bd1ab3643c002a380d43-300x147.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/9990215993a6bd1ab3643c002a380d43-768x377.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/9990215993a6bd1ab3643c002a380d43-1536x753.png 1536w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/9990215993a6bd1ab3643c002a380d43.png 1813w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Click <code>+ Add Trigger<\/code>.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Configure Trigger Details<\/div><div class=\"swell-block-step__body\">\n<p class=\"u-mb-ctrl u-mb-30\">(Example of selecting a time-driven trigger)<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-30\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"640\" height=\"919\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-117.png\" alt=\"\" class=\"wp-image-16967\" style=\"width:375px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-117.png 640w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-117-209x300.png 209w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/figure>\n<\/div>\n\n\n<dl class=\"swell-block-dl\">\n<dt class=\"swell-block-dl__dt\"><strong>Select the Function to Execute<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li>Specify the function to run when the trigger is activated.<\/li>\n\n\n\n<li>The <code>fetchGoogleNewsByCountryAndSection<\/code> function was created in the article linked below.<\/li>\n<\/ul>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<a href=\"https:\/\/84office.jp\/en\/gas-google-news-get\/\" class=\"c-blogLink -internal\" data-style=\"text\">\n\t\t\t\t<!-- <i class=\"c-blogLink__icon icon-link\" role=\"presentation\"><\/i> -->\n\t\t\t\t<span class=\"c-blogLink__icon\">\n\t\t\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-link __svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M21.2 30.2c-.5 0-1-.2-1.4-.6l-.7-.7c-2.3-2.3-3.5-5.3-3.5-8.5s1.2-6.2 3.5-8.5l7.1-7.1c2.3-2.3 5.3-3.5 8.5-3.5s6.2 1.2 8.5 3.5c4.7 4.7 4.7 12.3 0 17l-3.5 3.5c-.8.8-2 .8-2.8 0-.8-.8-.8-2 0-2.8l3.5-3.5c3.1-3.1 3.1-8.2 0-11.3-1.5-1.5-3.5-2.3-5.7-2.3-2.1 0-4.2.8-5.7 2.3l-7.1 7.1c-1.5 1.5-2.3 3.5-2.3 5.7s.8 4.2 2.3 5.7l.7.7c.8.8.8 2 0 2.8-.4.3-.9.5-1.4.5z\" \/><path d=\"M13.4 46.6c-3.1 0-6.1-1.2-8.5-3.5-2.3-2.3-3.5-5.3-3.5-8.5s1.2-6.2 3.5-8.5l3.5-3.5c.8-.8 2-.8 2.8 0 .8.8.8 2 0 2.8l-3.5 3.5c-1.5 1.5-2.3 3.5-2.3 5.7 0 2.1.8 4.2 2.3 5.7 3.1 3.1 8.2 3.1 11.3 0l7.1-7.1c1.5-1.5 2.3-3.5 2.3-5.7 0-2.1-.8-4.2-2.3-5.7l-.7-.7c-.8-.8-.8-2 0-2.8.8-.8 2-.8 2.8 0l.7.7c2.3 2.3 3.5 5.3 3.5 8.5s-1.2 6.2-3.5 8.5l-7.1 7.1c-2.3 2.3-5.3 3.5-8.4 3.5z\" \/><\/svg>\t\t\t\t<\/span>\n\t\t\t\t<span class=\"c-blogLink__text\">Automate News Collection with Google Apps Script: Fetch Daily Updates from Google News to Google &#8230;<\/span>\n\t\t\t<\/a>\n\t\t<\/div><\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Select Execution Deployment:<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li>Choose which version of the script to use when the trigger is executed.<\/li>\n\n\n\n<li>Typically, select <code>Head<\/code> to use the latest version.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Select Event Source<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li>Specify the event that will trigger the execution.<\/li>\n\n\n\n<li>Options include choices such as &#8220;Time-Driven.&#8221;<\/li>\n\n\n\n<li>A time-driven trigger executes the script based on a predefined schedule.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong><strong>Select the Type of Time-Based Trigger<\/strong><\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li>This option allows you to set how frequently the script should run.<\/li>\n\n\n\n<li>If you select &#8220;Date-Based Timer,&#8221; you can schedule execution within hourly intervals.<\/li>\n<\/ul>\n\n\n\n<p><em>(Partial explanation for &#8220;Date-Based Timer&#8221;)<\/em><\/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=\"416\" height=\"993\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-118.png\" alt=\"\" class=\"wp-image-16968\" style=\"width:216px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-118.png 416w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-118-126x300.png 126w\" sizes=\"(max-width: 416px) 100vw, 416px\" \/><\/figure>\n<\/div><\/dd>\n<\/dl>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Save the Trigger<\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"730\" height=\"793\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/3ab221c14837987d7620c75d7b70b9b5.png\" alt=\"\" class=\"wp-image-16969\" style=\"width:525px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/3ab221c14837987d7620c75d7b70b9b5.png 730w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/3ab221c14837987d7620c75d7b70b9b5-276x300.png 276w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/figure>\n<\/div>\n\n\n<p>Click <code>Save<\/code> to activate the trigger.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-50\">With this setup, the selected script will execute whenever the specified event occurs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large u-mb-ctrl u-mb-40\"><img decoding=\"async\" width=\"1024\" height=\"205\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-119-1024x205.png\" alt=\"\" class=\"wp-image-16970\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-119-1024x205.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-119-300x60.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-119-768x154.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-119-1536x307.png 1536w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/image-119.png 1870w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The triggers you set up will be displayed in a list.<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\">Advantages and Disadvantages of Trigger Settings<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-double is-thead-centered u-mb-ctrl u-mb-40\"><table class=\"has-fixed-layout\"><thead><tr><th data-has-cell-bg=\"1\" data-text-color=\"white\"><span style=\"--the-cell-bg: #70c0a2\" data-icon-size=\"l\" data-icon-type=\"bg\" data-text-color=\"white\" aria-hidden=\"true\" class=\"swl-cell-bg\">\u00a0<\/span>Advantages<\/th><th data-has-cell-bg=\"1\" data-text-color=\"white\"><span style=\"--the-cell-bg: #f69f78\" data-text-color=\"white\" aria-hidden=\"true\" class=\"swl-cell-bg\">\u00a0<\/span>Disadvantages<\/th><\/tr><\/thead><tbody><tr><td data-has-cell-bg=\"1\" data-text-color=\"black\"><span style=\"--the-cell-bg: #fbfbfb\" data-icon-size=\"l\" data-icon-type=\"bg\" data-text-color=\"black\" aria-hidden=\"true\" class=\"swl-cell-bg\">\u00a0<\/span><span data-icon=\"circle\" class=\"swl-inline-list\"><strong>Automation of Tasks<\/strong><\/span><br><span data-icon=\"circle\" class=\"swl-inline-list\"><strong><strong>Reduction in Human Errors<\/strong><\/strong><\/span><br><span data-icon=\"circle\" class=\"swl-inline-list\"><strong><strong>Timely Notifications<\/strong><br><\/strong><\/span><\/td><td data-has-cell-bg=\"1\" data-text-color=\"black\"><span style=\"--the-cell-bg: #fffbfa\" data-icon-size=\"l\" data-icon-type=\"bg\" data-text-color=\"black\" aria-hidden=\"true\" class=\"swl-cell-bg\">\u00a0<\/span><strong><span data-icon=\"close\" class=\"swl-inline-list\">Possibility of Execution at Unexpected Times<\/span><br><span data-icon=\"close\" class=\"swl-inline-list\">Difficulty in Troubleshooting Errors<\/span><br><span data-icon=\"close\" class=\"swl-inline-list\"><strong>Limitations on Execution Frequency<\/strong><br><\/span><\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span><span class=\"swl-fz u-fz-l\">\u00a0Advantages<\/span><\/span><\/div><div class=\"cap_box_content\">\n<p>\u3000<\/p>\n\n\n\n<dl class=\"swell-block-dl\">\n<dt class=\"swell-block-dl__dt\"><strong>Automation of Tasks<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>By automating daily routine tasks, you can significantly reduce working hours.<\/p>\n\n\n\n<p>For example, regular data retrieval, updates, and transfers can be automated seamlessly.<\/p>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Reduction in Human Errors<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>By using triggers, scripts are executed automatically at the right time, preventing missed executions or running the wrong script.<\/p>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong><strong>Timely Notifications<\/strong><\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>By automating script execution in response to real-time actions such as spreadsheet updates or form submissions, you can efficiently handle tasks as they occur.<\/p>\n<\/dd>\n<\/dl>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl u-mb-ctrl u-mb-60\" data-colset=\"col1\"><div class=\"cap_box_ttl\"><span><span class=\"swl-fz u-fz-l\">Disadvantages<\/span><\/span><\/div><div class=\"cap_box_content\">\n<p class=\"u-mb-ctrl u-mb-30\">There are also some disadvantages to setting up triggers.<\/p>\n\n\n\n<dl class=\"swell-block-dl\">\n<dt class=\"swell-block-dl__dt\"><strong>Possibility of Execution at Unexpected Times<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>Triggers automatically execute scripts when the specified conditions are met, but they may sometimes run at unexpected times.<\/p>\n\n\n\n<p>This can lead to risks such as unnecessary data updates or changes.<\/p>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\">Difficulty in Troubleshooting Errors<\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>Unlike manually running scripts, it becomes more challenging to check error details in real time.<\/p>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Limitations on Execution Frequency<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>Trigger execution is subject to Google&#8217;s limitations, with a restricted number of executions allowed per day.<\/p>\n\n\n\n<p>If this limit is exceeded, the script will stop, potentially leaving essential processes incomplete.<\/p>\n<\/dd>\n<\/dl>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-40\">Limitations of Trigger Execution<\/h2>\n\n\n\n<figure class=\"wp-block-table is-all-centered u-mb-ctrl u-mb-40\"><table class=\"has-fixed-layout\"><thead style=\"--thead-color--bg:var(--color_pale03);--thead-color--txt:var(--swl-text_color--black)\"><tr><th><strong>Item<\/strong><\/th><th>Personal (e.g., gmail.com) <br>or <br>G Suite Free Edition<\/th><th><strong>Google Workspace Account<\/strong><\/th><\/tr><\/thead><tbody><tr><td>Total Trigger Execution Time<\/td><td>90 minutes\/day<\/td><td>6 hours\/day<\/td><\/tr><tr><td>Number of Triggers<\/td><td>Up to 20 triggers per script<\/td><td>Up to 20 triggers per script<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<dl class=\"swell-block-dl u-mb-ctrl u-mb-40\">\n<dt class=\"swell-block-dl__dt\"><strong>Total Trigger Execution Time<\/strong>:<\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>Each account has a limit on the total trigger execution time allowed per day.<\/p>\n\n\n\n<p>For personal accounts, the limit is 90 minutes per day, while Google Workspace accounts allow up to 6 hours per day.<\/p>\n\n\n\n<p>When running long scripts with triggers, it&#8217;s important to ensure that the total execution time does not exceed the daily limit.<\/p>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Number of Triggers<\/strong>:<\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>The number of triggers that can be set for each script is limited to a maximum of 20 per script for both personal accounts and Google Workspace accounts.<\/p>\n\n\n\n<p>When setting multiple triggers, it\u2019s important to use only the necessary ones and manage them to stay within the limit.<\/p>\n<\/dd>\n<\/dl>\n\n\n\n<p class=\"u-mb-ctrl u-mb-60\">For more details, please refer to the <a href=\"https:\/\/developers.google.com\/apps-script\/guides\/services\/quotas?hl=ja\">Google Workspace<\/a> website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\"><strong>Examples of Trigger Usage<\/strong><\/h2>\n\n\n\n<p>By utilizing triggers, you can automate tasks by executing specific scripts on a regular schedule.<\/p>\n\n\n\n<p>For instance:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fetching news updates and storing them in a Google Sheet.<\/li>\n\n\n\n<li class=\"u-mb-ctrl u-mb-30\">Retrieving data from Google Analytics for daily or weekly reporting.<\/li>\n<\/ul>\n\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-40\">\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\/12\/9e2a3621cd38393783221f5f4993f805-1-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\/en\/gas-google-news-get\/\">Automate News Collection with Google Apps Script: Fetch Daily Updates from Google News to Google &#8230;<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Do you want to organize your daily news information but find it time consuming to gather information? It is also time-consuming to manually visit news sites&#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=\"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\/f91d5ddf6ccd121e6e90e94c49104269-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\/ga4-data-fetch\/\">GA4\u3068\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092API\u3067\u9023\u643a\u3059\u308b\u65b9\u6cd5\uff1aGAS\u30b9\u30af\u30ea\u30d7\u30c8\u4f5c\u6210\u3068\u5b9f\u884c<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u672c\u8a18\u4e8b\u3067\u306f\u3001\u524d\u56de\u8a2d\u5b9a\u3057\u305f\u8a8d\u8a3c\u60c5\u5831\u3092\u4f7f\u3063\u3066Google Apps Script\uff08GAS\uff09\u3067GA4\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u4eca\u56de\u306e\u30b5\u30f3\u30d7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8&#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 u-mb-ctrl u-mb-30\">Conclusion<\/h2>\n\n\n\n<p>In this article, we introduced the types of triggers and how to set them up.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">By keeping the limitations in mind, setting up triggers can help you automate tasks and reduce manual effort, making your workflow more efficient.<\/p>\n\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-30\"><\/div>\n\n<div class=\"p-postListWrap u-mb-ctrl u-mb-40\"><ul class=\"p-postList -type-simple\"><li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/redisplay-or-delete-sheets\/\" 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-22\" aria-label=\"\u516c\u958b\u65e5\">2024\u5e7411\u670822\u65e5<\/time><\/div>\n\t\t<span class=\"p-postList__cat u-thin icon-folder\" data-cat-id=\"8\">Workflow Optimization<\/span>\n\t\t\t\t<\/div>\n\t\t\t<h2 class=\"p-postList__title\">Effortlessly Unhide and Delete Hidden Sheets in Google Sheets All at Once!<\/h2>\t\t<\/div>\n\t<\/a>\n<\/li>\n<li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/get-youtube-data-api\/\" 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-12-18\" aria-label=\"\u516c\u958b\u65e5\">2024\u5e7412\u670818\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\">YouTube API Key Setup: Export and Manage Video Data in Google Sheets<\/h2>\t\t<\/div>\n\t<\/a>\n<\/li>\n<li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/googlesheets-xmatch\/\" 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-18\" aria-label=\"\u516c\u958b\u65e5\">2025\u5e741\u670818\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\">An Overview and How to Use the XMATCH Function in Google Sheets<\/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","protected":false},"excerpt":{"rendered":"<p>With Google Apps Script, you can streamline your workflow, but doesn\u2019t it feel cumbersome to run the script ma [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":16971,"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=16328","footnotes":""},"categories":[12],"tags":[],"class_list":["post-16959","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\/16959","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=16959"}],"version-history":[{"count":2,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/16959\/revisions"}],"predecessor-version":[{"id":16972,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/16959\/revisions\/16972"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media\/16971"}],"wp:attachment":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media?parent=16959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/categories?post=16959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/tags?post=16959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}