Field Validate inputs through our API or Webhook


It would be good to be able to validate field values through our custom API in realtime. 
That way we will only allow particular values in this field from our database.
For example Pipefy can let us provide JSON in particular format through the web link or it can be some ‘validation webhook’ when card is being saved.

 

Another option is make it available only for dropdown where values can be populated from API/Webhook or something like that. 

FYI I don’t want to use Pipefy Database because i will need to keep it synced etc.
 

To better understand the idea.

Lets say i have input1 in Pipefy card.

whenever we save/type/change input1 , Pipefy will trigger our validation endpoint for us to save proper values. In this case:

If i type
‘gree’


It will download/request(or already downloaded) and compare against:

GET myclientcompany.com/api/pipefy-integration/color-validation.json 

{

    ‘value’: ‘green

},

{

    ‘value’: ‘red’

}

]

 

 

So in this case it will know that allowed values are ‘green’ and ‘red’

 

This is especially helpful if we want to link Pipefy card to our records in Database

 


I feel like this can – to a certain degree – already be achieved using the “custom validation” feature also shown in your screenshot. Just have code that dynamically populates the “custom validation” values, e.g. in this case have your code at myclientcompany.com/api/pipefy-integration/ call the GraphQL API to change the field’s custom validation regex to be something like “green|red”.

If you are just looking for autocompletion of a field, I recommend to use a connected field to a Pipefy database instead – way easier and more dynamic.

I admit, both these suggested methods would change the validation for all instances of a field, whereas you might be looking for a way to set the validation depending on other context of the card.

In this case, the workaround is the following:

Have a hidden field “validation passed”. Have a radio button without any button that’s a required field. Hide the required radio button if the “validation passed” field has a certain value → the card cannot be moved as long as the “validation passed” hidden field does not have the “validation passed” value. Use your API with a field changed webhook to set the value of the “validation passed” field depending on the content of the field you validate.

That’s how it works, can possibly be extended with a description of what’s wrong in the field etc.


Thanks for you reply @genietim 
“green|red” is good, but, only for static values as  you mentioned, this is not the solution, when i have a lot of items added to my database and what not. 


And as i mentioned, Pipefy Database is good, but i would not say that it will make my life easier.
Because, i will have to maintain sync between my database table and Pipefy table. I think that is already a problem.  We don’t want to do that. I just want this card to be validated against ‘my’ database table through API or something without any complexities.
And as you mentioned, hidden field “validation passed” is good workaround, but i am not  sure that it prevents the card from being saved, thus, this is invalid card already. Yes, i can mark this card as invalid, but we already implemented that, and it is helping us to say the least.

I wish there was a way to just have ‘field is being changed’ prehook where we decide if it should pass or not. Or is there such webhook that i am not aware of? 

 

 


Good discussion going on here! I even had to ask help from someone from the development team to help me understand some parts 😅 … And AFAIK, the closest we have to addressing your scenario today is indeed the options @genietim suggested.

No, we don't have this type of webhook today @tamerlan-abilov. Question: would your problem be solved if we had an easy way to keep your external database automatically synced with a Pipefy database?


@tamerlan-abilov yeah, no there is no ‘field is being changed’ prehook. I imagine, from the side of Pipefy, that this is rather dangerous and would lead to bad user experience, as they cannot control what to do when e.g. your pre-hook is slow, doesn’t return, throws an error, does not follow the standard, etc. – I suppose for Pipefy, maintaining such a possibility would be a nightmare.

 

With the workaround I describe: yes, your card might have an invalid value in the field, but not more than e.g. you define an empty value to be invalid, I would argue it is a pretty simple yet somewhat clean solution.


@genietim  I completely agree that maintaining prehooks might be hard thing to do.

That’s why i suggested to have option for some http source (json link) where it cal pull all the options for dropdown. Of course, this definitely adds some room for vulnerabilites, but it is common thing nowadays(verify domain through .wellknown and etc.) , yet i agree that, this is really extraordinary feature. 

But this is just suggestion, just thought i had to share this idea.

 

Hi @Rodrigo Subirá , thank you for checking this out! 

To answer your question - I guess so, but it depends on solution. 

 

 

 

 


Yes, you are right, @tamerlan-abilov we are here on this forum to submit ideas, not to think of technical solutions or problems. And it is an awesome idea after all, no matter how realistic or easy it is


Great, you are right guys, this is the place for the new ideas! I'm submitting it here, so for if any solutions of this type are prioritized in the future, this case can be taken into consideration! Thanks for the contributions!


NewSubmitted

It’s a good idea!