# "Only when" condition preventing workflow to run?

**URL:** <https://forum.bubble.io/t/only-when-condition-preventing-workflow-to-run/365329>\
**Category:** Need help\
**Created:** [April 1, 2025, 11:05am UTC](https://forum.bubble.io/t/only-when-condition-preventing-workflow-to-run/365329 "2025-04-01T11:05:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orbit](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/orbit/32/253365_2.png) [@Orbit](https://forum.bubble.io/u/Orbit)\
**Post date:** [April 1, 2025, 11:05am UTC](https://forum.bubble.io/t/only-when-condition-preventing-workflow-to-run/365329/1 "2025-04-01T11:05:52Z")

</div>

Hello Bubble Community!

I’m trying to set up a workflow that sends an email to a user when a new IP address is detected during login. Everything works perfectly **without** the “Only when” condition, the email is sent as expected.

However, as soon as I add a condition like this:

```auto
Only when: Search for Device Info (constraints: IP = Result of Step 2's IP):count is 0

```

…the email is **never sent** , even if the Device Info database is completely empty (i.e., there are no existing records to match = 0).

 ![Screenshot 2025-04-01 at 12.59.48](https://us1.discourse-cdn.com/bubble/original/3X/d/4/d4af9228c5aa6557322c3fdb52b42c83a5b59618.png)

Not sure what im doing wrong here?  
Open to any help that might be able to point me in the right direction 🙂

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [April 1, 2025, 11:08am UTC](https://forum.bubble.io/t/only-when-condition-preventing-workflow-to-run/365329/2 "2025-04-01T11:08:06Z")

</div>

But aren’t you creating the Device Info entry in step 2? (with no conditions by the looks of it).

So the count will never be 0.

---

<div class="post-metadata">

**Author:** ![Orbit](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/orbit/32/253365_2.png) [@Orbit](https://forum.bubble.io/u/Orbit)\
**Post date:** [April 1, 2025, 11:11am UTC](https://forum.bubble.io/t/only-when-condition-preventing-workflow-to-run/365329/3 "2025-04-01T11:11:13Z")

</div>

Omg that is true haha… thank you, Adam! Then i will move it around and put create new device info after and just fetch the IP form the Java script to bubble element…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [June 10, 2025, 11:06am UTC](https://forum.bubble.io/t/only-when-condition-preventing-workflow-to-run/365329/4 "2025-06-10T11:06:43Z")

</div>

This topic was automatically closed after 70 days. New replies are no longer allowed.
