# Checking for emails from a specific sender?

**URL:** <https://discourse.nodered.org/t/checking-for-emails-from-a-specific-sender/95255>\
**Category:** General\
**Created:** [9 February 2025 10:04 UTC](https://discourse.nodered.org/t/checking-for-emails-from-a-specific-sender/95255 "2025-02-09T10:04:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konekt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/konekt/32/89015_2.png) [@Konekt](https://discourse.nodered.org/u/Konekt)\
**Post date:** [9 February 2025 10:04 UTC](https://discourse.nodered.org/t/checking-for-emails-from-a-specific-sender/95255/1 "2025-02-09T10:04:33Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [9 February 2025 10:10 UTC](https://discourse.nodered.org/t/checking-for-emails-from-a-specific-sender/95255/2 "2025-02-09T10:10:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 February 2025 11:40 UTC](https://discourse.nodered.org/t/checking-for-emails-from-a-specific-sender/95255/3 "2025-02-09T11:40:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 May 2025 11:40 UTC](https://discourse.nodered.org/t/checking-for-emails-from-a-specific-sender/95255/4 "2025-05-10T11:40:18Z")

</div>

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