Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

227
Visualizações
Send email multiple hyperlink with google script

i want to send email using google script but contains multiple hyperlink and text

function jira() {
  var ss =SpreadsheetApp.getActiveSpreadsheet();
  var jira = ss.getSheetByName('Mailer');

    var currentEmail = "emailhere@gmail.com"
    var status = jira.getRange("C1").getValue();
    var total_ticket = jira.getRange("C2").getValue();
    var jira_ticket =jira.getRange(3,3,jira.getLastRow()-2,1).getValues();
    var subject = "[AUTOMATION MAILER] Pending JIRA Ticket - Change Phone Number"
    var body = "Hi Leaders\n\n" + 
                "There is "+total_ticket+" pending tickets on jira. Kindly solve this ticket_id : <a href='" + jira_ticket + "'>agenda</a>"+
                "\n\n\nBest Regards"

      Logger.log(body)
      if(status=='Yes'){
        MailApp.sendEmail({
        to: currentEmail,
        subject: subject,
        htmlBody:body
        });  
        MailApp.sendEmail(currentEmail,subject,body,)   
     }

}

here is the sheet looks like. i want all the jira ticket clickable in email

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This will create drafts with hyperlinks. From that you should be able to create emails.

function creatDataList() {
  const ss = SpreadsheetApp.getActive();
  const sh = ss.getSheetByName('Sheet0');
  sh.clearContents();
  let uA = [];
  for (var i = 0; i < 5; i++) {
    let url = `http://domain${i}.com`;
    let add = `name${i}@domain${i}.com`;
    let sub = `Subject${i}`
    uA.push([url, add, sub]);
  }
  sh.getRange(1, 1, uA.length, uA[0].length).setValues(uA);
}

function createDrafts() {
  const ss = SpreadsheetApp.getActive();
  const sh = ss.getSheetByName("Sheet0");
  const vs = sh.getDataRange().getValues();
  vs.forEach((r, i) => {
    GmailApp.createDraft(r[1], r[2], '', { htmlBody: `This is a fake link: <a href="${r[0]}">${r[0]}</a>` });
  });
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda