<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>HTML on tanaike - Google Apps Script, Gemini API, and Developer Tips</title>
    <link>https://tanaikech.github.io/tags/html/</link>
    <description>Recent content in HTML on tanaike - Google Apps Script, Gemini API, and Developer Tips</description>
    <generator>Hugo</generator>
    <language>ja</language>
    <copyright>&amp;copy; 2026. All rights reserved.</copyright>
    <lastBuildDate>Fri, 23 Aug 2024 11:32:58 +0900</lastBuildDate>
    <atom:link href="https://tanaikech.github.io/tags/html/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Expanding Gemini API&#39;s Capabilities: A Practical Solution for Web Content Summarization</title>
      <link>https://tanaikech.github.io/2024/08/23/expanding-gemini-apis-capabilities-a-practical-solution-for-web-content-summarization/</link>
      <pubDate>Fri, 23 Aug 2024 11:32:58 +0900</pubDate>
      <guid>https://tanaikech.github.io/2024/08/23/expanding-gemini-apis-capabilities-a-practical-solution-for-web-content-summarization/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/ba6ae7972838e5a8f0adbec62a722f75&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;abstract&#34;&gt;Abstract&lt;/h1&gt;&#xA;&lt;p&gt;This study proposes a workaround to address the Gemini API&amp;rsquo;s current inability to directly process web content from URLs. By utilizing Google Apps Script, the method extracts relevant information from a specified URL and feeds it into the API for summarization. This approach offers a solution for generating comprehensive summaries from web-based content until the API&amp;rsquo;s limitations are resolved.&lt;/p&gt;&#xA;&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;While Gemini API offers powerful text generation capabilities, it currently faces limitations in directly accessing and processing web content from URLs. When prompted to summarize an article at a specific URL like &lt;code&gt;Summarize the article at the following URL. https://###&lt;/code&gt;, the API often returns an error message indicating its inability to retrieve the necessary information. This limitation arises from the API&amp;rsquo;s current design, which may not be equipped to handle web requests and parse HTML content.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Report: Values to transfer between Javascript and Google Apps Script with google.script.run</title>
      <link>https://tanaikech.github.io/2023/08/28/report-values-to-transfer-between-javascript-and-google-apps-script-with-google.script.run/</link>
      <pubDate>Mon, 28 Aug 2023 10:40:43 +0900</pubDate>
      <guid>https://tanaikech.github.io/2023/08/28/report-values-to-transfer-between-javascript-and-google-apps-script-with-google.script.run/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/9927dc5c12ebca118ff8f3f4d539c95d&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://tanaikech.github.io/image-storage/20230828a/fig1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;At the Google Apps Script project, the values can be transferred from HTML to Google Apps Script using &lt;code&gt;google.script.run&lt;/code&gt; with Javascript. In this case, unfortunately, the values of all types cannot be transferred. In the official document, it says as follows. &lt;a href=&#34;https://developers.google.com/apps-script/guides/html/reference/run#parameters&#34;&gt;Ref&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Most types are legal, but not Date, Function, or DOM element besides form; see description&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Legal parameters are JavaScript primitives like a Number, Boolean, String, or null, as well as JavaScript objects and arrays that are composed of primitives, objects, and arrays. A form element within the page is also legal as a parameter, but it must be the function’s only parameter. Requests fail if you attempt to pass a Date, Function, DOM element besides a form, or other prohibited type, including prohibited types inside objects or arrays. Objects that create circular references will also fail, and undefined fields within arrays become null. Note that an object passed to the server becomes a copy of the original. If a server function receives an object and changes its properties, the properties on the client are not affected.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Converting Google Spreadsheet to HTML Table using Google Apps Script</title>
      <link>https://tanaikech.github.io/2023/05/21/converting-google-spreadsheet-to-html-table-using-google-apps-script/</link>
      <pubDate>Sun, 21 May 2023 14:44:47 +0900</pubDate>
      <guid>https://tanaikech.github.io/2023/05/21/converting-google-spreadsheet-to-html-table-using-google-apps-script/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/61932a6acfe02e53ce9d5bca9078c536&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://tanaikech.github.io/image-storage/20230521a/fig1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is a sample script for converting Google Spreadsheet to an HTML table using Google Apps Script.&lt;/p&gt;&#xA;&lt;p&gt;There is the case that it is required to convert a sheet in a Google Spreadsheet to an HTML table. For example, there might be a situation that a sheet in a Google Spreadsheet is sent as an email including an HTML table. And, there might be a situation in which a sheet in a Google Spreadsheet is published to an HTML page including the converted HTML table. I have published the method for achieving this before. &lt;a href=&#34;https://github.com/tanaikech/RichTextApp&#34;&gt;Ref&lt;/a&gt; But, in that case, the column width, the row height, merged cells, and the images in the cells couldn&amp;rsquo;t be used. When those are included in the script, the script becomes complicated. So, I couldn&amp;rsquo;t include it. But, recently, I have come up with a simple method for achieving this. In this post. I would like to introduce a sample script for converting a sheet in a Google Spreadsheet to HTML.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Issue of HTML form with Input tab of Type File with google.script.run</title>
      <link>https://tanaikech.github.io/2023/02/15/issue-of-html-form-with-input-tab-of-type-file-with-google.script.run/</link>
      <pubDate>Wed, 15 Feb 2023 21:30:36 +0900</pubDate>
      <guid>https://tanaikech.github.io/2023/02/15/issue-of-html-form-with-input-tab-of-type-file-with-google.script.run/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/9590b01e4d363d724c458b5cbc87d041&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Today, I discussed with Riël Notermans an issue with the HTML form with the input tab of &lt;code&gt;type=&amp;quot;file&amp;quot;&lt;/code&gt; with &lt;code&gt;google.script.run&lt;/code&gt;. Through this discussion, the reason for this issue could be found. When you use the input tab of &lt;code&gt;type=&amp;quot;file&amp;quot;&lt;/code&gt; in the HTML form, and you want to send the file content with &lt;code&gt;google.script.run&lt;/code&gt;, I thought that this post might be useful for other users. So, I posted it here.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Benchmark: Process cost for HTML Template using Google Apps Script</title>
      <link>https://tanaikech.github.io/2022/06/07/benchmark-process-cost-for-html-template-using-google-apps-script/</link>
      <pubDate>Tue, 07 Jun 2022 11:35:46 +0900</pubDate>
      <guid>https://tanaikech.github.io/2022/06/07/benchmark-process-cost-for-html-template-using-google-apps-script/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/f1436d88423077115d2c249862f12f17&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;When we use HTML in the Google Apps Script project, in order to show the values from the Google Apps Script side, the HTML template is used. When I used the HTML template with a large value, I understood that the process cost can be reduced by devising a script. In this report, I would like to introduce the process cost of the HTML template using the benchmark.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Simply Converting HTML to Plain Text using Google Apps Script</title>
      <link>https://tanaikech.github.io/2022/04/22/simply-converting-html-to-plain-text-using-google-apps-script/</link>
      <pubDate>Fri, 22 Apr 2022 10:21:48 +0900</pubDate>
      <guid>https://tanaikech.github.io/2022/04/22/simply-converting-html-to-plain-text-using-google-apps-script/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/2779ee59a199011e3f48a1fa92879a68&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is a sample script for simply converting HTML to plain text using Google Apps Script.&lt;/p&gt;&#xA;&lt;h2 id=&#34;sample-values&#34;&gt;Sample values&lt;/h2&gt;&#xA;&lt;h3 id=&#34;html-input-value&#34;&gt;HTML (input value)&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;div&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;id&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sample1&amp;#34;&lt;/span&gt;&amp;gt;sample text1&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;div&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;div&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;id&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sample2&amp;#34;&lt;/span&gt;&amp;gt;sample text2&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;div&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;ul&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;id&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sample3&amp;#34;&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;sample list 1&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;sample list 2&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;ul&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;table&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;id&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;sample4&amp;#34;&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;tbody&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;tr&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;a1&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;b1&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;c1&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;tr&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;tr&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;a2&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;b2&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;c2&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;td&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;tr&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;tbody&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;table&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;text-output-value&#34;&gt;Text (output value)&lt;/h3&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sample text1&#xD;&#xA;sample text2&#xD;&#xA;&#xD;&#xA;   - sample list 1&#xD;&#xA;   - sample list 2&#xD;&#xA;&#xD;&#xA;a1 b1 c1&#xD;&#xA;a2 b2 c2&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;sample-script&#34;&gt;Sample script&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;myFunction&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sampleHTML&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;`&amp;lt;div id=&amp;#34;sample1&amp;#34;&amp;gt;sample text1&amp;lt;/div&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;lt;div id=&amp;#34;sample2&amp;#34;&amp;gt;sample text2&amp;lt;/div&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;lt;ul id=&amp;#34;sample3&amp;#34;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;  &amp;lt;li&amp;gt;sample list 1&amp;lt;/li&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;  &amp;lt;li&amp;gt;sample list 2&amp;lt;/li&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;lt;/ul&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;lt;table id=&amp;#34;sample4&amp;#34;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;  &amp;lt;tbody&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;    &amp;lt;tr&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;      &amp;lt;td&amp;gt;a1&amp;lt;/td&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;      &amp;lt;td&amp;gt;b1&amp;lt;/td&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;      &amp;lt;td&amp;gt;c1&amp;lt;/td&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;    &amp;lt;/tr&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;    &amp;lt;tr&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;      &amp;lt;td&amp;gt;a2&amp;lt;/td&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;      &amp;lt;td&amp;gt;b2&amp;lt;/td&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;      &amp;lt;td&amp;gt;c2&amp;lt;/td&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;    &amp;lt;/tr&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;  &amp;lt;/tbody&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;lt;/table&amp;gt;`&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;temp&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;GmailApp&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;createDraft&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;, { &lt;span style=&#34;color:#a6e22e&#34;&gt;htmlBody&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sampleHTML&lt;/span&gt; });&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;plainText&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;temp&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;getMessage&lt;/span&gt;().&lt;span style=&#34;color:#a6e22e&#34;&gt;getPlainBody&lt;/span&gt;();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#a6e22e&#34;&gt;temp&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;deleteDraft&lt;/span&gt;();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#a6e22e&#34;&gt;console&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;log&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;plainText&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#xA;&lt;li&gt;This method uses &lt;code&gt;GmailApp.createDraft&lt;/code&gt; for converting HTML to plain text. When a draft email is created with &lt;code&gt;GmailApp.createDraft&lt;/code&gt; by giving an HTML body, when the message content is retrieved with &lt;code&gt;getPlainBody()&lt;/code&gt;, the plain text is retrieved. This method uses this situation.&lt;/li&gt;&#xA;&lt;li&gt;When this sample script is run, the result in &amp;ldquo;Sample values&amp;rdquo; section can be obtained.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;note&#34;&gt;Note&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This method is a simple conversion from HTML to plain text. So I&amp;rsquo;m not sure whether this method can be used for all HTML data. Please be careful about this.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://developers.google.com/apps-script/reference/gmail/gmail-app#createDraft(String,String,String,Object)&#34;&gt;createDraft(recipient, subject, body, options)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://developers.google.com/apps-script/reference/gmail/gmail-message#getplainbody&#34;&gt;getPlainBody()&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>When &#39;//&#39; in template literal is used in a HTML file in script editor, it is used as a comment start</title>
      <link>https://tanaikech.github.io/2020/05/10/when-/-in-template-literal-is-used-in-a-html-file-in-script-editor-it-is-used-as-a-comment-start/</link>
      <pubDate>Sun, 10 May 2020 09:40:05 +0900</pubDate>
      <guid>https://tanaikech.github.io/2020/05/10/when-/-in-template-literal-is-used-in-a-html-file-in-script-editor-it-is-used-as-a-comment-start/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/5a6b92f9fcce4046ae4c3c79c28fe958&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;When &lt;code&gt;//&lt;/code&gt; in template literal is used in a HTML file in script editor, it is used as a comment start.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sample&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;`//`&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For example, when above script is used in a HTML file at the script editor, &lt;code&gt;;&amp;quot;&lt;/code&gt; of &lt;code&gt;const sample =`//`;&lt;/code&gt; is used as the comment.&lt;/p&gt;&#xA;&lt;h2 id=&#34;description&#34;&gt;Description&lt;/h2&gt;&#xA;&lt;p&gt;I would like to explain about this bug using the following sample flow.&lt;/p&gt;&#xA;&lt;h3 id=&#34;flow&#34;&gt;Flow&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Create new Spreadsheet and open the script editor. In this explanation, please use the container-bound script.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Parsing HTML using Google Apps Script</title>
      <link>https://tanaikech.github.io/2019/08/01/parsing-html-using-google-apps-script/</link>
      <pubDate>Thu, 01 Aug 2019 14:04:34 +0900</pubDate>
      <guid>https://tanaikech.github.io/2019/08/01/parsing-html-using-google-apps-script/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/e85193a89d041fed6122583739309786&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is a sample script for parsing HTML using Google Apps Script. When HTML data is converted to Google Document, the HTML data can be parsed and be converted to Google Document. In this case, the paragraphs, lists and tables are included. From this situation, I thought that this situation can be used for parsing HTML using Google Apps Script. So I could came up with this method.&lt;/p&gt;&#xA;&lt;p&gt;In the Sheet API, the HTML data can be put to the Spreadsheet with the PasteDataRequest. But unfortunately, in this case, I couldn&amp;rsquo;t distinguish between the body and tables.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Selecting Files in Google Drive using Select Box for Google Apps Script</title>
      <link>https://tanaikech.github.io/2017/09/17/selecting-files-in-google-drive-using-select-box-for-google-apps-script/</link>
      <pubDate>Sun, 17 Sep 2017 13:26:31 +0900</pubDate>
      <guid>https://tanaikech.github.io/2017/09/17/selecting-files-in-google-drive-using-select-box-for-google-apps-script/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/96166a32e7781fee22da9e498b2289d0&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is a sample script for selecting files in Google Drive using HTML select box for Google Apps Script.&lt;/p&gt;&#xA;&lt;h1 id=&#34;feature&#34;&gt;Feature&lt;/h1&gt;&#xA;&lt;p&gt;Feature of this sample.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It is a simple and space saving.&lt;/li&gt;&#xA;&lt;li&gt;When the folder is selected, the files in the folder are shown.&lt;/li&gt;&#xA;&lt;li&gt;When the file is selected, the ID of file is retrieved. Users can use this ID at GAS.&lt;/li&gt;&#xA;&lt;li&gt;When a folder is opened, all files in the folder are cached. By this, the second access of the folder is faster.&lt;/li&gt;&#xA;&lt;li&gt;It doesn&amp;rsquo;t retrieve all files in Google Drive at once, so the read of files from Google Drive becomes the minimum necessary.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;I will use this for applications that users need to select files on Google Drive.&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
