{"id":17099,"date":"2025-01-10T21:53:17","date_gmt":"2025-01-10T12:53:17","guid":{"rendered":"https:\/\/84office.jp\/?p=17099"},"modified":"2025-01-10T21:53:18","modified_gmt":"2025-01-10T12:53:18","slug":"shorten-url-generator-bulk","status":"publish","type":"post","link":"https:\/\/84office.jp\/en\/shorten-url-generator-bulk\/","title":{"rendered":"How to Bulk Create Shortened URLs Using Google Sheets and Google Apps Script"},"content":{"rendered":"<div class=\"codoc-evacuations\" style=\"display:none;\" data-shortcode=\"\"><\/div>\n<p>In our previous article (&#8220;<a href=\"https:\/\/84office.jp\/en\/short-url-creation\/\">Simplify URL Shortening: Create and Copy Short URLs with a Single Click Using Chrome Extensions<\/a>&#8220;), we introduced how to create shortened URLs using a Chrome extension, which is perfect for converting URLs individually.<\/p>\n\n\n\n<p>However, if you need to shorten a large number of URLs, using Google Apps Script (GAS) is more efficient.<\/p>\n\n\n\n<p>In this article, we&#8217;ll show you how to use <strong>Google Sheets<\/strong> and <strong>Google Apps Script<\/strong> to <strong>bulk convert multiple URLs into shortened URLs<\/strong>.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">By creating and managing shortened URLs collectively in a Google Spreadsheet, you can <strong>streamline your workflow<\/strong> and <strong>enhance productivity<\/strong>.<\/p>\n\n\n<div class=\"swell-block-postLink u-mb-ctrl u-mb-60\">\t\t\t<div class=\"p-blogCard -external\" data-type=\"type3\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u5408\u540c\u4f1a\u793e\u6a4b\u722a\u30aa\u30d5\u30a3\u30b9<\/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\/2025\/01\/693efd41d0b28c27d46d74413cf396e4.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\/short-url-creation\/\">Simplify URL Shortening: Create and Copy Short URLs with a Single Click Using Chrome Extensions | \u5408&#8230;<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Sharing long URLs via social media or email can look cluttered and take up unnecessary space. This is where shortened UR<\/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-large is-resized u-mb-ctrl u-mb-40\"><img decoding=\"async\" width=\"1024\" height=\"649\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34-1024x649.png\" alt=\"\" class=\"wp-image-17109\" style=\"width:680px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34-1024x649.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34-300x190.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34-768x486.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34.png 1405w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list has-border -border02 has-swl-pale-03-background-color has-background\">\n<li>Using <strong>Google Apps Script<\/strong> and the <strong>X.gd API<\/strong><\/li>\n\n\n\n<li>Enter the original URLs to be shortened in column A<\/li>\n\n\n\n<li>The shortened URLs generated by Google Apps Script will appear in column B<\/li>\n<\/ul>\n\n\n\n<p><br>Bulk Create Shortened URLs from Original URLs Entered in Column A<\/p>\n\n\n\n<p>The script is designed to skip URLs that already have shortened versions in column B, processing only the URLs that have not yet been shortened.<\/p>\n\n\n\n<p>This approach ensures efficient URL creation by eliminating unnecessary processing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Preparation Needed<\/strong><\/h2>\n\n\n\n<p>To bulk shorten multiple URLs, you need to obtain an API key from <strong>X.gd<\/strong>.<\/p>\n\n\n\n<p>Follow the steps below to acquire your API key and set it up for use in Google Sheets.<\/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\"><strong>Access the X.gd Website<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"872\" height=\"323\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-33.png\" alt=\"\" class=\"wp-image-17100\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-33.png 872w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-33-300x111.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-33-768x284.png 768w\" sizes=\"(max-width: 872px) 100vw, 872px\" \/><\/figure>\n<\/div>\n\n\n<p>Go to the official <strong><a href=\"https:\/\/x.gd\/\">X.gd<\/a><\/strong> website.<br><br><\/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\">Click on the &#8220;Developer&#8221; Page<\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/e71028f1990be074d6d0539966d702ff-1024x389.png\" alt=\"\" class=\"wp-image-17101\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/e71028f1990be074d6d0539966d702ff-1024x389.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/e71028f1990be074d6d0539966d702ff-300x114.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/e71028f1990be074d6d0539966d702ff-768x291.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/e71028f1990be074d6d0539966d702ff.png 1381w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Click on the <strong>&#8220;Developer&#8221;<\/strong> page located at the bottom right of the website.<\/p>\n\n\n\n<p>Here, you will find the procedure to issue an API key.<\/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\"><strong>Submit Your Email Address to Request an API Key<\/strong><\/div><div class=\"swell-block-step__body\"><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=\"418\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/9b965fd387472ab534cd7180b7cefbf9-1024x418.png\" alt=\"\" class=\"wp-image-17102\" style=\"width:556px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/9b965fd387472ab534cd7180b7cefbf9-1024x418.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/9b965fd387472ab534cd7180b7cefbf9-300x123.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/9b965fd387472ab534cd7180b7cefbf9-768x314.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/9b965fd387472ab534cd7180b7cefbf9.png 1148w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Scroll down the Developers page to find the section for issuing an API key.<\/p>\n\n\n\n<p>Follow the instructions to submit your email address.<\/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\"><strong>Activate the API Key<\/strong><\/div><div class=\"swell-block-step__body\"><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=\"796\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/67db8eee34d60b35218ef9f2a1be05bf-1024x796.png\" alt=\"\" class=\"wp-image-17103\" style=\"width:692px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/67db8eee34d60b35218ef9f2a1be05bf-1024x796.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/67db8eee34d60b35218ef9f2a1be05bf-300x233.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/67db8eee34d60b35218ef9f2a1be05bf-768x597.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/67db8eee34d60b35218ef9f2a1be05bf.png 1179w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>You will receive a confirmation email from <strong>X.gd<\/strong> at the email address you provided.<\/p>\n\n\n\n<p>Click the <strong>&#8220;Activate&#8221;<\/strong> button in the email to activate your API key.<\/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\"><strong>Copy the API Key<\/strong><\/div><div class=\"swell-block-step__body\"><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=\"393\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/b4690de2530553a5adfe294015885398-1024x393.png\" alt=\"\" class=\"wp-image-17104\" style=\"width:552px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/b4690de2530553a5adfe294015885398-1024x393.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/b4690de2530553a5adfe294015885398-300x115.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/b4690de2530553a5adfe294015885398-768x295.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/b4690de2530553a5adfe294015885398.png 1133w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>After clicking <strong>&#8220;Activate&#8221;<\/strong>, your API key will be displayed.<\/p>\n\n\n\n<p>Copy this key, as you will need to set it in the script properties in a later step.<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Steps<\/h2>\n\n\n\n<div class=\"swell-block-step\" 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\"><strong>Prepare the Spreadsheet<\/strong><\/div><div class=\"swell-block-step__body\"><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=\"468\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-35-1024x468.png\" alt=\"\" class=\"wp-image-17110\" style=\"width:672px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-35-1024x468.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-35-300x137.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-35-768x351.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-35.png 1408w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<dl class=\"swell-block-dl\">\n<dt class=\"swell-block-dl__dt\">Enter the Headers<\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li>Column A: Original URL<\/li>\n\n\n\n<li>Column B: Shortened URL<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong><strong>Input the URLs to be Shortened<\/strong><\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>Enter the URLs you want to shorten in column A, starting from row 2.<\/p>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Set the Sheet Name<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>Rename the sheet to <strong>&#8220;Shortened URLs&#8221;<\/strong>, as it will be referenced during the execution of the Apps Script.<\/p>\n<\/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\">Open Apps 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 id=\"block-9229ed9b-04ce-4146-bedc-84b1a7c87421\">Open a Google Spreadsheet and click on \u201c<strong>Extensions<\/strong>\u201d in the menu, then \u201c<strong>Apps Script<\/strong>\u201d to open the Apps Script editor.<\/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\"><strong>Set the API Key in Script Properties<\/strong><\/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=\"555\" height=\"660\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/b17152a330aa1cf28d99ed3ffffce21d.png\" alt=\"\" class=\"wp-image-16774\" style=\"width:361px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/b17152a330aa1cf28d99ed3ffffce21d.png 555w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/b17152a330aa1cf28d99ed3ffffce21d-252x300.png 252w\" sizes=\"(max-width: 555px) 100vw, 555px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-60\">Open the <strong>Google Apps Script Editor<\/strong> and select <strong>&#8220;Project Settings&#8221;<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"236\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/46edac4eac930bc218a3364cd9a1d808-1024x236.png\" alt=\"\" class=\"wp-image-16775\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/46edac4eac930bc218a3364cd9a1d808-1024x236.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/46edac4eac930bc218a3364cd9a1d808-300x69.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/46edac4eac930bc218a3364cd9a1d808-768x177.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/46edac4eac930bc218a3364cd9a1d808.png 1518w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-60\">Choose <strong>&#8220;Add Script Property&#8221;<\/strong>, and enter a key name (e.g., <code>\"URL_SHORTENER_API_KEY\"<\/code>) and your API key.<\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"356\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/dd3d811b86757518c164edc0f3ee8840-1024x356.png\" alt=\"\" class=\"wp-image-17105\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/dd3d811b86757518c164edc0f3ee8840-1024x356.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/dd3d811b86757518c164edc0f3ee8840-300x104.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/dd3d811b86757518c164edc0f3ee8840-768x267.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/dd3d811b86757518c164edc0f3ee8840-1536x534.png 1536w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/dd3d811b86757518c164edc0f3ee8840.png 1589w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Once entered, click <strong>&#8220;Save Script Properties&#8221;<\/strong>.<\/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\"><strong>Create the Script<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"1024\" height=\"472\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662-1024x472.png\" alt=\"\" class=\"wp-image-16191\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662-1024x472.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662-300x138.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662-768x354.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/e5e524d3405a7a1c3cfaaf3f2b1cc662.png 1387w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"u-mb-ctrl u-mb-40\">Since the default <code>function myFunction() {}<\/code> is present, delete it and replace it with the script below.<\/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=\"function shortenUrls() {\n    var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(&quot;Shortened URLs&quot;); \/\/ Specify the sheet name\n    if (!sheet) {\n        Logger.log(&quot;The specified sheet was not found.&quot;);\n        return;\n    }\n    \n    var apiKey = PropertiesService.getScriptProperties().getProperty('URL_SHORTENER_API_KEY'); \/\/ Get API key from script properties\n    if (!apiKey) {\n        Logger.log(&quot;API key is not set.&quot;);\n        return;\n    }\n    \n    var lastRow = sheet.getLastRow();\n    for (var i = 2; i &lt;= lastRow; i++) { \/\/ Start from row 2 to skip headers\n        var longUrl = sheet.getRange(i, 1).getValue(); \/\/ Column A contains the original URLs\n        var existingShortUrl = sheet.getRange(i, 2).getValue(); \/\/ Column B stores shortened URLs\n        \n        \/\/ Generate shortened URL only if column B is empty and column A has a value\n        if (longUrl &amp;&amp; !existingShortUrl) {\n            var shortUrl = shortenUrlWithXgd(longUrl, apiKey);\n            sheet.getRange(i, 2).setValue(shortUrl); \/\/ Write the shortened URL in column B\n        }\n    }\n}\n\nfunction shortenUrlWithXgd(longUrl, apiKey) {\n    var url = &quot;https:\/\/xgd.io\/V1\/shorten?url=&quot; + encodeURIComponent(longUrl) + &quot;&amp;key=&quot; + encodeURIComponent(apiKey);\n\n    var options = {\n        method: &quot;GET&quot;,\n        muteHttpExceptions: true\n    };\n    \n    var response = UrlFetchApp.fetch(url, options);\n    \n    if (response.getResponseCode() !== 200) {\n        Logger.log(&quot;Error: &quot; + response.getContentText());\n        throw new Error(&quot;Failed to shorten URL. Status code: &quot; + response.getResponseCode());\n    }\n    \n    var data = JSON.parse(response.getContentText());\n    Logger.log(&quot;Shortened URL: &quot; + data.shorturl); \/\/ Log the shortened URL\n    return data.shorturl; \/\/ Return the shortened URL\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\">shortenUrls<\/span><span style=\"color: #F8F8F2\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> sheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> SpreadsheetApp.<\/span><span style=\"color: #A6E22E\">getActiveSpreadsheet<\/span><span style=\"color: #F8F8F2\">().<\/span><span style=\"color: #A6E22E\">getSheetByName<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Shortened URLs&quot;<\/span><span style=\"color: #F8F8F2\">); <\/span><span style=\"color: #88846F\">\/\/ Specify the sheet name<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">sheet) {<\/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 specified sheet was not found.&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #F92672\">return<\/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>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> apiKey <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> PropertiesService.<\/span><span style=\"color: #A6E22E\">getScriptProperties<\/span><span style=\"color: #F8F8F2\">().<\/span><span style=\"color: #A6E22E\">getProperty<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&#39;URL_SHORTENER_API_KEY&#39;<\/span><span style=\"color: #F8F8F2\">); <\/span><span style=\"color: #88846F\">\/\/ Get API key from script properties<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">apiKey) {<\/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;API key is not set.&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #F92672\">return<\/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>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> lastRow <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getLastRow<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">for<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> i <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F8F8F2\">; i <\/span><span style=\"color: #F92672\">&lt;=<\/span><span style=\"color: #F8F8F2\"> lastRow; i<\/span><span style=\"color: #F92672\">++<\/span><span style=\"color: #F8F8F2\">) { <\/span><span style=\"color: #88846F\">\/\/ Start from row 2 to skip headers<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> longUrl <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(i, <\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValue<\/span><span style=\"color: #F8F8F2\">(); <\/span><span style=\"color: #88846F\">\/\/ Column A contains the original URLs<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> existingShortUrl <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(i, <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValue<\/span><span style=\"color: #F8F8F2\">(); <\/span><span style=\"color: #88846F\">\/\/ Column B stores shortened URLs<\/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\">\/\/ Generate shortened URL only if column B is empty and column A has a value<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (longUrl <\/span><span style=\"color: #F92672\">&amp;&amp;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">existingShortUrl) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> shortUrl <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">shortenUrlWithXgd<\/span><span style=\"color: #F8F8F2\">(longUrl, apiKey);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(i, <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">setValue<\/span><span style=\"color: #F8F8F2\">(shortUrl); <\/span><span style=\"color: #88846F\">\/\/ Write the shortened URL in column B<\/span><\/span>\n<span class=\"line\"><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>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #66D9EF; font-style: italic\">function<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">shortenUrlWithXgd<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #FD971F; font-style: italic\">longUrl<\/span><span style=\"color: #F8F8F2\">, <\/span><span style=\"color: #FD971F; font-style: italic\">apiKey<\/span><span style=\"color: #F8F8F2\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> url <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E6DB74\">&quot;https:\/\/xgd.io\/V1\/shorten?url=&quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">encodeURIComponent<\/span><span style=\"color: #F8F8F2\">(longUrl) <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E6DB74\">&quot;&amp;key=&quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">encodeURIComponent<\/span><span style=\"color: #F8F8F2\">(apiKey);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> options <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        method: <\/span><span style=\"color: #E6DB74\">&quot;GET&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        muteHttpExceptions: <\/span><span style=\"color: #AE81FF\">true<\/span><\/span>\n<span class=\"line\"><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: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> response <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> UrlFetchApp.<\/span><span style=\"color: #A6E22E\">fetch<\/span><span style=\"color: #F8F8F2\">(url, options);<\/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: #A6E22E\">getResponseCode<\/span><span style=\"color: #F8F8F2\">() <\/span><span style=\"color: #F92672\">!==<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">200<\/span><span style=\"color: #F8F8F2\">) {<\/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;Error: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> response.<\/span><span style=\"color: #A6E22E\">getContentText<\/span><span style=\"color: #F8F8F2\">());<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #F92672\">throw<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">new<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">Error<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Failed to shorten URL. Status code: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> response.<\/span><span style=\"color: #A6E22E\">getResponseCode<\/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>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> data <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> JSON.<\/span><span style=\"color: #A6E22E\">parse<\/span><span style=\"color: #F8F8F2\">(response.<\/span><span style=\"color: #A6E22E\">getContentText<\/span><span style=\"color: #F8F8F2\">());<\/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;Shortened URL: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> data.shorturl); <\/span><span style=\"color: #88846F\">\/\/ Log the shortened URL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\"> data.shorturl; <\/span><span style=\"color: #88846F\">\/\/ Return the shortened URL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"swell-block-accordion\">\n<details class=\"swell-block-accordion__item\" data-swl-acc=\"wrapper\"><summary class=\"swell-block-accordion__title\" data-swl-acc=\"header\"><span class=\"swell-block-accordion__label\"><strong>Script Description<\/strong><\/span><span class=\"swell-block-accordion__icon c-switchIconBtn\" data-swl-acc=\"icon\" aria-hidden=\"true\" data-opened=\"false\"><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\"><code>shortenUrls<\/code> Function<\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>This is the main process that retrieves the URLs from column A of the spreadsheet and outputs the shortened URLs in column B.<\/p>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Retrieve the Sheet<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\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 sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(&quot;Shortened URLs&quot;); \/\/ Specify the sheet name\n    if (!sheet) {\n        Logger.log(&quot;The specified sheet was not found.&quot;);\n        return;\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\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> sheet <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> SpreadsheetApp.<\/span><span style=\"color: #A6E22E\">getActiveSpreadsheet<\/span><span style=\"color: #F8F8F2\">().<\/span><span style=\"color: #A6E22E\">getSheetByName<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Shortened URLs&quot;<\/span><span style=\"color: #F8F8F2\">); <\/span><span style=\"color: #88846F\">\/\/ Specify the sheet name<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">sheet) {<\/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 specified sheet was not found.&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    }<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The script retrieves the sheet named <strong>&#8220;Shortened URLs&#8221;<\/strong> from the spreadsheet.<\/li>\n\n\n\n<li>Feel free to change the sheet name as needed.<\/li>\n\n\n\n<li>However, ensure the sheet name is correct; otherwise, the script will not function properly.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Retrieve the API Key<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\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 apiKey = PropertiesService.getScriptProperties().getProperty('URL_SHORTENER_API_KEY'); \/\/ Get API key from script properties\n    if (!apiKey) {\n        Logger.log(&quot;API key is not set.&quot;);\n        return;\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\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> apiKey <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> PropertiesService.<\/span><span style=\"color: #A6E22E\">getScriptProperties<\/span><span style=\"color: #F8F8F2\">().<\/span><span style=\"color: #A6E22E\">getProperty<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&#39;URL_SHORTENER_API_KEY&#39;<\/span><span style=\"color: #F8F8F2\">); <\/span><span style=\"color: #88846F\">\/\/ Get API key from script properties<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">apiKey) {<\/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;API key is not set.&quot;<\/span><span style=\"color: #F8F8F2\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    }<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The script retrieves the API key stored in the <strong>Script Properties<\/strong>.<\/li>\n\n\n\n<li>If the API key is not set, an error message is logged, and the script terminates.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Batch URL Processing<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\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 lastRow = sheet.getLastRow();\n    for (var i = 2; i &lt;= lastRow; i++) { \/\/ Start from row 2 to skip headers\n        var longUrl = sheet.getRange(i, 1).getValue(); \/\/ Column A contains the original URLs\n        var existingShortUrl = sheet.getRange(i, 2).getValue(); \/\/ Column B stores shortened URLs\n        \n        \/\/ Generate shortened URL only if column B is empty and column A has a value\n        if (longUrl &amp;&amp; !existingShortUrl) {\n            var shortUrl = shortenUrlWithXgd(longUrl, apiKey);\n            sheet.getRange(i, 2).setValue(shortUrl); \/\/ Write the shortened URL in column B\n        }\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: #F8F8F2\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> lastRow <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getLastRow<\/span><span style=\"color: #F8F8F2\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">for<\/span><span style=\"color: #F8F8F2\"> (<\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> i <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F8F8F2\">; i <\/span><span style=\"color: #F92672\">&lt;=<\/span><span style=\"color: #F8F8F2\"> lastRow; i<\/span><span style=\"color: #F92672\">++<\/span><span style=\"color: #F8F8F2\">) { <\/span><span style=\"color: #88846F\">\/\/ Start from row 2 to skip headers<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> longUrl <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(i, <\/span><span style=\"color: #AE81FF\">1<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValue<\/span><span style=\"color: #F8F8F2\">(); <\/span><span style=\"color: #88846F\">\/\/ Column A contains the original URLs<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> existingShortUrl <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(i, <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">getValue<\/span><span style=\"color: #F8F8F2\">(); <\/span><span style=\"color: #88846F\">\/\/ Column B stores shortened URLs<\/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\">\/\/ Generate shortened URL only if column B is empty and column A has a value<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (longUrl <\/span><span style=\"color: #F92672\">&amp;&amp;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">!<\/span><span style=\"color: #F8F8F2\">existingShortUrl) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> shortUrl <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">shortenUrlWithXgd<\/span><span style=\"color: #F8F8F2\">(longUrl, apiKey);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">            sheet.<\/span><span style=\"color: #A6E22E\">getRange<\/span><span style=\"color: #F8F8F2\">(i, <\/span><span style=\"color: #AE81FF\">2<\/span><span style=\"color: #F8F8F2\">).<\/span><span style=\"color: #A6E22E\">setValue<\/span><span style=\"color: #F8F8F2\">(shortUrl); <\/span><span style=\"color: #88846F\">\/\/ Write the shortened URL in column B<\/span><\/span>\n<span class=\"line\"><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><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The script uses a loop (<code>for (var i = 2; i &lt;= lastRow; i++) { ... }<\/code>) to process each row from the 2nd row to the last row.<\/li>\n\n\n\n<li>Retrieves the URL from column A (<code>longUrl<\/code>).<\/li>\n\n\n\n<li>Checks if a shortened URL already exists in column B (<code>existingShortUrl<\/code>).<\/li>\n\n\n\n<li>If a URL is present in column A and column B is empty, it generates a shortened URL.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><code>shortenUrlWithXgd<\/code> Function<\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<p>This function handles the actual URL shortening process using the <strong>X.gd API<\/strong>.<\/p>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\">API\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u6e96\u5099<\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\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 url = &quot;https:\/\/xgd.io\/V1\/shorten?url=&quot; + encodeURIComponent(longUrl) + &quot;&amp;key=&quot; + encodeURIComponent(apiKey);\" 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\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> url <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E6DB74\">&quot;https:\/\/xgd.io\/V1\/shorten?url=&quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">encodeURIComponent<\/span><span style=\"color: #F8F8F2\">(longUrl) <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #E6DB74\">&quot;&amp;key=&quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">encodeURIComponent<\/span><span style=\"color: #F8F8F2\">(apiKey);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>var url = \"https:\/\/xgd.io\/V1\/shorten?url=\" + encodeURIComponent(longUrl) + \"&amp;key=\" + encodeURIComponent(apiKey);<\/code> specifies the endpoint for the <strong>X.gd API<\/strong> and appends the long URL and API key to the request.<\/li>\n\n\n\n<li>Using<code>encodeURIComponent()<\/code>ensures the URL and API key are properly encoded, allowing the request to be sent securely.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Sending the Request<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\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 options = {\n        method: &quot;GET&quot;,\n        muteHttpExceptions: true\n    };\n    \n    var response = UrlFetchApp.fetch(url, options);\" 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\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> options <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        method: <\/span><span style=\"color: #E6DB74\">&quot;GET&quot;<\/span><span style=\"color: #F8F8F2\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        muteHttpExceptions: <\/span><span style=\"color: #AE81FF\">true<\/span><\/span>\n<span class=\"line\"><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: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> response <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> UrlFetchApp.<\/span><span style=\"color: #A6E22E\">fetch<\/span><span style=\"color: #F8F8F2\">(url, options);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The script sends a GET request using<code>UrlFetchApp.fetch(url, options);<\/code> .<\/li>\n\n\n\n<li>The<code>muteHttpExceptions: true<\/code> option allows the script to capture detailed error information in case the request fails.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Error Checking<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\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=\"    if (response.getResponseCode() !== 200) {\n        Logger.log(&quot;Error: &quot; + response.getContentText());\n        throw new Error(&quot;Failed to shorten URL. Status code: &quot; + response.getResponseCode());\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\">    <\/span><span style=\"color: #F92672\">if<\/span><span style=\"color: #F8F8F2\"> (response.<\/span><span style=\"color: #A6E22E\">getResponseCode<\/span><span style=\"color: #F8F8F2\">() <\/span><span style=\"color: #F92672\">!==<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #AE81FF\">200<\/span><span style=\"color: #F8F8F2\">) {<\/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;Error: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> response.<\/span><span style=\"color: #A6E22E\">getContentText<\/span><span style=\"color: #F8F8F2\">());<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">        <\/span><span style=\"color: #F92672\">throw<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">new<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #A6E22E\">Error<\/span><span style=\"color: #F8F8F2\">(<\/span><span style=\"color: #E6DB74\">&quot;Failed to shorten URL. Status code: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> response.<\/span><span style=\"color: #A6E22E\">getResponseCode<\/span><span style=\"color: #F8F8F2\">());<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    }<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The script checks the request&#8217;s status code using <code>response.getResponseCode() !== 200<\/code>.<\/li>\n\n\n\n<li>If the status code is not <code>200<\/code>, an error message is logged to provide details about the failure.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Retrieve and Return the Shortened URL<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\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 data = JSON.parse(response.getContentText());\n    Logger.log(&quot;Shortened URL: &quot; + data.shorturl); \/\/ Log the shortened URL\n    return data.shorturl; \/\/ Return the shortened URL\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\">    <\/span><span style=\"color: #66D9EF; font-style: italic\">var<\/span><span style=\"color: #F8F8F2\"> data <\/span><span style=\"color: #F92672\">=<\/span><span style=\"color: #F8F8F2\"> JSON.<\/span><span style=\"color: #A6E22E\">parse<\/span><span style=\"color: #F8F8F2\">(response.<\/span><span style=\"color: #A6E22E\">getContentText<\/span><span style=\"color: #F8F8F2\">());<\/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;Shortened URL: &quot;<\/span><span style=\"color: #F8F8F2\"> <\/span><span style=\"color: #F92672\">+<\/span><span style=\"color: #F8F8F2\"> data.shorturl); <\/span><span style=\"color: #88846F\">\/\/ Log the shortened URL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">    <\/span><span style=\"color: #F92672\">return<\/span><span style=\"color: #F8F8F2\"> data.shorturl; <\/span><span style=\"color: #88846F\">\/\/ Return the shortened URL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F8F8F2\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The script parses the response content in JSON format and retrieves the shortened URL (<code>data.shorturl<\/code>).<\/li>\n\n\n\n<li>This shortened URL is then returned and set in column B of the spreadsheet.<\/li>\n<\/ul>\n<\/dd>\n\n\n\n<dt class=\"swell-block-dl__dt\"><strong>Advantages of the Script<\/strong><\/dt>\n\n\n\n<dd class=\"swell-block-dl__dd\">\n<ul class=\"wp-block-list\">\n<li><strong>Batch Processing<\/strong><br>The script automatically shortens multiple URLs entered in column A, significantly reducing manual work.<\/li>\n\n\n\n<li><strong>Avoiding Duplicate Processing<\/strong><br>Rows with existing shortened URLs in column B are skipped, preventing unnecessary API requests and saving resources.<\/li>\n\n\n\n<li><strong>Error Handling<\/strong><br>If an API request fails, the script logs an error message, making it easy to identify and resolve issues.<\/li>\n<\/ul>\n<\/dd>\n<\/dl>\n<\/div><\/details>\n<\/div>\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\"><strong>Save the Script<\/strong><\/div><div class=\"swell-block-step__body\">\n<figure class=\"wp-block-image size-large u-mb-ctrl u-mb-40\"><img decoding=\"async\" width=\"1024\" height=\"439\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-1024x439.png\" alt=\"\" class=\"wp-image-17106\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-1024x439.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-300x129.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-768x329.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-1536x659.png 1536w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a.png 1576w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Once you\u2019ve written the script, save it with a descriptive name.<\/p>\n\n\n\n<p>(Example: <strong>&#8220;Shortened URLs&#8221;<\/strong>)<\/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\"><strong>Run the Script<\/strong><\/div><div class=\"swell-block-step__body\">\n<figure class=\"wp-block-image size-large u-mb-ctrl u-mb-40\"><img decoding=\"async\" width=\"1024\" height=\"439\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-1-1024x439.png\" alt=\"\" class=\"wp-image-17107\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-1-1024x439.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-1-300x129.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-1-768x329.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-1-1536x659.png 1536w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/fa51246230789cb71eb9fed2a2b6253a-1.png 1576w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"u-mb-ctrl u-mb-40\">When you execute the script, shortened URLs will be generated and displayed in the spreadsheet.<\/p>\n\n\n\n<div class=\"wp-block-group is-style-big_icon_memo u-mb-ctrl u-mb-60\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>If you&#8217;re running the script for the first time, you need to authorize it.<\/p>\n\n\n\n<p><strong>Therefore, press &#8220;<strong>Review Permissions.<\/strong>&#8220;<\/strong><\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-50\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"882\" height=\"345\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79.png\" alt=\"\" class=\"wp-image-15938\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79.png 882w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79-300x117.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/image-79-768x300.png 768w\" sizes=\"(max-width: 882px) 100vw, 882px\" \/><\/figure>\n<\/div>\n\n\n<div class=\"swell-block-accordion\">\n<details class=\"swell-block-accordion__item\" data-swl-acc=\"wrapper\"><summary class=\"swell-block-accordion__title\" data-swl-acc=\"header\"><span class=\"swell-block-accordion__label\">Detailed Authorization Steps<\/span><span class=\"swell-block-accordion__icon c-switchIconBtn\" data-swl-acc=\"icon\" aria-hidden=\"true\" data-opened=\"false\"><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<p><strong>Press &#8220;Advanced.&#8221;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full u-mb-ctrl u-mb-50\"><img decoding=\"async\" width=\"1272\" height=\"688\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d.jpg\" alt=\"\" class=\"wp-image-15939\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d.jpg 1272w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d-300x162.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d-1024x554.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/188993dfac23ed4b35c326d75de2796d-768x415.jpg 768w\" sizes=\"(max-width: 1272px) 100vw, 1272px\" \/><\/figure>\n\n\n\n\n\n\n\n<p><strong>Press &#8220;Go to Untitled project (Unsafe).&#8221;<\/strong><\/p>\n\n\n<div class=\"wp-block-image u-mb-ctrl u-mb-50\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"1305\" height=\"893\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9.jpg\" alt=\"\" class=\"wp-image-15940\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9.jpg 1305w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9-300x205.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9-1024x701.jpg 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/b7775751f92380510b389302eaafe1b9-768x526.jpg 768w\" sizes=\"(max-width: 1305px) 100vw, 1305px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>After that, press &#8220;Allow.&#8221;<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-full is-resized\"><img decoding=\"async\" width=\"955\" height=\"543\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049.jpg\" alt=\"\" class=\"wp-image-15941\" style=\"width:566px;height:auto\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049.jpg 955w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049-300x171.jpg 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/7ebb34b4d2c42fa532ad1c35c1ec1049-768x437.jpg 768w\" sizes=\"(max-width: 955px) 100vw, 955px\" \/><\/figure>\n<\/div>\n\n\n\n<\/div><\/details>\n<\/div>\n<\/div><\/div>\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\"><strong>Shortened URLs Generated in Column B<\/strong><\/div><div class=\"swell-block-step__body\"><div class=\"wp-block-image u-mb-ctrl u-mb-40\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" width=\"1405\" height=\"890\" src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34.png\" alt=\"\" class=\"wp-image-17109\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34.png 1405w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34-300x190.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34-1024x649.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/image-34-768x486.png 768w\" sizes=\"(max-width: 1405px) 100vw, 1405px\" \/><\/figure>\n<\/div>\n\n\n<p>Based on the URLs entered in column A, shortened URLs are generated and displayed in column B.<\/p>\n\n\n\n<p>To prevent overwriting, the script skips rows where a shortened URL already exists in column B, processing only the URLs that have not yet been shortened.<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading u-mb-ctrl u-mb-30\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list has-border -border02 is-style-good_list u-mb-ctrl u-mb-40 has-swl-pale-03-background-color has-background\">\n<li>If you want to shorten URLs one at a time, using a Chrome extension is convenient.<\/li>\n\n\n\n<li>For bulk URL shortening, Google Apps Script is the better option.<\/li>\n<\/ul>\n\n\n\n<p>In this article, we introduced a method to <strong>bulk shorten multiple URLs<\/strong> using <strong>Google Sheets<\/strong> and <strong>Google Apps Script<\/strong>.<\/p>\n\n\n\n<p>While a Chrome extension is great for shortening individual URLs, GAS allows you to efficiently process large numbers of URLs at once, making it ideal for handling bulk tasks.<\/p>\n\n\n\n<p class=\"u-mb-ctrl u-mb-30\">We hope this helps you streamline your workflow and improve efficiency.<\/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\/2025\/01\/693efd41d0b28c27d46d74413cf396e4-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\/short-url-creation\/\">Simplify URL Shortening: Create and Copy Short URLs with a Single Click Using Chrome Extensions<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Sharing long URLs via social media or email can look cluttered and take up unnecessary space. This is where shortened URLs come in handy, but visiting a dedi&#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-20\"><ul class=\"p-postList -type-card -pc-col3 -sp-col1\"><li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/googlesheets-xlookup\/\" class=\"p-postList__link\">\n\t\t<div class=\"p-postList__thumb c-postThumb\">\n\t<figure class=\"c-postThumb__figure\">\n\t\t<img decoding=\"async\" width=\"1024\" height=\"538\"  src=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/a98b1120712ae2558c294773114e59b3-2-1024x538.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/a98b1120712ae2558c294773114e59b3-2-1024x538.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/a98b1120712ae2558c294773114e59b3-2-300x158.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/a98b1120712ae2558c294773114e59b3-2-768x403.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2025\/01\/a98b1120712ae2558c294773114e59b3-2.png 1200w\" sizes=\"auto, (min-width: 960px) 400px, 100vw\" loading=\"lazy\" >\t<\/figure>\n\t\t\t<span class=\"c-postThumb__cat icon-folder\" data-cat-id=\"12\">Google Sheets<\/span>\n\t<\/div>\n\t\t\t\t\t<div class=\"p-postList__body\">\n\t\t\t\t<h2 class=\"p-postList__title\">Master XLOOKUP: Simplify Data Search and Learn the Key Differences from VLOOKUP and HLOOKUP<\/h2>\t\t\t\t\t\t\t\t<div class=\"p-postList__meta\">\n\t\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-17\" aria-label=\"\u516c\u958b\u65e5\">2025\u5e741\u670817\u65e5<\/time><\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\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__thumb c-postThumb\">\n\t<figure class=\"c-postThumb__figure\">\n\t\t<img decoding=\"async\" width=\"1024\" height=\"538\"  src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/1d36b191b935e2fb6a033cb4e78d867a-1024x538.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/1d36b191b935e2fb6a033cb4e78d867a-1024x538.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/1d36b191b935e2fb6a033cb4e78d867a-300x158.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/1d36b191b935e2fb6a033cb4e78d867a-768x403.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/11\/1d36b191b935e2fb6a033cb4e78d867a.png 1200w\" sizes=\"auto, (min-width: 960px) 400px, 100vw\" loading=\"lazy\" >\t<\/figure>\n\t\t\t<span class=\"c-postThumb__cat icon-folder\" data-cat-id=\"12\">Google Sheets<\/span>\n\t<\/div>\n\t\t\t\t\t<div class=\"p-postList__body\">\n\t\t\t\t<h2 class=\"p-postList__title\">Boost Productivity: Automate Gmail to Multiple Recipients with Google Sheets and Apps Script<\/h2>\t\t\t\t\t\t\t\t<div class=\"p-postList__meta\">\n\t\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\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t<\/a>\n<\/li>\n<li class=\"p-postList__item\">\n\t<a href=\"https:\/\/84office.jp\/en\/gas-pop-up\/\" class=\"p-postList__link\">\n\t\t<div class=\"p-postList__thumb c-postThumb\">\n\t<figure class=\"c-postThumb__figure\">\n\t\t<img decoding=\"async\" width=\"1024\" height=\"538\"  src=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac-1024x538.png\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" srcset=\"https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac-1024x538.png 1024w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac-300x158.png 300w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac-768x403.png 768w, https:\/\/84office.jp\/wp-content\/uploads\/2024\/12\/f7db322d686e3090883637bf91b1d3ac.png 1200w\" sizes=\"auto, (min-width: 960px) 400px, 100vw\" loading=\"lazy\" >\t<\/figure>\n\t\t\t<span class=\"c-postThumb__cat icon-folder\" data-cat-id=\"12\">Google Sheets<\/span>\n\t<\/div>\n\t\t\t\t\t<div class=\"p-postList__body\">\n\t\t\t\t<h2 class=\"p-postList__title\">Enhance User Interaction with Google Apps Script: How to Add Confirmation Pop-Ups to Prevent Mistakes<\/h2>\t\t\t\t\t\t\t\t<div class=\"p-postList__meta\">\n\t\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-31\" aria-label=\"\u516c\u958b\u65e5\">2024\u5e7412\u670831\u65e5<\/time><\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\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<div class=\"wp-block-group is-style-emboss_box has-swl-pale-02-background-color has-background\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>\u5f0a\u793e\u3067\u306f\u3001Google Apps Script\uff08GAS\uff09\u3092\u6d3b\u7528\u3057\u305f\u696d\u52d9\u52b9\u7387\u5316\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>GAS\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3084\u30a8\u30e9\u30fc\u5bfe\u5fdc\u306b\u304a\u56f0\u308a\u306e\u969b\u306f\u3001\u305c\u3072\u304a\u6c17\u8efd\u306b\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001IT\u30c4\u30fc\u30eb\u306e\u5c0e\u5165\u652f\u63f4\u3084IT\u5c0e\u5165\u88dc\u52a9\u91d1\u306e\u7533\u8acb\u30b5\u30dd\u30fc\u30c8\u3082\u884c\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u8cb4\u65b9\u306e\u696d\u52d9\u6539\u5584\u3092\u5168\u529b\u3067\u30b5\u30dd\u30fc\u30c8\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/84office.jp\/contact\/\">\u304a\u554f\u3044\u5408\u308f\u305b\u306f\u3053\u3061\u3089<\/a><\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In our previous article (&#8220;Simplify URL Shortening: Create and Copy Short URLs with a Single Click Using  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":17112,"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=15631","footnotes":""},"categories":[12],"tags":[],"class_list":["post-17099","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\/17099","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=17099"}],"version-history":[{"count":5,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/17099\/revisions"}],"predecessor-version":[{"id":17147,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/posts\/17099\/revisions\/17147"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media\/17112"}],"wp:attachment":[{"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/media?parent=17099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/categories?post=17099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/84office.jp\/wp-json\/wp\/v2\/tags?post=17099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}