Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!