# Webhook Creating Endpoints Part 1

## Метаданные

- **Канал:** n8n
- **YouTube:** https://www.youtube.com/watch?v=GDZArgLKu7o
- **Дата:** 01.02.2021
- **Длительность:** 2:40
- **Просмотры:** 9,315
- **Источник:** https://ekstraktznaniy.ru/video/15922

## Описание

In part one of two videos, we will be setting up a custom endpoint for the webhook and then returning information based on what was queried in the request.

Resources:
- n8n Website - https://n8n.io/
- n8n Documentation - https://docs.n8n.io/
- n8n Community - https://community.n8n.io/
- n8n Workflows - https://n8n.io/workflows/
- n8n Webhook Node - https://docs.n8n.io/nodes/n8n-nodes-base.webhook/

A Basic Introduction to Webhooks - https://markheath.net/post/basic-introduction-webhooks

## Транскрипт

### Intro []

in today's video we're going to show you how to make a web hook or api endpoint so we're just going to open up

### Trigger Node [0:05]

a trigger node a web hook trigger node and in that webhook trigger node you'll

### HTTP Method [0:10]

notice that there's an http method by default it's set to get which is the most common one but there are a couple other options there that do modify how things are done so we'll just

### Response Mode [0:20]

reset it back to get you'll also notice that there's a response mode and by default it's set to on received but what we're going to do is we're going to move it to last node and what that does is when it executes the workflow it'll respond back with the information that's in the workflow and you'll notice that there's a new response data we're just going to use the one that's by default

### Endpoint Path [0:42]

again you'll see we have our webhook url and um by default it gives it a random path so we're going to change that path to something a little bit easier to remember and we're just going to call it endpoint and we'll save that there and now when

### Endpoint URL [0:57]

we go back into the webhook urls you'll notice that it says endpoint instead of that random string so we'll click on that and put that into our clip clipboard and we'll just close down the

### Close Webhook Node [1:09]

web hook node um because we have the webhook node we don't really need the start nodes we're just going to set it aside here and uh we'll save this workflow because

### Save Workflow [1:18]

once again a web hook nodes require them to be saved before you can do any testing all right so we're going to add another

### Add Set Node [1:28]

node so we're just going to grab a set node here and attach it to the system

### Add String [1:35]

and we're going to add in a string you'll notice i've set the keep only set so that it only sends one thing

### Keep Only Set [1:43]

so a quick note as to why i turned on the keep only set option in the set node there's a lot of extra information coming in from the web hook and we really don't want this information going out when responding back to the call so when we turn this on only the information that is set in the set note itself will be forwarded on to the api anyway back to the video so we're going to call

### Response [2:09]

this the response and the response is going to be message received all right so then we'll close that node

### Execution [2:20]

so now that we have both of them done we'll just save that again make sure we've got everything saved properly and then we're going to execute the workflow i'm going to go into the other web browser and we're going to paste in the uh endpoint that we had there and you'll notice now the response is message received exactly the way we put it in thanks for watching
