I am currently using Retool Workflows to try and create API access to Retool DB. Is there a way to filter Retool workflow runs based on which HTTP VERB was used to trigger the workflow? To create an API, I would like some workflows to only respond to a GET, POST, or DELETE.
This traditionally would be done with some sort of routing file. Retool's workflow view offers the benefit that less technical team members can contribute to the work. At this point, it seems like Workflows are not really meant to create an API, but I would like to be sure I have not missed functionality that is available in Retool.
Our specific use case: We are tracking analytics in Retool DB from landing pages created outside of Retool (Webflow). These landing pages need to log events done by a user into our Retool DB.
Thank you for your response. I am currently using webhooks, but my question is about branching the logic based upon the HTTP VERB of the incoming request. I would like the behavior of the code to be different if it is a GET or a POST request. See screenshot attached.
I was inquiring to see if this functionality already existed.
If not, then I would be making a feature request that the metadata object included in the workflow also include the HTTP_VERB.
Super cool use case. Currently there is not functionality to build conditional logic into the type of request that is received by the webhook
I had another user make a similar request as they were also looking to use workflows as a type of backend. I can definitely add your +1 to this feature request and keep this thread updated with any news I hear from the team!
In the short term, you might be able to set up a work around exactly like your sceen shot. Where you are able to access a string from the webhook's startTrigger.data to then run conditional if statements on the payload.
I would imagine this might end up being architected in a similar to how with GraphQL it is always a 200 but nested in the data payload is the true information, but in this case you would always send either a get or post, but inside of the payload you would have a string of get/post/delete for the workflow to access.