How to receive data by Webhook

I want to run aromatically my flow when receive a data by Webhook. Then I get the data that has been sent to my Webhook and save it to my database.

I added Webhook node and set it to “GET”, but when thirds party website send data, it can’t receive data in json for example.
Could please advise me?

Hello!
With what do you have problems? With the Test-Webhook or the Production-Webhook?
You have to be aware that that the Test-Webhook is only active and reachable when you are currently testing (so when you pressed “Execute Workflow” and it the says “Waiting for Webhook-Call”) and then also just for for one call. After the Test-Webhook got called the first time it displays the data in the Editor-UI and then gets directly deactivated again.
The Production-Webhook is only active when the Webhook got activated. You will never see its data in the Editor-UI. You will only see it under Past Executions.

1 Like

In my case:

I work with a online gateway that when my users submit a translation it tells me through callback.

In my previous try (I worked with flowxo), When I submitted flowxo Webhook as callback URL, I could get all information about that user transaction. (like below screenshots)

Unfortunately,When I try to use my webhook (or test) address (in n8n.io) for callback address to get my users transactions information.my flow is not start automatically.
I want to start my flow automatically after receive information by Webhook and then save theme to my database for example.

The wired thing is that when I manually open Webhook (or test) in my browser the flow is run and Webhook url collect some information but by my online gateway callback system the flow is not strarted while in flowxo it is started.

Did you copy the correct Webhook URL? The Test-Webhook-URL and the Production-Webhook-URL are different. If that is not the problem it could be that you did not activate the workflow. Production-Webhooks work only when the workflow got activated.

In fact:

  • My workflow is active.
  • When I copy Webhook (or test) address in my browser it run the flow but same address in my callback address not work. (My address is true)
  • I know test address and productive address are different.

Could you probably have same situation?

Hm does then not make any sense for me right now. If it works for you, when you test it with your browser, it also has to work when other services call it.

The only thing I can now think off is that you have it running locally and you do not use a tunnel and have so a “localhost” address. Then it would do exactly what you described. As your computer would resolve “localhost” to itself (and would so work) and other services would resolve localhost to themself and would so obviously not work. Or another version, that the server you have n8n running on is only accessible for you but not for anybody else (for example because of a firewall).

You right
at this test period time I onbound my port on firewall an I use directly my IP instead localhost, outside of my server.
one question please:

I tested “fenix webserver” Webhook for test that I see my online gateway api on other Webhook, it’s interesting that Webhook on fenix also can not receive data from my gateway as a callback.

why some Webhook on some sites like flowxo could get that data but these Webhooks not?

Or maybe is it because of my firewall to ban received data to Webhooks that wait for call on my windows server?

Sorry, do honestly not understand the question. But what the “fenix webserver” (which I sadly do not know at all) is doing for its webhook is exactly and 100% the same what happens when the tunnel option of n8n gets used which is described here:

It even uses the same underlying code (as also the n8n tunnel uses under the hood the code of localtunnel.me). So if you want to just test the webhook on your local machine that external services can reach it till you have a proper setup on a webserver you can simply use that one.

Sadly do also not have any experience with flowxo. But they are a hosted service. So that means they took care of that by having a domain which can be accessed by all services world-wide. n8n is self-hosted and so it is on the person who wants to use it, to set it up correctly that it can be reached by other services. To make that very easy for testing and development I added the tunnel (mentioned above). For long term production use n8n has to be hosted on a webserver (best with own domain) to be also accessible by other services and to run 24h a day.

Did that answer your question?

Thank for following.
In fact not.
I try it by internal tunnel ( …n8n.cloud/…) that you set in n8n, but I don’t know why my Webhook doesn’t any action against calling.
As I said when I open my Webhook address in my browser in any device it works.
I send an email to my online gateway and ask them the difference.

Hm very strange! Then I hope they are able to help you!

Again picking up on an old thread as I have a similar question.

I am doing a curl to a production webhook URL

$ curl "https://n8n.example.com/webhook/1/webhook/foo?txt=something"
{"message":"Workflow got started."}

and I expected to see the parameters in the node but all I see are

  • authentication
  • httpMethod
  • path
  • responseCode
  • responseMode

What am I missing?

The key and value for “txt” should be in the flow data as query.

Is best you try with a Test-Webhook first. Execute the workflow and then call the Test-Webhook with curl like above (or simply with the browser). You will the see the data directly.

You can also check out the video tutorials @svenjanssen did create. There it is also explained how webhooks work and how they can be tested.

You can find them here:

I wish it would work like in the video :-/

When I press execute on the workflow it says “waiting for webhook”. When I then use curl the notification arrives on the final node - but it keeps saying “waiting for webhook” until I stop it. (Maybe because of other nodes?) The webhook node still does not show any data. But below it shows the little trashcan for the execution data.

When I press execute on the webhook node I would think it should wait for the webhook to arrive. But after a few seconds it just returns, shows empty data and says “workflow executed”. But the final node does not get notified.

I don’t quite get the idea behind the test webhook thing yet - or how it would make things different. Also it says

{"code":404,"message":"The requested webhook is not registred."}

Do you use reverse Proxy configuration?

Yup. Like this:

upstream backend {
  server 127.0.0.1:5678;
}

server {
  server_name n8n.example.com;
  listen 0.0.0.0:443 ssl;

  ssl_certificate     /etc/dehydrated/certs/n8n.example.com/fullchain.pem;
  ssl_certificate_key /etc/dehydrated/certs/n8n.example.com/privkey.pem;

  include /etc/nginx/ssl.conf;

  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

  location / {
    proxy_pass http://backend;
  }

  location ^~ /rest/push {
    proxy_pass http://backend;

    proxy_buffering off;
    proxy_cache off;
    proxy_set_header Connection '';
    proxy_http_version 1.1;
    chunked_transfer_encoding off;
  }
}

Seem like a curl on the host

curl "http://127.0.0.1:5678/webhook/1/webhook/foo?txt=msg"

gives the same behaviour.

It looks for me like you are making a request to the Production-Webhook when you want to make one to the Test-Webhook instead.