How can we filter emails to exclude deleted / archived items?

To remove messages from your results that have been deleted, you will need to:

  1. Lookup the role / name of the folder using the API endpoint /label, look for trash
  2. Store this label_id
  3. Then filter out the result form API endpoint /messages with this label_id in the attribute not_in

This way you get around all the localisations and variables of display_name  i.e. Deleted Items / Verwijder Items


This works for all providers.



Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request



Please sign in to leave a comment.