I have specific incoming emails assigned different labels and I have threading (conversation view) disabled in settings. I can enter a search in the web app that returns the specific messages I want,
eg: "label: customer01 label:report"
However using the exact same filter with the API returns the thread and all messages there-in that Google has decided are part of the same conversation (even though in the real world they are not) which means my script processes messages it should not in addition to those it should.
eg: var threads = GmailApp.search(gSearchExp); // where gSearchExp is the aforementioned filter
Is there a way I can search for and return messages, NOT threads?