# Webhook response with redirection to a customURL Error

**URL:** <https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004>\
**Category:** Questions\
**Tags:** error, webhooks, connections\
**Created:** [December 15, 2023, 5:11pm UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004 "2023-12-15T17:11:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![LxKl](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@LxKl](https://community.make.com/u/LxKl)\
**Post date:** [December 15, 2023, 5:11pm UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/1 "2023-12-15T17:11:33Z")

</div>

Hi, I have created a webhook response with redirection to a URL after passing a variable filter, in the make it shows as a successfully completed task, but in the browser it does not redirect (Accepted message), can you help me with a solution, I have tried 307, 302, 301 and 200.

Thank you

 ![Captura de pantalla 2023-12-15 a la(s) 12.04.30 p.m.](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/2/029332eb569640d1bed4c004054be92d0e538203.png)  
 ![Captura de pantalla 2023-12-15 a la(s) 12.04.57 p.m.](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/a/8a8b3d0fc8a196d8a2c5db1281083954f48a5934.png)

---

<div class="post-metadata">

**Author:** ![IOA\_Brett](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/ioa_brett/32/16853_2.png) [@IOA\_Brett](https://community.make.com/u/IOA_Brett)\
**Post date:** [December 15, 2023, 8:07pm UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/3 "2023-12-15T20:07:02Z")

</div>

Hello Luis,

The custom Location header combined with a 301 status should redirect the user. I’ve copied your redirection in a scenario and It’s working for me.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/a/ba262376f74ca6afc6ec6208f1f4f9d453d012ca.png)

One issue that you may be experiencing is a caching issue. Try fetching the [make.com](http://make.com) webhook endpoint in an incognito tab and see if it works.

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [December 16, 2023, 7:04am UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/4 "2023-12-16T07:04:17Z")

</div>

> [@LxKl](#):
>
> but in the browser it does not redirect (Accepted message)

Is the user pasting your Webhook URL in the browser address bar, or is your Webhook URL called from JavaScript on your web page (i.e.: when user clicks a button to trigger an event).

If it’s the latter, you’ll need to update the script to handle the redirect.

---

<div class="post-metadata">

**Author:** ![LxKl](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@LxKl](https://community.make.com/u/LxKl)\
**Post date:** [December 16, 2023, 2:27pm UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/5 "2023-12-16T14:27:35Z")

</div>

Hello @samliew , is the second option, when people click on a form submission button, my desire is to have several redirections according to the response parameters of the customer’s form. Do I include the script in the body of the response module? is there a suitable script?

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [December 16, 2023, 2:49pm UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/6 "2023-12-16T14:49:46Z")

</div>

> [@LxKl](#):
>
> Do I include the script in the body of the response module?

No, you have to edit the script on the external web page to perform the redirect.

E.g.: depending on the actual script, this is an example:

```javascript
// where "Body" field in your Webhook response module contains the URL,
location.href = response.body; 

```

Without knowing what the script on the web page looks like, I am unable to assist further. Could you provide that script, and provide a link to the web page?

---

<div class="post-metadata">

**Author:** ![LxKl](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@LxKl](https://community.make.com/u/LxKl)\
**Post date:** [December 16, 2023, 2:58pm UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/7 "2023-12-16T14:58:10Z")

</div>

thanks, where can I find the script on the external page?  
for example, if I want to redirect to [google.com](http://google.com)…

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [December 16, 2023, 10:19pm UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/8 "2023-12-16T22:19:16Z")

</div>

How is the form pointed to the Webhook on Make? Can you provide the link to the form, or source code for the form, or the script that handles the form submission, if any?

You haven’t provided much information about this form yet.

---

<div class="post-metadata">

**Author:** ![LxKl](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@LxKl](https://community.make.com/u/LxKl)\
**Post date:** [December 18, 2023, 1:26pm UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/9 "2023-12-18T13:26:09Z")

</div>

Hello @samliew this is the tally form:

> **[¡Hola!](https://tally.so/r/mKVr8k)**

Forms hosted on a custom domain (my case) have access to a code injection block. This allows you to inject code snippets or custom styles on both form and domain level.

This is how you send the tally form to the webhook:

```auto
 HTTP status code	200
Request to your endpoint	
{
  "eventId": "c227bc63-5883-4647-8e70-f48e779a74f0",
  "eventType": "FORM_RESPONSE",
  "createdAt": "2023-12-16T17:35:15.104Z",
  "data": {
    "responseId": "A8kbYy",
    "submissionId": "A8kbYy",
    "respondentId": "Bkza5R",
    "formId": "mKVr8k",
    "formName": "Perfilacion larga",
    "createdAt": "2023-12-16T17:35:14.000Z",
    "fields": [
      {
        "key": "question_Ek7VxB",
        "label": "a. ¿Cuál es tu nombre?",
        "type": "INPUT_TEXT",
        "value": "luisa"
      },
      {
        "key": "question_rjM9o2",
        "label": "b. ¿Cuál es tu apellido?",
        "type": "INPUT_TEXT",
        "value": "gonzalez"
      },
      {
        "key": "question_ODMqGg",
        "label": "c. ¿Cuál es tu número de teléfono?",
        "type": "INPUT_PHONE_NUMBER",
        "value": "+573191110049"
      },
      {
        "key": "question_BzWYNA",
        "label": "Seleccionar País",
        "type": "DROPDOWN",
        "value": [
          "c3ce00bb-c731-46fe-9fe7-1e5e0fc8cac2"
        ],
        "options": [
          {
            "id": "c3ce00bb-c731-46fe-9fe7-1e5e0fc8cac2",
            "text": "Alemania"
          },
          {
            "id": "d41967de-639c-4898-ad01-ad6f75478468",
            "text": "Argentina"
          },
          {
            "id": "26bc2d7a-be05-46fb-8ea7-74e75ddf18c1",
            "text": "Australia"
          },
          {
            "id": "6ed371da-e7d3-406d-bfa9-1b00e5ced951",
            "text": "Bahamas"
          },
          {
            "id": "1bf6a2ca-7766-4c78-9faa-39fd4fcd4aac",
            "text": "Barbados"
          },
          {
            "id": "8b662a6c-e6a1-4329-83cb-4ad2467c6b4a",
            "text": "Belice"
          },
          {
            "id": "4e60d09f-3700-4ff2-aad7-ba6aabff8ccf",
            "text": "Bolivia"
          },
          {
            "id": "f03f401c-02aa-4386-a342-6485601fb79e",
            "text": "Brasil"
          },
          {
            "id": "a915dd7b-0dbd-4064-849d-50d8ca48042f",
            "text": "Canada"
          },
          {
            "id": "b6802637-c7af-4f53-9001-f35a2add9179",
            "text": "Chile"
          },
          {

            "id": "0c975303-2427-48d0-be00-29d6a9f05805",
            "text": "Colombia"   

```

 ![Captura de pantalla 2023-12-18 a la(s) 8.21.08 a.m.](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/e/4/e400ac8a6ad257f8c7905be1eb9628aaa3414e60.png)

Thank you

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [February 6, 2024, 12:03pm UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/11 "2024-02-06T12:03:43Z")

</div>

It appears that you’ve used a server-side integration, not a frontend-injected script. For Webhook redirects to work, the frontend (displayed on the user’s browser) needs to perform the redirection.

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [May 6, 2024, 11:04am UTC](https://community.make.com/t/webhook-response-with-redirection-to-a-customurl-error/22004/12 "2024-05-06T11:04:03Z")

</div>


