How do I update a webpage dynamically based on data from Pipedream?

This topic was automatically generated from Slack. You can find the original thread here.

Peter Roden : WOW Pipedream is really powerful. I’m just scratching the surface.
I’d like to ask some advice on how to update a webpage with a message from Pipedream.
I’m confused about how to end a workflow and have a webpage updated with a text string.
I have a form that posts to a Pipedream endpoint.
The actions in the workflow get done successfully, however I get the following message on a new screen, rather than on the previous website page.
Success!
To customize this response, check out our docs here

Dylan Sather (Pipedream) : love it!

Do you have an existing page where you want to adjust just a small element / text based on the response from Pipedream, or do you want Pipedream to return the HTML for a full webpage to display to the user?

Peter Roden : Yes, I just want to return a text based response on the page that issues the request to Pipedream.

Dylan Sather (Pipedream) : Thanks. Here’s how I’d do that:

• I’d make the HTTP request from the page, using JavaScript, on the relevant action (button click, etc)
• You should use the HTTP API trigger in your workflow. When you’ve processed the request, you should use the $respond() function to respond with your data.
• Your client-side code on the page should handle the response and update the text accordingly.

Peter Roden : That makes sense. I will give it a go. Thanks