Close window after webhook call

Is it possible to close the window after a webhook is triggered?

In Make, I used to do it with the Webhook response that returned an HTML with a script
In Activepieces, it seems that the return HTTP can only return either JSON or a string. Is there a workaround?


the HTML in Make and the Raw response in Activepieces flow seems to be the same.
unable to find the problem in your screenshots

Activepieces passes it in the body of the HTML as a string, so the script is part of that string and does not work
image

I found in the forum this workaround for redirects

I wonder if there is a similar “hack” to close the window instead of a redirect

try adding Content-Type header and put its value as text/html

2 Likes

That’s it. Thank you!!

@christos Can you please share Quick snapshot of what you for your flow?

I shared the screenshot above. Basically a link on Google Sheets to trigger a webhook, then the new page to close and the user to go back to Google Sheets automatically. The solution from Abdul worked great

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.