You build a small workflow, Hello. Your browser calls n8n, and n8n answers. The node that waits for the call is a Webhook.
See what runs
-
In the terminal, run:
cd ~/kingo-pod && ./kingo statusYou see one line for each service, with its status and its address. n8n is at
localhost:5678, Langflow atlocalhost:7860.
Build WS2.10 - Hello
-
In n8n, click Create workflow. Click its name at the top and give it this name:
WS2.10 - Hello -
Add the first node: a Webhook (type
Webhookinto the search). Rename itwebhook_hello. Set it like this:HTTP Method: GET (as it comes). Respond: Using ‘Respond to Webhook’ Node. Path:
hello -
Click the dot on its right and add a Respond to Webhook node. Rename it
send_greeting. Set it like this:Respond With: JSON. Response Body: switch it to Expression and paste:
{{ { greeting: 'Hello, ' + ($json.query.name || 'you') } }} -
Try it. Click Execute workflow at the bottom. n8n now waits for a call. Open a new browser tab and go to this address. Put your own name in place of Mina:
http://localhost:5678/webhook-test/hello?name=MinaThe tab shows the greeting. In n8n, you see the run on the canvas.
-
Publish the workflow: click Publish at the top. In the window that opens, click Publish again. Now the Production URL works too, without Execute workflow:
http://localhost:5678/webhook/hello?name=Mina
Well done: your browser called n8n, and n8n answered “Hello, Mina”. You built your first Webhook: an address where n8n waits for a call. This is how a page, a form or another app starts a workflow. Your own page uses exactly this in block 2.
Stuck? Import n8n/ws2_10_hello_solution.json. It gives you the finished workflow WS2.10 - Hello - SOLUTION. Publish yours or the solution, not both: they use the same address.