Add IMAP custom Rules with subject and body email contain of text

Hi all,

[“UNSEEN”, [“SUBJECT”, “Attention - Tbssvr-wmdash0234”],[“Body”,“Partition of Drive”]] i can get data from email for may rules,

thank
Iwan

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi Iwan :wave: Welcome to the community :tada:

I’m not too sure what exactly you’re asking here, exactly - are you looking for how to filter by label in the IMAP trigger node?

If so, you can add the filter under the “options” section, like this:

If this doesn’t help, could you share an example workflow and go into a little bit more detail about what you’re trying to do? Also, could you fill out this template:

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

HI EmeraldHerald,

thank you for your feedback, i have rules [“UNSEEN”, [“SUBJECT”, “Attention - Tbssvr-wmdash0234”] it’s filter email by subject, and then i want add filter by subject too, there is any idea to do that filter i have try that one [“UNSEEN”, [“SUBJECT”, “Attention - Tbssvr-wmdash0234”],[“Body”,“Partition of Drive”]] the body is not filter.

regards
Iwan

Hi @Iwan_Yudhistira :wave: I tested this out like this:

And have had no issues with testing and getting emails marked as read :thinking: Can you let us know what version of n8n you’re using? If you’re on an older version, you may be missing some bug fixes.

If you’re on a more recent version of n8n, this can unfortunately also be a potential issue with your IMAP server, which may have different identifiers for messages than you expect. :see_no_evil:

Hi @EmeraldHerald

ehm, for those rules run well, can you add body email for those rules cause i made one before not run [“UNSEEN”, [“SUBJECT”, “Attention - Tbssvr-wmdash0234”],[“Body”,“Partition of Drive”]] and then i run in n8n Version 0.227.1.

once again after i add imap rules [“UNSEEN”, [“SUBJECT”, “Attention - Tbssvr-wmdash0234”], another imap trigger has error, my imap run so well, there is bug, so i upgrade the latest version?

regards
Iwan

Hi @Iwan_Yudhistira :wave:

I managed to get this to work with ["UNSEEN", ["SUBJECT", "foo"], ["TEXT", "bar"]] - can you try TEXT instead of BODY and see if that picks this up instead?

Hi @EmeraldHerald

i have try your rules, it’s same not work, text not get data off email body, thank you for your feedback

iwan

Hey @Iwan_Yudhistira,

That is interesting it looks like TEXT or BODY should work, Can you share the exact rule you are using?

Hi @Jon and @EmeraldHerald

thank for discussion, i think i found this resolution i’ll try rules [“UNSEEN”, [ “OR”, [“SUBJECT”, “Attention”],[“TEXT”,“Partition”]]]

and then change config with

image

the rules work well, maybe will be monitored.

thank
Iwan

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.