title: How I can mark a eMail with Userlabel (not the complete Thread)
body: <p>I have created this script:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function myFunctionNew() {
  
    var threads = GmailApp.search('in:inbox subject:"xxxxxxxxxxxxxx" ');
    GmailApp.markThreadsUnread(threads);
    
    for (var i = 0; i &lt; threads.length; i++) {
      var mid = threads[i].getId();
      GmailApp.getMessageById(mid).markRead();
      GmailApp.getMessageById(mid).star();
      
      // ---&gt; so I mark the complete Thread: GmailApp.getUserLabelByName("1").addToThread(threads[i]);
      // Here I want to sign only the one eMail with a User label (e.g. Customer)
      //
      // ---&gt; GmailApp.moveThreadToArchive(threads[i]);
      // Here I want to move  only the one eMail to the archive
      
      GmailApp.getMessageById(id).forward("xxxxxxxxxx@yyyyyy.com");
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>but how I can add a label and move only one eMail which ID I have?</p>
  
  <p>Thanks</p>