Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

138
Vistas
Uniteractable google form sent through email using JavaScript and Google Appa Script

Here is the code:


const ss = SpreadsheetApp.getActiveSpreadsheet();
const ws = ss.getSheetByName("StudentReport_all");
const range = ws.getRange(4,1,ws.getLastRow(),ws.getLastColumn());
const data = range.getValues();

var form = FormApp.openById("154QspMd1P4RmTRDnOQHL06dU-KvL8FPU53wHYcar09U");
  //form.setRequireLogin(true);

var formUrl = form.getPublishedUrl();
var title = form.getTitle();
var descriptionText = form.getDescription();

function sendForm() {
  
  var subject = "Response Needed: " + form.getTitle()
  var response = UrlFetchApp.fetch(formUrl);
  var template = HtmlService.createHtmlOutput(response);
  
  //var htmlBody = HtmlService.createHtmlOutputFromFile("teacherEmail").getContent();
var htmlBody = template.getContent();
//HtmlService


  var p1Email = data[9][3];
  var p2Email = data[10][3]
  var p3Email = data[11][3]
  var p4Email = data[12][3]
  var p5Email = data[13][3]
  var p6Email = data[14][3]


GmailApp.sendEmail(
      [p1Email],
      subject,
      htmlBody,
    {htmlBody:htmlBody}

  )
 return htmlBody
  Logger.log(htmlBody);
}

When I try to run this code, which accesses a Google Sheets for in order to access emails to send a google form to, the email shows up as this:1,2. The google form in the email can not be interacted with and it is in a weird format (my JavaScript on my browser is enable by the way). How can I fix this?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda