I am starting some testing with workflows. I have just removed everything from the canvas. I set the workflow to be triggered by a webbook. I have copied the URL and in an app, created a rest query using the URL and sent off a simple object to the workflow. When the data gets recieved into the workflow, how do I use it in an app? I have a transformer that is referencing the workflow query in an app and it isn't returning anything after the workflow is triggered. My main goal here is I want to do something in the app that changes something. I want to trigger a webhook workflow and include the changed data so that any other people signed into the same app will be working off the same changed data. Anyone have any ideas what I might be missing?
Assuming you have a webhook return block in your webhook you can access the data it returns in the success handler of your app as you would with a regular query.
@dcartlidge Thanks for responding. I don't think I am understanding how to do this. I do not see anything called a return block. I see a response block but I am reading that it just returns something back to the place that called the webhook. The below image I believe shows graphically what I am trying to do.
So two people are using the same app. One person changes something in there instance of the app. The other person does nothing but the app suddenly loads in the same data that the other user changed.
Response Block is the name, you're correct and sorry for confusing it further.
What I understand you're trying to do is something I've personally implemented in apps using websockets (via Pusher) to create a live pub/sub style app.
There's a good primer blog post about doing that here -> Real-time Retool - The Goe Getter
I've not done that with workflows because they weren't around then but I'll have a play around and see what's possible.
@dcartlidge Thanks for the link! Live would be great. I could still make it work if I could somehow get a workflow to feed back down into all app instances.
@dcartlidge So I setup a Pusher account. Seem to be working just as I was hoping! Thanks for the tip.