{"id":4774,"date":"2021-08-11T10:07:09","date_gmt":"2021-08-11T08:07:09","guid":{"rendered":"https:\/\/tecnocentres.org\/?p=4774"},"modified":"2021-08-11T11:43:06","modified_gmt":"2021-08-11T09:43:06","slug":"using-gas-to-create-web-applications-part-2","status":"publish","type":"post","link":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/","title":{"rendered":"Using GAS to create web applications (Part 2)"},"content":{"rendered":"<p style=\"text-align: justify;\">After <a href=\"https:\/\/tecnocentres.org\/en\/using-gas-to-create-web-applications-part-1\/\" target=\"_blank\" rel=\"noopener\">the first article<\/a> explaining a little about what web apps made with Google Apps Script (GAS) are, we are going to see in this second article how to create a simple one. And I will do it with a real example, related to the evaluation of students. I warn you that this article will be much more technical and that you will need knowledge of GAS, html, css styles and javascript. As my friends from the GEG Spain coordinators group say, it will be in &#8220;whale&#8221; language.<\/p>\n<p style=\"text-align: justify;\">We will create an application for students to fill in a KPSI (Knowledge and Prior Study Inventory) when they start a unit or project and fill it in again when they finish it. For those of you who are not familiar with the KPSI instrument, it is nothing more than a set of questions about the topic, where students do not have to give the answer, but must indicate whether they know the answer. It serves as a way to be aware of prior knowledge and to make the student aware of the progress he\/she has made at the end of the test.<\/p>\n<p style=\"text-align: justify;\">To make it easier to follow, in <a href=\"https:\/\/drive.google.com\/drive\/folders\/19TtTlTEO6KW7AKRXTwslWWTnjEl2X-Eq\" target=\"_blank\" rel=\"noopener\">this folder<\/a> you can find the final files, both the spreadsheet and the script with the code and the html files.<\/p>\n<p><!--more--><\/p>\n<p style=\"text-align: justify;\">We will make an application for students to answer the following 4-question KPSI.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4744 \" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/1-2.png\" alt=\"\" width=\"581\" height=\"301\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/1-2.png 787w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/1-2-300x156.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/1-2-768x398.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/1-2-640x332.png 640w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/p>\n<p style=\"text-align: justify;\">To start with, let&#8217;s create a spreadsheet (without any script) in order to save the data. The spreadsheet could look like the following (it can be found in the folder):<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4747 size-full\" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/2-2.png\" alt=\"\" width=\"1771\" height=\"331\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/2-2.png 1771w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/2-2-300x56.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/2-2-1024x191.png 1024w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/2-2-768x144.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/2-2-1536x287.png 1536w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/2-2-1040x194.png 1040w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/2-2-640x120.png 640w\" sizes=\"auto, (max-width: 1771px) 100vw, 1771px\" \/><\/p>\n<p style=\"text-align: justify;\">Next, let&#8217;s create a script (this script is always created on my drive, but can be moved to any folder we want).<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4694\" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-1.png\" alt=\"\" width=\"600\" height=\"408\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-1.png 1212w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-1-300x204.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-1-1024x696.png 1024w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-1-768x522.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-1-1040x707.png 1040w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-1-640x435.png 640w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p style=\"text-align: justify;\">The script will start with some constant variable definitions, the address of the sheet, the name of the sheets and the address of the user, and, for the moment, it will have only one function, the doGet function.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4750 \" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-2.png\" alt=\"\" width=\"863\" height=\"215\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-2.png 1152w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-2-300x75.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-2-1024x255.png 1024w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-2-768x191.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-2-1040x259.png 1040w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/3-2-640x159.png 640w\" sizes=\"auto, (max-width: 863px) 100vw, 863px\" \/><\/p>\n<p style=\"text-align: justify;\">As I said in the previous article, to create web apps you need to know GAS, html, css and javascript. So I won&#8217;t spend too much time explaining each function, otherwise this would be a complete course rather than an article.<\/p>\n<p style=\"text-align: justify;\">The doGet function is the only one that can serve html pages in web apps. Therefore, it is in this function where we will put the code. At the start, we will collect all the data in the spreadsheet. We check that the user who answers is in the list of students.<\/p>\n<pre>\/\/URL de la hoja de c\u00e1lculo\r\nconst full_control=\"https:\/\/docs.google.com\/spreadsheets\/d\/1iwl4xEoPuaFovufPr-YktmK0Z3jk8EvUmxQmgrreicE\/edit\";\r\n\r\n\/\/Nombre de la pesta\u00f1a de la hoja de c\u00e1lculo\r\nconst full=\"Hoja 1\";\r\n\r\n\/\/Reogemos la direcci\u00f3n del usuario l'adre\u00e7a de l'usuar\r\nconst usuari=Session.getActiveUser().getEmail();\r\n\r\nfunction doGet(e) {\r\n \/\/Comprobamos si el usuario est\u00e1 en la lista de alumnos\r\n var spreadsheet = SpreadsheetApp.openByUrl(full_control); \r\n var sheet = spreadsheet.getSheetByName(full);\r\n var rang = sheet.getDataRange();\r\n var alumnes = rang.getValues();\r\n var numRows = rang.getNumRows();\r\n let identificacio=0;\r\n for (let i=1;i&lt;numRows;i++){\r\n  if (alumnes[i][1]==usuari){\r\n   identificacio=1;\r\n  }\r\n }\r\n \/\/Si el alumno no est\u00e1 en la llista, se indica con un mensaje emergente\r\n if (identificacio==0){\r\n  return HtmlService.createHtmlOutputFromFile('html_no_autoritzado').setTitle(\"Aplicaci\u00f3n KPSI\")\r\n }else{\r\n\r\n}<\/pre>\n<p style=\"text-align: justify;\">In case the user is not in the list, we return an html. This html must be created in the script. In the code I have put, I have called it html_no_authoritzado.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4700\" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5.png\" alt=\"\" width=\"260\" height=\"181\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5.png 726w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-300x209.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-640x446.png 640w\" sizes=\"auto, (max-width: 260px) 100vw, 260px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4756 \" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/4-1.png\" alt=\"\" width=\"817\" height=\"284\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/4-1.png 1215w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/4-1-300x104.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/4-1-1024x356.png 1024w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/4-1-768x267.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/4-1-1040x361.png 1040w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/4-1-640x222.png 640w\" sizes=\"auto, (max-width: 817px) 100vw, 817px\" \/><\/p>\n<p>Although the application will be public on our domain (for those who know the URL), we have already made sure that only our students can use the application.<\/p>\n<p>Now we have to fill in the other part of the if, the else. If the user is one of our students, we will show him\/her the html page to fill in. We will call this page KPSI.html<\/p>\n<pre>\/\/Si el alumno no est\u00e1 en la llista, se indica con un mensaje emergente\r\nif (identificacio==0){\r\n  return HtmlService.createHtmlOutputFromFile('html_no_autoritzado').setTitle(\"Aplicaci\u00f3n KPSI\")\r\n}else{\r\n  \/\/Abrimos la pantalla de la aplicaci\u00f3n, pasando los par\u00e1metros necesarios\r\n  plantilla=HtmlService.createTemplateFromFile('KPSI');\r\n  plantilla.usuari=usuari;\r\n  plantilla.alumnes=alumnes;\r\n  return plantilla.evaluate().setTitle(\"Aplicaci\u00f3n KPSI\") \r\n}<\/pre>\n<p>Unlike when the user was not a student, when we used createHtmlOutputFromFile to display the html page, we now use createTemplateFromFile, which allows us to pass parameters. When the user is not a student, it is enough to display a message. Now, we have to show a header with the student&#8217;s email and, if he\/she has already answered the KPSI, we have to show his\/her previous answers. To do this, the user and the content of Sheet 1 must be passed as parameters.<\/p>\n<p>Let&#8217;s go now to the content of the KPSI page. We will start with two references within the header<\/p>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Aplicaci\u00f3n KPSI&lt;\/title&gt;\r\n&lt;base target=\"_top\"&gt;\r\n&lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-EVSTQN3\/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC\" crossorigin=\"anonymous\"&gt;\r\n&lt;?!= include('css.html'); ?&gt;<\/pre>\n<p>The first one (&lt;link href = &#8220;https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/css\/bootstrap.min.css&#8221; &#8230;) is to be able to use bootstrap styles to shape our page. It could be done by creating all the css ourselves, but it would be more complicated to make it adaptable to different screen sizes. If you don&#8217;t know the bootstrap classes, you can find the documentation <a href=\"https:\/\/getbootstrap.com\/docs\/5.1\/getting-started\/introduction\/\" target=\"_blank\" rel=\"noopener\">in this link<\/a>.<\/p>\n<p>The second one (&lt;?! = Include ( &#8216;css.html&#8217;);?&gt;) allows us to have our own stylesheet. We will have to create another html with the name css and put our styles.<\/p>\n<pre>&lt;style&gt;\r\n  div.cap\r\n  {\r\n    color:#ffffff;\r\n    background-color: gray;\r\n  }\r\n  div.titol{\r\n    font-weight: bold;\r\n    font-size: 1.4em;\r\n    height: 50px;\r\n  }\r\n&lt;\/style&gt;<\/pre>\n<div>\n<div style=\"text-align: justify;\">In addition, in the code file where the doGet function is, we will have to add a new function, include, which is the one that allows us to embed the styles we create in the css.<\/div>\n<pre>function include(filename) {\r\n \u00a0return\u00a0HtmlService.createHtmlOutputFromFile(filename)\r\n \u00a0\u00a0\u00a0\u00a0\u00a0.getContent();\r\n}<\/pre>\n<\/div>\n<p style=\"text-align: justify;\">But let&#8217;s not get distracted and continue with the KPSI.html page. Once the references are indicated in the head, we define a header inside the body. Taking advantage of bootstrap styles, we can create a grid as a background and place the fields where we want (in rows and columns). In addition, we add custom css to give the look we want (such as div &#8220;cap&#8221; and div &#8220;titol&#8221;, which are defined in the css.html).<\/p>\n<pre>&lt;html&gt;\r\n &lt;head&gt;\r\n  &lt;title&gt;KPSI&lt;\/title&gt;\r\n  &lt;base target=\"_top\"&gt;\r\n  &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-EVSTQN3\/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC\" crossorigin=\"anonymous\"&gt;\r\n  &lt;?!= include('css.html'); ?&gt;\r\n &lt;\/head&gt;\r\n &lt;body&gt;\r\n  &lt;div class=\"container\"&gt;\r\n   &lt;div class=\"row cap\"&gt;\r\n    &lt;div class=\"col titol\"&gt;\r\n      Aplicaci\u00f3 KPSI\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"col-2\"&gt;\r\n      Mail del alumno: &lt;?= usuari ?&gt;\r\n    &lt;\/div&gt;\r\n   &lt;\/div&gt;\r\n  &lt;div&gt;\r\n &lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>Notice that we have already made one of the parameters we have passed appear, the student&#8217;s email address. We simply indicate that it is javascript code with the symbols &lt;?\u00a0 \u00a0?&gt;.<\/p>\n<p>But let&#8217;s test that what we are doing works. If we have created all the files (html_unauthorised, KPSI and css), we use the Implement button and choose the New implementation option.<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4715 \" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/7-1.png\" alt=\"\" width=\"715\" height=\"261\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/7-1.png 1411w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/7-1-300x109.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/7-1-1024x374.png 1024w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/7-1-768x280.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/7-1-1040x380.png 1040w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/7-1-640x234.png 640w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/>We choose the type to be Web Application.<\/p>\n<p style=\"text-align: center;\"><span style=\"font-size: 1rem;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4718 \" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/8-1.png\" alt=\"\" width=\"242\" height=\"183\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/8-1.png 852w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/8-1-300x227.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/8-1-768x582.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/8-1-640x485.png 640w\" sizes=\"auto, (max-width: 242px) 100vw, 242px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\">We indicate a description (such as the version number), that we are the ones who run the application (we are the only ones who have access to the spreadsheet) and that it has access to any user of our domain (since we already control by code that it is a student).<\/p>\n<p style=\"text-align: center;\"><span style=\"font-size: 1rem;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4721\" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/9.png\" alt=\"\" width=\"459\" height=\"364\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/9.png 940w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/9-300x238.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/9-768x609.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/9-640x507.png 640w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\">Like all scripts, a screen will appear asking for access and we will have to grant permissions to the script. Once permissions have been granted, the address will appear for testing. If the address of our user is one of those listed in the spreadsheet, the following screen will appear.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4761 size-full\" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-1.png\" alt=\"\" width=\"1698\" height=\"126\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-1.png 1698w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-1-300x22.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-1-1024x76.png 1024w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-1-768x57.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-1-1536x114.png 1536w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-1-1040x77.png 1040w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/5-1-640x47.png 640w\" sizes=\"auto, (max-width: 1698px) 100vw, 1698px\" \/><\/p>\n<p>The background colour can easily be changed with our css. If we make changes to the code and want to test it again, instead of using the new implementation option, it is much better to use the test implementations option. Once we have done all the tests, we will do a new Implementation again to get the final address for the students to use.<\/p>\n<p>Now we have to continue working with the KPSI page so that the four questions that the students have to answer and the drop-downs appear. I assume that you know html and javascript, so I&#8217;ll put the code and comment on the most important things.<\/p>\n<div>\n<pre>&lt;html&gt;\r\n &lt;head&gt;\r\n  &lt;title&gt;Apliaci\u00f3n KPSI&lt;\/title&gt;\r\n  &lt;base target=\"_top\"&gt;\r\n  &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-EVSTQN3\/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC\" crossorigin=\"anonymous\"&gt;\r\n  &lt;?!= include('css.html'); ?&gt;\r\n &lt;\/head&gt;\r\n &lt;script&gt;\r\n  function habilitar(){\r\n   \/\/Al cambiar algun valor, se habilita el bot\u00f3n guardar\r\n   document.KPSI.btn_desar.disabled=false;\r\n  }\r\n  function guardar(){\r\n   google.script.run.guardar(document.forms[\"KPSI\"]);\u00a0 \/\/ejecuta la funci\u00f3n guardar del c\u00f3digo\r\n   document.KPSI.btn_desar.disabled=true; \/\/Deshabilitamos el bot\u00f3n\r\n   window.alert(\"Se han guardao los cambos correctamente\"); \/\/mostrar un mensage indicando que se ha guardado\r\n  }\r\n &lt;\/script&gt;\r\n &lt;body&gt;\r\n  &lt;div class=\"container\"&gt;\r\n   &lt;div class=\"row cap\"&gt;\r\n    &lt;div class=\"col titol\"&gt;\r\n     Aplicaci\u00f3n KPSI\r\n    &lt;\/div&gt;\r\n   &lt;div class=\"col-2\"&gt;\r\n    Mail del alumno: &lt;?= usuari ?&gt;\r\n   &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n &lt;div&gt;\r\n &lt;div class=\"container separador\"&gt;&lt;\/div&gt;\r\n &lt;div class=\"container\"&gt;\r\n  &lt;div class=\"row g-3\"&gt;\r\n  &lt;div class=\"col-md-4 titol\"&gt;\r\n   Alumnos\r\n  &lt;\/div&gt;\r\n  &lt;div class=\"col-md-2 titol\"&gt;\r\n   Inicio\r\n  &lt;\/div&gt;\r\n  &lt;div class=\"col-md-2 titol\"&gt;\r\n   Final\r\n  &lt;\/div&gt; \r\n &lt;\/div&gt; \r\n &lt;div class=\"container separador\"&gt;&lt;\/div&gt; \r\n &lt;div class=\"container\"&gt;\r\n  &lt;form name=\"KPSI\" id=\"KPSI\" action=\"javascript:;\"&gt;\r\n   &lt;? for (let i=2;i&lt;alumnes.length;i++){ \/\/Miramos en qu\u00e9 fila de la hoja de c\u00e1lculo est\u00e1n los datos del alumno que accede\r\n    if (alumnes[i][1]==usuari){\r\n     var fila=i;\r\n    }\r\n   }\r\n \r\n   for (let i=2;i&lt;alumnes[0].length;i=i+2){ ?&gt;\r\n    &lt;div class=\"row g-3\"&gt;\r\n    &lt;div class=\"col-md-4\"&gt;\r\n     &lt;label for=\"curs_grup\"&gt;&lt;?= alumnes[0][i]?&gt;&lt;\/label&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"col-md-2\"&gt;\r\n     &lt;select class=\"form-select\" name=\"inici[]\" onchange=\"habilitar()\"&gt;\r\n      &lt;option value=\"\"&gt;&lt;\/option&gt;\r\n      &lt;option value=\"1\" &lt;? if (alumnes[fila][i]==1){ ?&gt;selected&lt;? } ?&gt;&gt;No lo s\u00e9&lt;\/option&gt;\r\n      &lt;option value=\"2\" &lt;? if (alumnes[fila][i]==2){ ?&gt;selected&lt;? } ?&gt;&gt;No lo entiendo&lt;\/option&gt;\r\n      &lt;option value=\"3\" &lt;? if (alumnes[fila][i]==3){ ?&gt;selected&lt;? } ?&gt;&gt;Creo que s\u00ed que lo s\u00e9&lt;\/option&gt;\r\n      &lt;option value=\"4\" &lt;? if (alumnes[fila][i]==4){ ?&gt;selected&lt;? } ?&gt;&gt;Lo podr\u00eda explicar a mis compa\u00f1eros\/as sin dificultad&lt;\/option&gt;\r\n     &lt;\/select&gt;\r\n    &lt;\/div&gt;\r\n   &lt;div class=\"col-md-2\"&gt;\r\n    &lt;select class=\"form-select\" name=\"final[]\" onchange=\"habilitar()\"&gt;\r\n     &lt;option value=\"\"&gt;&lt;\/option&gt;\r\n     &lt;option value=\"1\" &lt;? if (alumnes[fila][i]==1){ ?&gt;selected&lt;? } ?&gt;&gt;No lo s\u00e9&lt;\/option&gt;\r\n     &lt;option value=\"2\" &lt;? if (alumnes[fila][i]==2){ ?&gt;selected&lt;? } ?&gt;&gt;No lo entiendo&lt;\/option&gt;\r\n     &lt;option value=\"3\" &lt;? if (alumnes[fila][i]==3){ ?&gt;selected&lt;? } ?&gt;&gt;Creo que s\u00ed que lo s\u00e9&lt;\/option&gt;\r\n     &lt;option value=\"4\" &lt;? if (alumnes[fila][i]==4){ ?&gt;selected&lt;? } ?&gt;&gt;Lo podr\u00eda explicar a mis compa\u00f1eros\/as sin dificultad&lt;\/option&gt;\r\n   &lt;\/select&gt;\r\n  &lt;\/div&gt; \r\n &lt;\/div&gt;\r\n &lt;div class=\"container separador2\"&gt;&lt;\/div&gt; \r\n &lt;? } ?&gt;\r\n&lt;\/div&gt;\r\n&lt;div class=\"container separador2\"&gt;&lt;\/div&gt;\r\n&lt;div class=\"container\"&gt;\r\n  &lt;div class=\"row g-3\"&gt;\r\n   &lt;div class=\"col-md-4\"&gt;&lt;\/div&gt;\r\n   &lt;div class=\"col-md-4\"&gt;&lt;\/div&gt;\r\n    &lt;input type=\"text\" class=\"form-control\" value=\"&lt;?= fila ?&gt;\" id=\"fila\" name=\"fila\" hidden&gt;\r\n   &lt;div class=\"col-md-2\"&gt;&lt;button class=\"btn btn-primary\" name=\"btn_desar\" id=\"btn_desar\" disabled onclick=\"guardar()\"&gt;Guardar&lt;\/button&gt;&lt;\/div&gt;\r\n &lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<\/div>\n<p>Basically, we have added a form and, with the for instruction, as many questions as have been indicated in the spreadsheet. As in the spreadsheet we have combined columns to be able to have the answers at the beginning and at the end together, we do the for with an increment of 2 of i (i = i + 2).<\/p>\n<p>Before, we looked at which row the user&#8217;s data was in so that we could show his previous answers, if he had done so. In order not to recalculate it later, we have added a hidden field in the form with this row number. Then we can pass it to the code to use it.<\/p>\n<p>In addition, we have added a couple of javascript functions. One in the select, onChange, so that the save button is only activated when a change is made.<\/p>\n<p>The second function, save, which is activated when the button is pressed, onclick, is the one that will return us to the code sheet, passing as parameters all the values that have been entered in the dropdowns. the function is very simple:<\/p>\n<pre>google.script.run.guardar(document.forms[\"KPSI\"]);\u00a0 \/\/ejecuta la funci\u00f3n guardar del c\u00f3digo\r\nwindow.alert(\"Se han guardao los cambios correctamente\"); \/\/mostrar un mensage indicando que se ha guardado<\/pre>\n<p style=\"text-align: justify;\">What is missing? Define the save function in the code. This is the function that will save the data in the spreadsheet.<\/p>\n<div>\n<pre>function guardar(KPSI){\r\n \/\/Recuperamos los valores del formulario\r\n var inici=KPSI[\"inici[]\"];\r\n var final=KPSI[\"final[]\"];\r\n var fila=parseInt(KPSI[\"fila\"]);\r\n\r\n \/\/Creamos una matriz con los valores inicio y final intercalados, igual que en la hoja de c\u00e1lculo\r\n var valors=[];\r\n valors[0]=[];\r\n let j=0;\r\n for (let i=0; i&lt;(inici.length+final.length);i=i+2){\r\n  valors[0][i]=inici[j];\r\n  valors[0][i+1]=final[j];\r\n  j++;\r\n }\r\n \/\/Guardoamos los valores en la hoja de c\u00e1lculo\r\n var spreadsheet = SpreadsheetApp.openByUrl(full_control); \r\n var sheet = spreadsheet.getSheetByName(full);\r\n sheet.getRange(fila+1,3,1,valors[0].length).setValues(valors);\r\n}<\/pre>\n<\/div>\n<p>And now we have reached the end. We have created a small web application where students log in, see the previous answers and can modify them.<\/p>\n<p>It would look like this.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4769\" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/6-2.png\" alt=\"\" width=\"713\" height=\"265\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/6-2.png 1679w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/6-2-300x111.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/6-2-1024x380.png 1024w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/6-2-768x285.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/6-2-1536x570.png 1536w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/6-2-1040x386.png 1040w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/6-2-640x237.png 640w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/p>\n<p>To polish it up, it would be good to check when students can change the answers. It doesn&#8217;t make much sense that at the end of the unit they can change the answers from the beginning. We could add a checkbox in the spreadsheet to say if the possibility of students&#8217; answers is activated for the start column and another one for the end column. We would take this value and in the selects we would add a conditional. If it is not allowed, in the html code I would add disable. Something like this:<\/p>\n<p>&lt;select class = &#8220;form-select&#8221; name = &#8220;start []&#8221; onChange = &#8220;enable ()&#8221; &lt;? if (allowed_start == false) {?&gt; disabled &lt;? }?&gt;<\/p>\n<p>But I&#8217;ll leave that to you. Once the script is finished and tested, you should implement it again. Note that if you make a new implementation, the URL changes. If you have already sent the URL to the students, it will be quite problematic, as the students will make a mess of it. If you want to make a new implementation without the URL changing, instead of using the new implementation option, you should use the Manage implementations option, edit the version and choose new version. This way, the implementation does not change and therefore the URL does not change either.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4735\" src=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/11.png\" alt=\"\" width=\"606\" height=\"479\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/11.png 1204w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/11-300x237.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/11-1024x808.png 1024w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/11-768x606.png 768w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/11-1040x821.png 1040w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/11-640x505.png 640w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/p>\n<p style=\"text-align: justify;\">I hope the article has been sufficiently comprehensive and that you can see how to create Web apps with Google apps script. I leave a 3rd part to explain how to work with different screens. As I said at the beginning, the only function that can display html is the doGet function. For example, the save function that we have created, cannot display any html page. Therefore, to make applications where we want more than one screen (pressing a button to display a different screen), we will have to do some tricks. I&#8217;ll tell you about it in the next article, which will be shorter and will close the trilogy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the first article explaining a little about what web apps made with Google Apps Script (GAS) are, we are going to see in this second article how to create a simple one. And I will do it with a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":4679,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83],"tags":[],"class_list":["post-4774","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-apps-script-en","post-archive"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using GAS to create web applications (Part 2) - Tecnocentres<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using GAS to create web applications (Part 2) - Tecnocentres\" \/>\n<meta property=\"og:description\" content=\"After the first article explaining a little about what web apps made with Google Apps Script (GAS) are, we are going to see in this second article how to create a simple one. And I will do it with a...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Tecnocentres\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-11T08:07:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-11T09:43:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/gas.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"748\" \/>\n\t<meta property=\"og:image:height\" content=\"221\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jaume Feliu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@jfeliua\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jaume Feliu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/\"},\"author\":{\"name\":\"Jaume Feliu\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/#\\\/schema\\\/person\\\/b2eb569e95072dedf967f0036be08adf\"},\"headline\":\"Using GAS to create web applications (Part 2)\",\"datePublished\":\"2021-08-11T08:07:09+00:00\",\"dateModified\":\"2021-08-11T09:43:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/\"},\"wordCount\":1691,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/tecnocentres.org\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/gas.jpg\",\"articleSection\":[\"Google apps script\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/\",\"url\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/\",\"name\":\"Using GAS to create web applications (Part 2) - Tecnocentres\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/tecnocentres.org\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/gas.jpg\",\"datePublished\":\"2021-08-11T08:07:09+00:00\",\"dateModified\":\"2021-08-11T09:43:06+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/#\\\/schema\\\/person\\\/b2eb569e95072dedf967f0036be08adf\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/tecnocentres.org\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/gas.jpg\",\"contentUrl\":\"https:\\\/\\\/tecnocentres.org\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/gas.jpg\",\"width\":748,\"height\":221},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2021\\\/08\\\/11\\\/using-gas-to-create-web-applications-part-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inici\",\"item\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using GAS to create web applications (Part 2)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/\",\"name\":\"Tecnocentres\",\"description\":\"Blog de Jaume Feliu\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/#\\\/schema\\\/person\\\/b2eb569e95072dedf967f0036be08adf\",\"name\":\"Jaume Feliu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/04319ca8610bfe2a04fca8f0d7d42c7e87e4bbe1c687e39a0192f567098d464e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/04319ca8610bfe2a04fca8f0d7d42c7e87e4bbe1c687e39a0192f567098d464e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/04319ca8610bfe2a04fca8f0d7d42c7e87e4bbe1c687e39a0192f567098d464e?s=96&d=mm&r=g\",\"caption\":\"Jaume Feliu\"},\"sameAs\":[\"https:\\\/\\\/tecnocentres.org\",\"https:\\\/\\\/x.com\\\/jfeliua\"],\"url\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using GAS to create web applications (Part 2) - Tecnocentres","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/","og_locale":"en_US","og_type":"article","og_title":"Using GAS to create web applications (Part 2) - Tecnocentres","og_description":"After the first article explaining a little about what web apps made with Google Apps Script (GAS) are, we are going to see in this second article how to create a simple one. And I will do it with a...","og_url":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/","og_site_name":"Tecnocentres","article_published_time":"2021-08-11T08:07:09+00:00","article_modified_time":"2021-08-11T09:43:06+00:00","og_image":[{"width":748,"height":221,"url":"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/gas.jpg","type":"image\/jpeg"}],"author":"Jaume Feliu","twitter_card":"summary_large_image","twitter_creator":"@jfeliua","twitter_misc":{"Written by":"Jaume Feliu","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/#article","isPartOf":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/"},"author":{"name":"Jaume Feliu","@id":"https:\/\/tecnocentres.org\/en\/#\/schema\/person\/b2eb569e95072dedf967f0036be08adf"},"headline":"Using GAS to create web applications (Part 2)","datePublished":"2021-08-11T08:07:09+00:00","dateModified":"2021-08-11T09:43:06+00:00","mainEntityOfPage":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/"},"wordCount":1691,"commentCount":0,"image":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/gas.jpg","articleSection":["Google apps script"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/","url":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/","name":"Using GAS to create web applications (Part 2) - Tecnocentres","isPartOf":{"@id":"https:\/\/tecnocentres.org\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/#primaryimage"},"image":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/gas.jpg","datePublished":"2021-08-11T08:07:09+00:00","dateModified":"2021-08-11T09:43:06+00:00","author":{"@id":"https:\/\/tecnocentres.org\/en\/#\/schema\/person\/b2eb569e95072dedf967f0036be08adf"},"breadcrumb":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/#primaryimage","url":"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/gas.jpg","contentUrl":"https:\/\/tecnocentres.org\/wp-content\/uploads\/2021\/08\/gas.jpg","width":748,"height":221},{"@type":"BreadcrumbList","@id":"https:\/\/tecnocentres.org\/en\/blog\/2021\/08\/11\/using-gas-to-create-web-applications-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Inici","item":"https:\/\/tecnocentres.org\/en\/"},{"@type":"ListItem","position":2,"name":"Using GAS to create web applications (Part 2)"}]},{"@type":"WebSite","@id":"https:\/\/tecnocentres.org\/en\/#website","url":"https:\/\/tecnocentres.org\/en\/","name":"Tecnocentres","description":"Blog de Jaume Feliu","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tecnocentres.org\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/tecnocentres.org\/en\/#\/schema\/person\/b2eb569e95072dedf967f0036be08adf","name":"Jaume Feliu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/04319ca8610bfe2a04fca8f0d7d42c7e87e4bbe1c687e39a0192f567098d464e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/04319ca8610bfe2a04fca8f0d7d42c7e87e4bbe1c687e39a0192f567098d464e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/04319ca8610bfe2a04fca8f0d7d42c7e87e4bbe1c687e39a0192f567098d464e?s=96&d=mm&r=g","caption":"Jaume Feliu"},"sameAs":["https:\/\/tecnocentres.org","https:\/\/x.com\/jfeliua"],"url":"https:\/\/tecnocentres.org\/en\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/posts\/4774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/comments?post=4774"}],"version-history":[{"count":0,"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/posts\/4774\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/media\/4679"}],"wp:attachment":[{"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/media?parent=4774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/categories?post=4774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/tags?post=4774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}