Node to wait for human validation

I often feel the need to add a node in the middle of a flow that forwards the input only if a human manually click on "accept", for instance when you want to add new elements to a database only after a human has checked them etc. Importantly, I would like this node to support multi-messages, so that I can submit a few inputs and validate them the day after etc.

Is there a library/node for that already?

I should think it's better to store records in the database when you get them, but with a flag "Unverified".

Then it should be fairly straightforward to have a dashboard displaying unverified records and allowing deletion of those you want to reject.

1 Like

I'd agree, store in the db with a flag that indicates (en)verified. Or write to a temporary store until verified.

Use a Dashboard or UIBUILDER to provide a UI to do the verification.

1 Like

Personally, I would have a Verified flag, not unverified. Otherwise you end up tests like 'not unverified', which can overload the brain.

3 Likes

Thanks for the answer. I wish a custom node already existed since uibuilder creating a database + uibuilder is not so trivial (for instance n8n has a 'wait' node that can be used to create a new url for each item to validate… it may be nicer to have all of them on the same page but it is a starting point).

By the way, there is no database-like solution that is not involving an actual database (also not super user friendly for people not used to databases etc). The context is fairly inneficient to use I guess since any modification rewrites the whole "database".

Could you explain your requirements a bit more there? What would actually make this simpler (and yet maintain flexibility)?

With uibuilder (putting aside for a moment creating a page), the flow should be pretty simple:

  1. You have a flow that results in an output.
  2. You send the output to a uibuilder node. The flow will stop there until you get something back from the client.
  3. When you do, validate it and continue.

If you need to gather multiple inputs, that makes things slightly more complex - but really not a lot. You could set the input flow to wait until it had everything & only then send it to uibuilder. Or you could do that in the client very easily - either visually, the user simply waits until all the info is visible (with some form validation to prevent accidental submission), or enforced with some javascript.

So is the difficulty creating something for the client side? Because if it is, I think we can probably deal with that pretty easily. :smiley:

This is not correct.

It is possible to update a specific element but in most cases, it isn't worth the added complexity.

This would only be an issue if you had extremely large datasets and in that case, you should be using a DB anyway. I have one global context variable that contains over 22,000 entries and is updated regularly (contains npm stats for my various published modules).