Action failed conditionning Email Notification

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?

Email notification

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

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

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?

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.

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.

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.

For info

1 Like

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.

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

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?

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 :


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.
2 Likes

@ThinhDinh as simple as that :raised_hands: :raised_hands:

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.

1 Like

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.

1 Like

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

1 Like

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