I have done this with a webhook in Make. Here is some sample code for how to send the webhook.
In the part that handles the response, you will want to modify the text of some <div> or <span>. There are good examples of that elsewhere in this forum as well, but if you can’t find it, let me know and I’ll dig it up.
the reason I think this is possible is because I saw this hot seat session where the guest says that they are pulling a python flask app from replit into a custom code block in softr.
Can you post the JavaScript that calls the webhook?
What I had expected you’d do is call the webhook, then the webhook would send back a response with the content you want to display in the custom code block. So I was expecting that the JavaScript would have a completion function that is passed the response from the webhook.
That sounds simpler than what I am trying and it is of course possible I am overcomplicating …
What I’ve currently done -
user enters question in form block
question sent to zapier (catch webhook)
question sent from z to flask app run in replit (push webhook)
flask app runs python code that generates response
The next bit I’m trying to do is fetch the response from the flask app endpoint. All I’m trying is custom code in Softr block (immediately beneath the form block).
But perhaps your solution gives me a simpler way to do this?
Take a look at the sample code I linked to above. I think you should be able to do the same kind of thing, assuming Zapier supports sending response content in a webhook. I don’t know what CATCH and PUSH are, but I’m guessing CATCH means when you make the request to Zapier, and PUSH is the opposite?
Looks great @thomasoliver
That said, really hoping Softr provide us with more AI blocks types out of the box that are able to work with the various AI models. So at least a more chat-like interface, where multiple subsequent questions can be ask and that’s able to plugin to chatGPT for example.
Also a custom code generator that’s auto-magically gets feeded the current html/js/css code of the current page your working on, alongside the user request!