I’ve set up a Zapier automation that gets triggered when someone clicks a link in an email. The workflow connects to Google Calendar and removes specific events, which works great. But there’s one problem I’m trying to solve.
When users click the link, they see a JSON response that looks something like this:
Instead of showing this technical JSON data, I want users to see a proper HTML page with a friendly message. Is there a built-in Zapier feature for this, or do I need to write custom code? What’s the best approach to display HTML content instead of the default JSON response?
Had this exact problem six months ago with an email workflow. Here’s what fixed it for me: use a Code by Zapier step that returns HTML instead of JSON. Set the response content-type header to ‘text/html’ and structure it like this: callback(null, [{html_response: '<html><head><title>Success</title></head><body><h2>Your request has been processed successfully!</h2><p>You can close this window now.</p></body></html>'}]); Users get a clean confirmation page instead of ugly JSON. Just make sure you’re formatting the HTML the way Zapier expects for webhook responses.
yea, zapier’s webhooks by defualt are all about JSON, so u gonna need some custom code. just throw in a js step after your calendar action to send back HTML. u could use something like return {html: '<html><body><h1>Success! Your events have been removed.</h1></body></html>'} for a nicer user experiance.
I hit this exact problem last year building an appointment cancellation automation. Here’s what works: Zapier webhooks return whatever you put in the final step. Don’t use the default JSON - add a Code by Zapier action at the end and return HTML instead. The trick is structuring the return correctly: return [{status_code: 200, headers: {'Content-Type': 'text/html'}, body: '<html><body><h1>Done!</h1><p>Your calendar events have been successfully removed.</p></body></html>'}]; You get full control over what users see and it looks way more professional.