Forum Academy Marketplace Showcase Pricing Features

How do I send the user to an external URL using a server-side action?

I want to send the user to an external page using a server-side action.

I don’t want to fetch a URL or do a background request. Instead, I want the user to be redirected to the external URL.

Something like window.location.href = "https://www.google.com"; that works on a client-side action does not work server-side.

Is there a specific Node.js module or code snippet I can use for this?

I’ve tried searching on stackexchange.com etc but can’t find anything that works.

Since the code runs on a server, how could the browser be aware of it?
One way: you can simply add a second workflow action that runs in the browser that will do the redirection to a URL you returned from the server side action.

2 Likes

Not a bad idea :slight_smile:

@Minty did you ever find a way of doing this in the server-side action?

Not possible to do it server-side

A solution ^^^^ have you check this out @phillipwebb95