# Action failed conditionning Email Notification

**URL:** <https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448>\
**Category:** Ask for Help\
**Tags:** actions\
**Created:** [October 29, 2024, 3:30pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448 "2024-10-29T15:30:41Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![GarryVa](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@GarryVa](https://community.glideapps.com/u/GarryVa)\
**Post date:** [October 29, 2024, 3:30pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/1 "2024-10-29T15:30:41Z")

</div>

Hello Gliders, In the following Action, I don’t want to receive Email notification when action failed, because I use “Wait for condition” module as a filter to trigger a webhook.  
Do you have any solution?

 ![Screenshot 2024-10-29 à 16.25.14](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/0/8029d6c8405478fb7cc031865e4911a9081756aa.png)

_Email notification_

 ![Screenshot 2024-10-29 à 16.24.49](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/4/34bf839be777bf67878b64fc7ea3e1c023ed0e44.png)

---

<div class="post-metadata">

**Author:** ![Marc-Olivier](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@Marc-Olivier](https://community.glideapps.com/u/Marc-Olivier)\
**Post date:** [October 29, 2024, 3:58pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/2 "2024-10-29T15:58:39Z")

</div>

Bonjour @GarryVa

You have to set 2 branches in your action flow and set your condition alert is not empty at the top of the first branch where you can have your trigger webhook. The second branch should not contain the trigger webhook.  
Bon courage

---

<div class="post-metadata">

**Author:** ![Marc-Olivier](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@Marc-Olivier](https://community.glideapps.com/u/Marc-Olivier)\
**Post date:** [October 29, 2024, 4:03pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/3 "2024-10-29T16:03:13Z")

</div>

Attention ton application est ouverte à tout le monde. Je te conseille de changer l’URL pour éviter que qq un change tes données

---

<div class="post-metadata">

**Author:** ![GarryVa](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@GarryVa](https://community.glideapps.com/u/GarryVa)\
**Post date:** [October 29, 2024, 8:14pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/4 "2024-10-29T20:14:56Z")

</div>

Thank you @Marc-Olivier. Actually, I really want to filter right after the -1 increment number.  
In other words, when I click a button to remove one item from the stock, if quantity becomes too low (quantity alert), I want to be notified (Webhook).

Do you have any alternative?

---

<div class="post-metadata">

**Author:** ![Marc-Olivier](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@Marc-Olivier](https://community.glideapps.com/u/Marc-Olivier)\
**Post date:** [October 29, 2024, 8:28pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/5 "2024-10-29T20:28:35Z")

</div>

Yes you have to set the right condition in the branch with the webhook.

Something like if quantity \< x then run this branch (with the webhook) if not then go to the other branch.  
The two branches should have exactly the same steps except for the webhook component.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 30, 2024, 12:14am UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/6 "2024-10-30T00:14:15Z")

</div>

In other words, you have to determine the condition at the start of the branch. You can’t have a condition in the middle, at least for now.

---

<div class="post-metadata">

**Author:** ![GarryVa](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@GarryVa](https://community.glideapps.com/u/GarryVa)\
**Post date:** [October 30, 2024, 9:17am UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/7 "2024-10-30T09:17:19Z")

</div>

Thank you guys. I really understood your solution.

Sorry to insist but again, the condition must check stock state after I remove 1 item from the stock. Do you think it will work?

I will try but not sure. I feel like I need maybe 2 different actions.

---

<div class="post-metadata">

**Author:** ![GarryVa](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@GarryVa](https://community.glideapps.com/u/GarryVa)\
**Post date:** [October 30, 2024, 9:40am UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/8 "2024-10-30T09:40:40Z")

</div>

For info

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/5/f5138808df250e712b492be2459d043094673238.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 30, 2024, 11:39pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/9 "2024-10-30T23:39:41Z")

</div>

Yeah, we meant you must pre-check the stock state. Here’s how it should work:

1. Check the stock level before any action.
2. Imagine we’re about to sell one item. Subtract 1 from the current stock level.
3. If this new number reaches our “alert” level, we want to be notified.

For example: Let’s say we want to be alerted when the stock reaches 10 items or less. In practice, this means:

- If the current stock is 11 or less, we’ll get an alert.
- If the stock is 12 or more, no alert will be triggered.

---

<div class="post-metadata">

**Author:** ![GarryVa](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@GarryVa](https://community.glideapps.com/u/GarryVa)\
**Post date:** [October 31, 2024, 3:55pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/10 "2024-10-31T15:55:58Z")

</div>

How it should work in my opinion :

1. Subtract 1 from the current stock level
2. Check if the consequence of this action makes stock level reaches alert limit
3. If it’s true, notify me

How I feel like it’s working in the screenshot I sent (with your example) :

1. Check the stock level in 11 before any action
2. Subtract 1 from the current stock level, it comes down to 10
3. The consequence of this previous action makes stock level reaches alert limit, but I can’t get notified because no alert will be triggered

Anyway, I understood your point, I will add +1 to every stock limit level

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 31, 2024, 11:57pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/11 "2024-10-31T23:57:07Z")

</div>

Do you have the same level for all stocks or not? You’re using “alerte” is not empty but I feel like it’s a boolean and you should check for “is checked”. How do you construct that alerte column?

---

<div class="post-metadata">

**Author:** ![GarryVa](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@GarryVa](https://community.glideapps.com/u/GarryVa)\
**Post date:** [November 3, 2024, 8:49pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/12 "2024-11-03T20:49:27Z")

</div>

Hello @ThinhDinh , here how it was built (because I exceptionally didn’t make this app), but you’re right, it easily can be compared to a boolean :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/5/154e7d6bc2e53b11ba7cb7f532f74428a58a8291.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/d/4d12c701883ebf07503e66e1571caeb8ebd300eb.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 3, 2024, 10:48pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/13 "2024-11-03T22:48:47Z")

</div>

You’re correct to use that for what looks like a frontend component, but do this as well:

- Add a column that calculates “Stock d’alerte + 1” (assuming that is the amount at which you would receive an alert). We pre-calculate this.
- Your two branches would be: If qte en stock is less than or equal to the column above (then trigger the webhook), keep the else branch as is.

---

<div class="post-metadata">

**Author:** ![GarryVa](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@GarryVa](https://community.glideapps.com/u/GarryVa)\
**Post date:** [November 4, 2024, 8:33am UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/14 "2024-11-04T08:33:45Z")

</div>

@ThinhDinh as simple as that 🙌 🙌

You’re right, but I didn’t add anything column and use “Stock d’alerte” as it is (maybe I will update it if necessary). And I also think that I can delete “alerte” column which useless actually.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/b/1b0405c40b0364a24baefe6c9e02fa13cd2dc802.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 4, 2024, 11:39pm UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/15 "2024-11-04T23:39:31Z")

</div>

That might leave an edge case for this.

Say your alert level is 10.

Your stock is at 11. Do you want to be alerted when it’s 11 and you’re trying to decrease it to 10? I would guess yes and that’s why I suggested the “Stock d’alerte + 1” formula to cover that case, otherwise you can leave it as is.

---

<div class="post-metadata">

**Author:** ![GarryVa](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@GarryVa](https://community.glideapps.com/u/GarryVa)\
**Post date:** [November 5, 2024, 1:11am UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/16 "2024-11-05T01:11:04Z")

</div>

Well, I will see by using and retain your solution for sure. I’ll let you know.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [November 12, 2024, 1:11am UTC](https://community.glideapps.com/t/action-failed-conditionning-email-notification/77448/17 "2024-11-12T01:11:17Z")

</div>

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