title: Trigger function from another function
body: <p>Hi i have two functions in Apps Script, when the first function is done i whould like the second one to be triggered, is it possible?</p>
  
  <pre><code>function sendEmail() {
  
   var firstThread = GmailApp.getInboxThreads(0,1)[0];
   var message = firstThread.getMessages()[0];
   var sender = message.getFrom();
    var body = "Detta mail är ursprungligen skickat från" + " " + sender + '\n' + message.getBody();
   var subject = message.getSubject();
   var attachment = message.getAttachments();
    GmailApp.sendEmail("user.name@adje.com", subject, "",  {htmlBody: body, attachments: attachment});
  
    Logger.log(body);
  }
  
  function markArchivedAsRead() {
    var threads = GmailApp.search('label:unread -label:inbox');
    GmailApp.markThreadsRead(threads);
  };
  </code></pre>