title: How to use "not" in Gmail filters?
body: <p>I need to create a Google App Script to respond to machine generated emails, except those also sent to one colleague or contain a particular topic outside my responsibility. </p>
  
  <p>I've been trying to use the <code>GmailApp.search</code> API which includes all mail from user X but NOT those emails which are also addressed to user Y NOR those containing "junk_term". I want the emails archived and to skip the inbox.</p>
  
  <p>I created a query like so:</p>
  
  <pre><code> "from:(user_X@address.com) -{user_Y@address.com OR junk_term}"
  </code></pre>
  
  <p>But it appears not to return any results.</p>