I’m trying to use n8n to allow some users to launch automated tests (several tests per workflow).
I would like the Code and If Node to show clearly whether the test they performed failed or not for each data they received.
Which brings me to several questions :
Is there a “clean” way to set the Code Node status to Failed, so that a user can clearly see that something is wrong.
Is it possible to let the warning icon on a Code Node that fail even when the node is set to “continue on fail” ?
Is it possible to show directly on the If Node how many times the True and False branch have been used ? The green checkmark and number of execution next to it may let the users think that the test is successful for every data, and the number of items written on the link is not always easily visible when there is a lot of links.
If you set Continue on Fail we don’t show an error icon, This is not something that can be configured so for something like this a check could be to add an error key that you check for in an if node, and for the last part other than the lines the only other option would be to click on the node to check the output which would give you the totals.
A quick workflow that might be a useful starting point is below, But it all does depend on the workflow you are using and if you want to show an error and still process the item but luckily n8n is flexible enough to allow that with a bit of work.
My problem is that I would like to perform a lot of different tests on my data, and I want the users to be able to check the results of all the tests easily.
That’s why checking inside the IF node for each test would be too long and tedious.
The solution you proposed in the workflow is quite good but may also be a bit tedious for the user if there is a lot of branches to check, and I’m afraid they may miss an error if they have to check 50 branches like that.
Is there a way to dynamically set or edit the content of a sticky note ?
There is no way to dynamically set the contents of a sticky not. What about using sub workflows for each test then after each test workflow you can use an if node to show any messages in a noop node or something?
It is hard to think of a solution without really seeing the tests or knowing a lot more about what you are doing, A crazier solution could be to do the sub workflow thing then have that write to a database then you can use another workflow that pulls the data from the database to display it from a webhook.
To make it short, I have a script that is able to scrap data from my network devices and send them to my backend.
Now I want to use n8n to create a user interface that allow users to call the backend that will start this script and send back the data to n8n.
Then, I need n8n to parse the data, detect any abnormal values in it and warn the user.
Sending the data to a database may be a good idea. This way I can pull it and generate a report on my backend, then use a sticky note to tell the user that he need to check an certain url to view the result.
If you think of a better way to do it, I may be interested.
So that should all be possible but working out the approach to take is hard to say until implementation starts. By the sound of it the user doesn’t need to manually run the workflow you just need a way to give them the output so this could be done through email, telegram, slack, discord or the database option which could then tie into something like Appsmith / Lowdefy / Budibase to display it. They could also use the same front end to kick off the process.