{"id":1849,"date":"2014-04-11T16:31:39","date_gmt":"2014-04-11T14:31:39","guid":{"rendered":"https:\/\/tecnocentres.org\/?p=1849"},"modified":"2017-10-15T16:37:31","modified_gmt":"2017-10-15T14:37:31","slug":"creating-google-apps-script","status":"publish","type":"post","link":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/","title":{"rendered":"Creating a Google Apps script"},"content":{"rendered":"<p style=\"text-align: justify;\">First, keep in mind that Google apps script is Javascript based. You don&#8217;t have to be an expert programmer, but you do have to master the syntax of the language. Therefore, if you don&#8217;t know the syntax of Javascript, I recommend you access the following link and perform the proposed activities. There are 16 modules that can be made in about 10 hours, but not all of them have to be made. The first 5 or 6 is enough. <a href=\"http:\/\/www.codecademy.com\/tracks\/javascript\" target=\"_blank\" rel=\"noopener\">http:\/\/www.codecademy.com\/tracks\/javascript<\/a><\/p>\n<p style=\"text-align: justify;\">Once we know the syntax of Javscript, let&#8217;s focus on an example script.<strong> In this case, we will make a script to get a form to reach the respondent by emai<\/strong>l. On my centre&#8217;s website we have a form in case someone from the educational community wants to send a complaint or suggestion to the address. It is a form made with Google that only has 4 fields: Name and Surname \/ Mailing address \/ Course (only if you are a student or family) \/ Description of the complaint or suggestion. What the script I want to submit must do is send a copy of the answers to the person who answers the form. If you have a GAFE this can be done by forcing the user to log in, but in this case we want the form to be answered by people who are not in our GAFE (families, companies&#8230;). First, of course, you need to create the Google form and access the spreadsheet where the answers to the form will end up. Within this spreadsheet, we will access Tools \/ Script Editor<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-569\" src=\"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1-300x161.png\" alt=\"script1\" width=\"300\" height=\"161\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1-300x161.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1.png 534w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: left;\">We&#8217;ll create a blank script and write the following code:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-572\" src=\"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script2-300x184.png\" alt=\"script2\" width=\"300\" height=\"184\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script2-300x184.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script2.png 650w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<pre style=\"padding-left: 30px;\">\/**\r\n* Send the answers by mail \r\n*\/ \r\n\r\nfunction onChange() {\u00a0\r\n\/\/Prepar begin of mail\r\nvar cap=\"Se ha enviado su sugerencia o queja correctamente. A continuaci\u00f3n se adjuntan sus respuestas:\";\u00a0\r\nvar asunto= \"Confirmaci\u00f3n queja o sugerencia\";\u00a0\r\n\r\nvar cuerpomensaje=cap; \r\nvar dest = \"\";\u00a0\r\nvar camp = \"\";\u00a0\r\nvar libroActual = SpreadsheetApp.getActiveSpreadsheet();\u00a0\r\nvar hojaresp = libroActual.getSheets()[0];\u00a0\r\nvar rangresp = hojaresp.getDataRange();\u00a0\r\nvar ul_fila= rangresp.getNumRows();\u00a0\r\nvar encontrado=0;\u00a0\r\n\/\/Look at the last row in the answers sheet\r\nfor (j=1; j&lt;rangresp.getNumColumns()+1;j++){ \r\ncamp = rangresp.getCell(ul_fila,j).getValue(); \r\nfor (i=0;i&lt;camp.length;i++){ if (camp.charAt(i)==='@'){ \r\nencontrado=1; \r\n} \r\n}\r\nif (encontrado===1){ \r\ndest=camp; \r\nencontrado=0; \r\n} else { \r\ncuerpomensaje= cuerpomensaje+rangresp.getCell(1,j).getValue()+\": \"+camp+\"\"; \r\n}\r\n}\r\n\/\/Mandamos el mail \r\nGmailApp.sendEmail(dest, asunto, '',{ htmlBody: cuerpomensaje}); \r\n};<\/pre>\n<p style=\"text-align: justify;\">Let&#8217;s take a look at this code and see some interesting links to go deeper. The startup only serves to define variables (Mail subject to be sent \/ Mail header) and other programming variables. There are three specific ones to mention:<\/p>\n<pre>var libroActual = SpreadsheetApp.getActiveSpreadsheet();\u00a0\r\nvar hojaresp = libroActual.getSheets()[0];\u00a0\r\nvar rangresp = hojaresp.getDataRange();<\/pre>\n<p style=\"text-align: justify;\">To understand these variables, we&#8217;ll do very well with Google&#8217;s help. It is located in <a href=\"https:\/\/developers.google.com\/apps-script\/reference\/spreadsheet\/spreadsheet-app \" target=\"_blank\" rel=\"noopener\">https:\/\/developers.google.com\/apps-script\/reference\/spreadsheet\/spreadsheet-app<\/a><br \/>\nThey show us all the objects of Google applications and their properties. In the variables that I have defined in the script, the CurrentBook variable is an entire calculation book. Specifically the active book. The variable hojaresp, is the first spreadsheet of the book. The variable rangresp is a set of cells, all of which have data. We could have directly obtained the last variable, <em>rangresp<\/em>, by typing<\/p>\n<pre>var rangresp = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0].getDataRange()<\/pre>\n<p style=\"text-align: justify;\">but that much at the outset might have been harder to understand. All scripts are based on this, objects and properties. With the help of Google, we can find anything from Google applications (cell values, email recipients, number of rows, text from a document&#8230;). Following the example,<\/p>\n<pre>var ul_fila= rangresp.getNumRows();\u00a0\r\nvar encontrado=0;\u00a0\r\n\/\/look at the last row of answers sheet\r\nfor (j=1; j&lt;rangresp.getNumColumns()+1;j++){ \r\ncamp = rangresp.getCell(ul_fila,j).getValue(); \r\nfor (i=0;i&lt;camp.length;i++){ if (camp.charAt(i)==='@'){ \r\nencontrado=1; \r\n} \r\n}\r\nif (encontrado===1){ \r\ndest=camp; \r\nencontrado=0; \r\n} else { \r\ncuerpomensaje= cuerpomensaje+rangresp.getCell(1,j).getValue()+\": \"+camp+\"\"; \r\n}\r\n}<\/pre>\n<p>we looked at cell by cell in the back row. To do this, we define an ul_fila variable that is the number of rows in the range with data. The last one has the answer we want to send. We can look at the value of each cell by making a loop for, so we will look at all the cells. To access its value, we use the getCell (to set the cell) and getValue (to get the value) properties. Since we don&#8217;t know in which field the user will indicate the mail, what we do is to look at letter by letter if that cell has the @ symbol. To do this, we use a second for, which compares each letter with the @.<\/p>\n<p>Now all that&#8217;s left is to create the body of the message, where we&#8217;ll put the name of the field (which is in the first row) and then the answer.<\/p>\n<p>The script ends by sending the email<\/p>\n<pre>\/\/Send mail\r\nGmailApp.sendEmail(dest, asunto, '',{ htmlBody: cuerpomensaje});<\/pre>\n<p style=\"text-align: justify;\">To do this we use another Google object. It&#8217;s not spreadsheet, it&#8217;s mail. In another section of the Google help page we can find Gmail objects:\u00a0<a href=\"https:\/\/developers.google.com\/apps-script\/reference\/gmail\/\" target=\"_blank\" rel=\"noopener\">https:\/\/developers.google.com\/apps-script\/reference\/gmail\/<\/a><\/p>\n<p style=\"text-align: justify;\">Once we have made the script and understood how it works, we just need to program it to run every time someone answers the form. We&#8217;ll do it with the triggers.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-574\" src=\"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script4-300x166.png\" alt=\"script4\" width=\"300\" height=\"166\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script4-300x166.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script4.png 535w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>We will configure the script we just created to run every time someone answers the form.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-576\" src=\"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script5-300x109.png\" alt=\"script5\" width=\"300\" height=\"109\" srcset=\"https:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script5-300x109.png 300w, https:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script5.png 553w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Here it is important which user is activating the trigger, since this will be the user sending the mail. If we are creating the script with a teacher user, but we want the mail to be sent to a center user, we must share the sheet with the center user in edit mode and let it trigger the trigger.<\/p>\n<p style=\"text-align: justify;\">If you want to see how this script works in practice, then there is the link to a form below. If it is answered, I will receive a confirmation email from you.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/docs.google.com\/a\/insestatut.cat\/forms\/d\/1k_0VSP6qP0S5f66MWe0vwztw-EzJi4sXVcFRhS14zx8\/viewform\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.google.com\/a\/insestatut.cat\/forms\/d\/1k_0VSP6qP0S5f66MWe0vwztw-EzJi4sXVcFRhS14zx8\/viewform<\/a><\/p>\n<p style=\"text-align: justify;\">I think that Google apps scripts are a great tool, as they can be useful for many operations (copy data between sheets, combine information from documentaries and spreadsheets and send it by email&#8230;). If you know something about programming it is not difficult to get into its way of working and you can do whatever you want. They are ideal for automating otherwise manual processes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First, keep in mind that Google apps script is Javascript based. You don&#8217;t have to be an expert programmer, but you do have to master the syntax of the language. Therefore, if you don&#8217;t know the syntax of Javascript, I&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[68,74],"tags":[],"class_list":["post-1849","post","type-post","status-publish","format-standard","hentry","category-administrators","category-organization","post-archive"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Creating a Google Apps script - 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\/2014\/04\/11\/creating-google-apps-script\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating a Google Apps script - Tecnocentres\" \/>\n<meta property=\"og:description\" content=\"First, keep in mind that Google apps script is Javascript based. You don&#8217;t have to be an expert programmer, but you do have to master the syntax of the language. Therefore, if you don&#8217;t know the syntax of Javascript, I...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/\" \/>\n<meta property=\"og:site_name\" content=\"Tecnocentres\" \/>\n<meta property=\"article:published_time\" content=\"2014-04-11T14:31:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-10-15T14:37:31+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1-300x161.png\" \/>\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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/\"},\"author\":{\"name\":\"Jaume Feliu\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/#\\\/schema\\\/person\\\/b2eb569e95072dedf967f0036be08adf\"},\"headline\":\"Creating a Google Apps script\",\"datePublished\":\"2014-04-11T14:31:39+00:00\",\"dateModified\":\"2017-10-15T14:37:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/\"},\"wordCount\":883,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/tecnocentres.org\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/script1-300x161.png\",\"articleSection\":[\"Administrators\",\"Organization\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/\",\"url\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/\",\"name\":\"Creating a Google Apps script - Tecnocentres\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/tecnocentres.org\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/script1-300x161.png\",\"datePublished\":\"2014-04-11T14:31:39+00:00\",\"dateModified\":\"2017-10-15T14:37:31+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/#\\\/schema\\\/person\\\/b2eb569e95072dedf967f0036be08adf\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/#primaryimage\",\"url\":\"http:\\\/\\\/tecnocentres.org\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/script1-300x161.png\",\"contentUrl\":\"http:\\\/\\\/tecnocentres.org\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/script1-300x161.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/blog\\\/2014\\\/04\\\/11\\\/creating-google-apps-script\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inici\",\"item\":\"https:\\\/\\\/tecnocentres.org\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating a Google Apps script\"}]},{\"@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":"Creating a Google Apps script - 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\/2014\/04\/11\/creating-google-apps-script\/","og_locale":"en_US","og_type":"article","og_title":"Creating a Google Apps script - Tecnocentres","og_description":"First, keep in mind that Google apps script is Javascript based. You don&#8217;t have to be an expert programmer, but you do have to master the syntax of the language. Therefore, if you don&#8217;t know the syntax of Javascript, I...","og_url":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/","og_site_name":"Tecnocentres","article_published_time":"2014-04-11T14:31:39+00:00","article_modified_time":"2017-10-15T14:37:31+00:00","og_image":[{"url":"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1-300x161.png","type":"","width":"","height":""}],"author":"Jaume Feliu","twitter_card":"summary_large_image","twitter_creator":"@jfeliua","twitter_misc":{"Written by":"Jaume Feliu","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/#article","isPartOf":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/"},"author":{"name":"Jaume Feliu","@id":"https:\/\/tecnocentres.org\/en\/#\/schema\/person\/b2eb569e95072dedf967f0036be08adf"},"headline":"Creating a Google Apps script","datePublished":"2014-04-11T14:31:39+00:00","dateModified":"2017-10-15T14:37:31+00:00","mainEntityOfPage":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/"},"wordCount":883,"commentCount":0,"image":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/#primaryimage"},"thumbnailUrl":"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1-300x161.png","articleSection":["Administrators","Organization"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/","url":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/","name":"Creating a Google Apps script - Tecnocentres","isPartOf":{"@id":"https:\/\/tecnocentres.org\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/#primaryimage"},"image":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/#primaryimage"},"thumbnailUrl":"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1-300x161.png","datePublished":"2014-04-11T14:31:39+00:00","dateModified":"2017-10-15T14:37:31+00:00","author":{"@id":"https:\/\/tecnocentres.org\/en\/#\/schema\/person\/b2eb569e95072dedf967f0036be08adf"},"breadcrumb":{"@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/#primaryimage","url":"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1-300x161.png","contentUrl":"http:\/\/tecnocentres.org\/wp-content\/uploads\/2014\/04\/script1-300x161.png"},{"@type":"BreadcrumbList","@id":"https:\/\/tecnocentres.org\/en\/blog\/2014\/04\/11\/creating-google-apps-script\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Inici","item":"https:\/\/tecnocentres.org\/en\/"},{"@type":"ListItem","position":2,"name":"Creating a Google Apps script"}]},{"@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\/1849","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=1849"}],"version-history":[{"count":0,"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/posts\/1849\/revisions"}],"wp:attachment":[{"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/media?parent=1849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/categories?post=1849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tecnocentres.org\/en\/wp-json\/wp\/v2\/tags?post=1849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}