Order Webhook for n8n
どのアプリからの注文も受け付ける安全な n8n Webhook。キーと各注文をチェックし、正しい注文をデータ テーブルに保存して、すべての呼び出し元に応答します。Docker 上の n8n 2.48.7 付き。
- n8n
- n8n Webhook node
- n8n Code node
- n8n If node
- n8n Data table node
スクリーンショット
- 最新リリース
- 1.0.0 · 2026/11/21
- ライセンス
- Source Code Licence
概要
n8n 用の注文 Webhook の完全なソースです。あなたの秘密キーを持つ呼び出しだけを受け付け、JSON の各注文の顧客、書名、数量をチェックし、正しい注文を n8n のデータ テーブルに保存して、保存した注文(201)または問題の一覧(400)を返します。2 つのワークフロー、ワンクリックのテーブル作成、n8n 2.48.7 の Docker Compose を含みます。macOS でテスト済み。
ショップ、フォーム、アプリには、注文を送る先が必要です。Order Webhook for n8n は、その送り先をすぐに動かせる形でお届けします。あなたのキーを持つ呼び出しにだけ応答し、すべての注文をチェックし、正しい注文を保存して、何が起きたかを呼び出し元に正確に伝える Webhook です。下に挙げた応答はすべて、macOS 上の n8n 2.48.7 と Docker Desktop で実際に呼び出してテストしました。
できること
- どのアプリからも注文を受け付けます。 ショップ、フォーム、スクリプト、ほかのサービスが、各注文を JSON で
http://localhost:5678/webhook/ordersに送ります。 - あなたの呼び出し元だけを通します。 n8n の Header Auth が、呼び出しのたびに
X-API-Keyヘッダーをチェックします。キーがないか間違っていると、ステータス403とAuthorization data is wrong!が返り、ワークフローは始まりません。 - すべての注文をチェックします。 顧客と書名はテキスト(最大 100 文字と 200 文字)、数量は 1 から 100 までの整数である必要があります。最初の 1 つだけでなく問題をすべて一覧にし、ほかの項目は保存しません。
- 正しい注文を保存します。 正しい注文はそれぞれ Orders データ テーブルの 1 行になり、固有の
idと保存した時刻が付きます。 - すべての呼び出し元に応答します。 保存した注文はステータス
201と新しい行とともに返ります。問題のある注文にはステータス400が返り、何も保存されず、直すべき項目が応答に一覧されます。JSON でない本文には n8n 自身の422が返ります。 - テーブルを自分で作ります。 セットアップ用ワークフローがワンクリックで Orders テーブルと列を作ります。もう一度実行しても何も変わりません。
- 必要なら n8n も動かします。
compose.ymlが Docker で n8n 2.48.7 を起動します。アクセスできるのはあなたのコンピューターからだけで、ポートとタイム ゾーンは必要に応じて.envで指定できます。
インストール
- アーカイブを展開し、そのフォルダーでターミナルを開きます。
docker compose up -dで n8n を起動します。すでに n8n 2 を使っている場合は、この手順を飛ばします。http://localhost:5678を開いてオーナー アカウントを作成し、workflowsフォルダーから 2 つのワークフローをインポートします。- Set up the Orders table を一度実行します。
openssl rand -hex 32などで長いランダムなキーを作り、New order ノードの Header Auth 認証情報にX-API-Keyという名前で保存します。- Order webhook を公開し、最初の注文を送ります。
スクリーンショット付きの全手順: How to Set Up and Run the Order Webhook for n8n (新しいタブで開きます)(英語)
知っておきたいこと
- ルールは 1 か所で変更できます。 数量とテキストの長さの上限は、Check the order ノードの先頭にあります。
- n8n は同梱していません。
compose.ymlは n8n の公式イメージをダウンロードし、それには n8n 自身のライセンスが適用されます。 - macOS でテスト済みです(Docker Desktop を使用)。
仕組みを学ぶ
無料の n8n Tutorial for Beginners (新しいタブで開きます)(英語)で n8n を基礎から学べます。Part 4: Webhooks: Start a Workflow from Any App (新しいタブで開きます)(英語)ではこの Webhook の最初の版を作り、How to Secure an n8n Webhook with Header Auth (新しいタブで開きます)(英語)ではキーを、How to Send a Custom Response from an n8n Webhook (新しいタブで開きます)(英語)では応答を解説しています。
n8n は n8n GmbH の商標です。Docker は Docker, Inc. の商標です。その他の名称は各所有者の商標です。
無料チュートリアルシリーズ
n8n Tutorial for Beginners
作りながら学びたい方へ。ブログの無料ステップガイドで、このプロジェクトの作り方を順を追って紹介しています。
手に入るもの
アーカイブの中身が一目でわかります。
- 完全なソースのバージョン 1.0.0: n8n ワークフロー 2 つ、Docker Compose ファイル、.env の例、README
- Order webhook ワークフロー: Webhook の Header Auth、各注文をチェックする手順、正しい注文をデータ テーブルに保存する手順、2 つの応答(201 と 400)
- 変更できるチェック: 必須の顧客と書名、1 から 100 までの整数の数量、見つかった問題すべての一覧
- Orders データ テーブルをワンクリックで作るセットアップ用ワークフロー
- n8n 2.48.7 の compose.yml。あなたのコンピューター専用で、ポートとタイム ゾーンは .env で指定
- セットアップ手順、注文の形式、すべての応答、設定、トラブルシューティング、片付けを載せた README
使用している技術
開発と動作確認に使った実行環境とバージョンです。
- n8n2.48.7
- n8n Webhook node2.2
- n8n Code node2
- n8n If node2.4
- n8n Data table node1.1
- n8n Respond to Webhook node1.5
- Docker Compose5.7.0
- Docker Engine29.9.3
アーカイブの中身
展開したあとに手元に残るファイル構成です。
order-webhook-n8n/
- .env.example
- .gitattributes
- .gitignore
- README.md
- compose.yml
- workflows/
- order-webhook.json
- set-up-orders-table.json
必要になるもの
動かすために必要なアカウントやサービスです。あとから驚くことはありません。
- 自分で動かす n8n 2(無料の Community Edition で十分)、または付属の n8n を動かすための Docker
- compose.yml を使うための、macOS か Windows の Docker Desktop、または Linux の Docker Engine
- コンピューターの空きポート 1 つ(初期設定は 5678)
- JSON とヘッダー付きの HTTP POST を送れるアプリ、フォーム、またはスクリプト
リリース
これまでのすべてのバージョンを新しい順に並べています。
1.0.0最新
完全なソースの最初のリリースです。
- あなたのキーを持つ呼び出しだけを受け付け(Header Auth)、すべての注文をチェックする Order webhook。
- 正しい注文は n8n のデータ テーブルに保存されてステータス 201 で応答し、問題のある注文にはステータス 400 と直すべき点の一覧を返します。
- Orders テーブルをワンクリックで作るセットアップ用ワークフロー。
- compose.yml による Docker 上の n8n 2.48.7(macOS でテスト済み)。
Source Code Licence
利用できる範囲
What you may and may not do with the source code you buy.
ライセンスの全文を読む
- What this licence covers
This licence governs every file included in a product you buy from Dewiride Store: source code, configuration, database scripts, sample data, documentation and any other file in the download. It takes effect when your payment is confirmed and applies to every release of that product that reaches your library. Files that reach your library through an annual updates membership are governed in exactly the same way.
It forms part of the Terms of Sale and Use. Where a product page states different or additional licence terms for that product, those terms prevail for that product. The membership page may likewise state different or additional licence terms for the files a membership carries, and those terms then prevail for those files.
- The licence we grant you
We grant you a perpetual, worldwide, non-exclusive, non-transferable licence to use, reproduce, adapt, translate and modify the files, and to include the result in your own work, on the conditions set out below.
Perpetual means it does not expire. Worldwide means it is not limited to any country. Non-exclusive means we license the same product to other customers. Non-transferable means you cannot pass it on to someone else.
The licence is granted to you — either you personally, or the organisation you identified when buying. Everyone working within that organisation may use the files for that organisation’s projects. Nobody outside it may.
- What you may do
- Use and change the files in your own projects, commercial or otherwise, with no limit on the number of projects.
- Build a product or a service on them and charge your own customers for it.
- Deploy the result for a client, as part of work you are doing for that client.
- Distribute the result in compiled, deployed or otherwise non-source form.
- Keep as many back-up copies as you reasonably need.
- Study, observe and test how the code works, and obtain the information you need to make it work with your own software.
The last two are yours by law under sections 52(1)(aa) to (ac) of the Indian Copyright Act, 1957, and nothing in this licence is intended to take them away.
- What you may not do
- Resell, sublicense, redistribute or publish the files themselves, in whole or in substantial part, in source form.
- Include them in a template, starter kit, course, tutorial repository or component library that you sell or give away, where the code is the thing being supplied.
- Share your account, your download links or your invoices with anyone outside your organisation.
- Publish the files in a public repository, or in any other place where they can be obtained without buying them.
- Remove or obscure the copyright and attribution notices in the source files.
- Use the files to build something whose main purpose is to compete with Dewiride Store as a supplier of the same code.
The distinction that matters is simple: you may sell what you build with the code; you may not sell the code.
- Third-party components
Our products depend on open-source libraries, frameworks and services that we did not write. Those remain under their own licences, which we do not and cannot change. Where a product includes or requires such a component, its licence is named in the product’s documentation, and complying with it is your responsibility.
- Releases
Every release of a product you own is covered by this same licence and appears in your library at no extra cost. A release you have already downloaded remains licensed to you even if we later stop publishing the product. A release that reached your library through an annual updates membership is licensed to you on these same terms, and stays licensed after the period that carried it has ended.
- Ownership
We keep ownership of the files and of the copyright in them. You own whatever you create with them: your changes, your additions and the product you build are yours.
- If this licence ends
This licence ends if you materially breach it and do not put the breach right within thirty days of us asking you to in writing. It also ends if your payment is reversed or refunded, because the purchase it depends on no longer stands. Where a membership period is refunded or reversed, the licence ends for the releases that period carried and for nothing else: anything you bought separately, or that another period carried, is unaffected.
If it ends, you must stop using the files and delete the copies you hold. Work you had already delivered to a client before that point may continue in use, so that ending this licence never breaks something your own customer relies on.
- No warranty beyond the description
The warranties and limits in section 19 and section 20 of the Terms of Sale and Use apply to this licence as well.
- Governing law
This licence is governed by the law of India, and section 24 of the Terms of Sale and Use applies to any dispute about it. If a translation and the English version differ in meaning, the English version governs.
Order Webhook for n8n
- ₹99+GST(合計 ₹116.82)
- $2