# How to redirect to external page in workflow?

**URL:** <https://community.weweb.io/t/how-to-redirect-to-external-page-in-workflow/2808>\
**Category:** How do I?\
**Created:** [May 25, 2023, 8:31am UTC](https://community.weweb.io/t/how-to-redirect-to-external-page-in-workflow/2808 "2023-05-25T08:31:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [May 25, 2023, 8:31am UTC](https://community.weweb.io/t/how-to-redirect-to-external-page-in-workflow/2808/1 "2023-05-25T08:31:44Z")

</div>

I want to redirect someone after they completed a workflow action to a URL that is returned from a previous workflow step. How do I do it?

Example:  
Trigger: User clicks on a button.  
Workflow action step 1: Change something in Xano, it returns back an external website’s URL  
Workflow action step 2 (HOW?): I want the user to be redirected to this external URL that has been returned from step 1.

How to do this? I tried to save the URL from action step 1 into a variable and binding the variable to the button’s link, but it doesn’t work because when I click on the button, the workflow has not been triggered yet, so the URL from step 1 has not been saved to the variable yet, and I go nowhere.

---

<div class="post-metadata">

**Author:** ![aurelie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/aurelie/32/13249_2.png) [@aurelie](https://community.weweb.io/u/aurelie)\
**Post date:** [May 25, 2023, 12:15pm UTC](https://community.weweb.io/t/how-to-redirect-to-external-page-in-workflow/2808/2 "2023-05-25T12:15:32Z")

</div>

Hi,  
when you are defining a workflow action, you have access to previous actions results in the explorer (no need to create a variable)  
Then you have access to a Change Page action.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/020e0790f9adb683474abd4bc810b7b5c5211218.png)

---

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [May 25, 2023, 12:41pm UTC](https://community.weweb.io/t/how-to-redirect-to-external-page-in-workflow/2808/3 "2023-05-25T12:41:31Z")

</div>

Hey Aurelie! It doesn’t allow me to “change page” to an external URL (my Stripe check out page) ☹

I get the following error when I try to do what you described:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/c1398bb149deaf17d630c59ed5a6d4c0206e3b0d.png)

---

<div class="post-metadata">

**Author:** ![raydeck](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raydeck/32/384_2.png) [@raydeck](https://community.weweb.io/u/raydeck)\
**Post date:** [May 25, 2023, 7:09pm UTC](https://community.weweb.io/t/how-to-redirect-to-external-page-in-workflow/2808/4 "2023-05-25T19:09:15Z")

</div>

If you have a whole url, try making a javascript step and provide:

```auto
window.location.href =

```

Then paste your variable onto the end of the above. This will result in something that looks like :

```auto
window.location.href = context.workflow['91df9b0a-5709-4f2d-ae41-fb974f4a2974'].result

```

setting the value window.location.href tells the browser to change pages. This is not the only way to navigate, but it’s very flexible: should take you anywhere you want to go!
