Checking for emails from a specific sender?

Hi there,
I feel like this is probably really simple, but I've tried reading the docs, searching the web and checking for solutions on the forum here, and while some people seem to be doing what I'm after, I don't see how anywhere.

Basically I'm trying to check for emails from a specific sender and have that trigger another node when they come in. I have a setup that works nicely for every email coming in, but I just need to narrow it down to just the ones from a specific sender.

Any ideas? Thanks!

Use a switch node after the email node. Set the property of the switch node to msg.from, set the first rule to == (string) blah@mail.com. Then only emails from blah@mail.com will pass.

An alternative to @E1cid's answer would be to use a node.js IMAP package in a function node then use the native IMAP filtering to only receive messages from the specific source (or subject, ....)

I do this for a weekly email I receive from the Outdoor Active app. It sends me interesting walks and cycle routes for my region. I have a flow that grabs just those messages, extracts the 3 individual routes and saves them to my own catalogue, then marks them as read and moves them to a specific folder as an archive.

1 Like