APIエンドポイント経由でOdooの企業データをエクスポートし、JSON/Excel出力オプションをサポート
上級
これはCRM分野の自動化ワークフローで、18個のノードを含みます。主にIf, Code, Odoo, Webhook, Functionなどのノードを使用。 APIエンドポイント経由でOdooの会社データをエクスポートし、JSON/Excel出力オプションをサポート
前提条件
- •HTTP Webhookエンドポイント(n8nが自動生成)
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "6b3e8c6c30cdfbf06283a3fa57016932c6b4ec959896c5c546ef5865ff697ff1"
},
"nodes": [
{
"id": "2b167f16-af65-4d8f-9a83-3dff9c06f99c",
"name": "会社リクエスト受信",
"type": "n8n-nodes-base.webhook",
"position": [
-624,
1424
],
"webhookId": "get-companies-uuid",
"parameters": {
"path": "/api/v1/get-companies",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 2.1
},
{
"id": "b73f4dcc-6335-4458-a5d5-b6fa578dfed2",
"name": "動的フィルター準備",
"type": "n8n-nodes-base.function",
"position": [
-384,
1424
],
"parameters": {
"functionCode": "// const query = $json[\"query\"] || {}\n// const filters = []\n// if (query.name) filters.push([\"name\", \"ilike\", query.name])\n// if (query.country) filters.push([\"country_code\", \"=\", query.country])\n// const limit = query.limit ? parseInt(query.limit) : 25\n// const response_format = query.response_format || 'json'\n// return [{ json: { filters, limit, response_format } }]\n\nconst query = $json[\"query\"] || {};\n\n// Validate required 'name' parameter\nif (!query.name || query.name.trim() === \"\") {\n return [\n {\n json: {\n success: false,\n message: \"Missing required parameter: name\",\n },\n },\n ];\n}\n\nconst filters = [];\nfilters.push([\"name\", \"ilike\", query.name]); // name is mandatory\n\nconst response_format = query.response_format || \"json\";\n\nreturn [\n {\n json: { filters, response_format },\n },\n];"
},
"typeVersion": 1
},
{
"id": "5676cb5c-2ddd-46fa-88d3-3902a183f227",
"name": "Odooから会社データ取得",
"type": "n8n-nodes-base.odoo",
"position": [
-128,
1424
],
"parameters": {
"options": {
"fieldsList": [
"display_name",
"name",
"email",
"phone",
"mobile",
"parent_id",
"partner_id",
"country_code",
"country_id"
]
},
"resource": "custom",
"operation": "getAll",
"returnAll": true,
"filterRequest": {
"filter": [
{
"value": "={{ $json.filters[0][2] && $json.filters[0][2].toString().trim() !== '' ? $json.filters[0][2] : \"False\" }}",
"operator": "like",
"fieldName": "name"
}
]
},
"customResource": "res.company"
},
"credentials": {
"odooApi": {
"id": "rhW7JbaWT0NTawBZ",
"name": "IMM Odoo 18"
}
},
"typeVersion": 1
},
{
"id": "288b5309-6f46-484f-9ab6-06e94bd7b74f",
"name": "出力データ準備",
"type": "n8n-nodes-base.function",
"position": [
176,
1424
],
"parameters": {
"functionCode": "if (items.length === 0 || Object.keys(items[0].json).length === 0) {\n return [{ json: { success: false, message: 'No matching company records found' } }]\n}\nconst data = items.map(item => ({ ...item.json, report_generated_on: new Date().toISOString() }))\nreturn data.map(d => ({ json: d }))"
},
"typeVersion": 1
},
{
"id": "cd151c5b-55ec-454a-b43d-b78a39b74441",
"name": "Excel要否確認",
"type": "n8n-nodes-base.if",
"position": [
480,
1424
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $('Prepare Dynamic Filter').item.json.response_format }}",
"value2": "excel"
}
]
}
},
"typeVersion": 1
},
{
"id": "6b9e1c86-81c3-475a-bdda-1a44bc9aed4e",
"name": "Excelに変換",
"type": "n8n-nodes-base.convertToFile",
"position": [
1104,
1376
],
"parameters": {
"options": {},
"operation": "xlsx"
},
"typeVersion": 1.1
},
{
"id": "38164711-9c8c-4f7c-8e3b-3f19b1c12360",
"name": "ファイルで応答",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1392,
1376
],
"parameters": {
"options": {},
"respondWith": "binary"
},
"typeVersion": 1.4
},
{
"id": "cba096d5-0e19-4bec-930e-eefe587e996e",
"name": "JSONで応答",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
784,
1776
],
"parameters": {
"options": {},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.4
},
{
"id": "5f3f46b8-330a-4594-8170-6b2e8d68b685",
"name": "概要ノート",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1600,
592
],
"parameters": {
"width": 900,
"height": 572,
"content": "## How it works\nThis workflow provides an API endpoint `/api/v1/get-companies` that retrieves company records directly from your Odoo database. It’s built for teams who need to query or export company data — either as structured JSON for integrations or as Excel (.xlsx) for business reporting.\n\nWhen a request is made, the workflow:\n1. Accepts query parameters (`name`, `response_format`).\n2. Validates the name input (required for company search).\n3. Fetches all matching companies from Odoo using a partial `Like` filter.\n4. Returns results as a JSON response or Excel download depending on the `response_format` parameter.\n\nThis makes it ideal for quick data exports or syncing company information across systems.\n\n\n\n## Setup steps\n1. Open the Webhook node and note the endpoint `/api/v1/get-companies`.\n2. Connect your Odoo API credentials in the Odoo node.\n3. Optionally update the `fieldsList` in the Odoo node to include more company details (VAT, address, etc.).\n4. Test using a browser or Postman: \n - `/api/v1/get-companies?name=Tech&response_format=json` \n - `/api/v1/get-companies?name=Tech&response_format=excel`"
},
"typeVersion": 1
},
{
"id": "c495e6f3-9186-41ec-8994-28ba95bde11b",
"name": "コード",
"type": "n8n-nodes-base.code",
"position": [
784,
1392
],
"parameters": {
"jsCode": "return $input.all()"
},
"typeVersion": 2
},
{
"id": "d29068b1-e243-420b-b00c-24f9ecaa0512",
"name": "概要ノート10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-688,
1184
],
"parameters": {
"color": 7,
"width": 452,
"height": 428,
"content": "## Request & Validation\nReceives the API request and checks for the required “name” parameter.\nReturns a validation message if missing."
},
"typeVersion": 1
},
{
"id": "285429ca-c751-4970-85ce-27289180f9c8",
"name": "概要ノート11",
"type": "n8n-nodes-base.stickyNote",
"position": [
-208,
1184
],
"parameters": {
"color": 7,
"width": 276,
"height": 428,
"content": "## Search Records from Odoo\n- Queries `res.company` \n**Company Table** records in Odoo using “Like” for partial matches.\n- Customize the fields in the node options if needed.\n- **Note: Name search is case-sensitive.**"
},
"typeVersion": 1
},
{
"id": "5f9b217d-9cf1-4a7d-b99a-c6640d38399b",
"name": "概要ノート12",
"type": "n8n-nodes-base.stickyNote",
"position": [
96,
1184
],
"parameters": {
"color": 7,
"width": 276,
"height": 428,
"content": "## Prepare data and manage response json object."
},
"typeVersion": 1
},
{
"id": "e7a97e7d-928b-4ec3-88c7-d6a2ecee9ea9",
"name": "概要ノート13",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
1184
],
"parameters": {
"color": 7,
"width": 276,
"height": 428,
"content": "## Check response_format\nIf response_format=excel → returns a downloadable Excel file.\nOtherwise, returns JSON with company data."
},
"typeVersion": 1
},
{
"id": "2d754c32-7a53-4a43-a49e-8ccf8839f6f8",
"name": "概要ノート14",
"type": "n8n-nodes-base.stickyNote",
"position": [
704,
1184
],
"parameters": {
"color": 7,
"width": 276,
"height": 428,
"content": "## Prepare Data for Binary file."
},
"typeVersion": 1
},
{
"id": "0edb17ef-3bac-42fc-835d-d67e26ad82b0",
"name": "概要ノート15",
"type": "n8n-nodes-base.stickyNote",
"position": [
1008,
1184
],
"parameters": {
"color": 7,
"width": 276,
"height": 428,
"content": "## Create excel file"
},
"typeVersion": 1
},
{
"id": "6ab323ca-5cc5-4d86-b32d-17f7340a4ab2",
"name": "概要ノート16",
"type": "n8n-nodes-base.stickyNote",
"position": [
1312,
1184
],
"parameters": {
"color": 7,
"width": 276,
"height": 428,
"content": "## Response to web-hook with excel file."
},
"typeVersion": 1
},
{
"id": "9d469fdf-7eaa-452f-874a-552299170c51",
"name": "概要ノート17",
"type": "n8n-nodes-base.stickyNote",
"position": [
704,
1632
],
"parameters": {
"color": 7,
"width": 276,
"height": 380,
"content": "## Response to web-hook with json object."
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"c495e6f3-9186-41ec-8994-28ba95bde11b": {
"main": [
[
{
"node": "6b9e1c86-81c3-475a-bdda-1a44bc9aed4e",
"type": "main",
"index": 0
}
]
]
},
"6b9e1c86-81c3-475a-bdda-1a44bc9aed4e": {
"main": [
[
{
"node": "38164711-9c8c-4f7c-8e3b-3f19b1c12360",
"type": "main",
"index": 0
}
]
]
},
"288b5309-6f46-484f-9ab6-06e94bd7b74f": {
"main": [
[
{
"node": "cd151c5b-55ec-454a-b43d-b78a39b74441",
"type": "main",
"index": 0
}
]
]
},
"b73f4dcc-6335-4458-a5d5-b6fa578dfed2": {
"main": [
[
{
"node": "5676cb5c-2ddd-46fa-88d3-3902a183f227",
"type": "main",
"index": 0
}
]
]
},
"cd151c5b-55ec-454a-b43d-b78a39b74441": {
"main": [
[
{
"node": "c495e6f3-9186-41ec-8994-28ba95bde11b",
"type": "main",
"index": 0
}
],
[
{
"node": "cba096d5-0e19-4bec-930e-eefe587e996e",
"type": "main",
"index": 0
}
]
]
},
"2b167f16-af65-4d8f-9a83-3dff9c06f99c": {
"main": [
[
{
"node": "b73f4dcc-6335-4458-a5d5-b6fa578dfed2",
"type": "main",
"index": 0
}
]
]
},
"5676cb5c-2ddd-46fa-88d3-3902a183f227": {
"main": [
[
{
"node": "288b5309-6f46-484f-9ab6-06e94bd7b74f",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - 顧客管理
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
Odooの顧客データを取得し、JSONまたはExcel形式でエクスポート
Odoo顧客データを取得し、JSONまたはExcel形式でエクスポート
If
Code
Odoo
+
If
Code
Odoo
18 ノードV3 Code Studio
顧客管理
[テンプレート] AIペットショップ v8
AIペットショップアシスタント - GPT-4o、Googleカレンダー、WhatsApp/Instagram/Facebookを統合
If
N8n
Set
+
If
N8n
Set
244 ノードAmanda Benks
営業
AI エージェント レストラン [テンプレート]
🤖 WhatsApp、Instagram、MessengerのAIレストランアシスタント
If
N8n
Set
+
If
N8n
Set
239 ノードAmanda Benks
その他
Abacate Payを使った注文確認の自動化:メールとSlack経由での初回購入者向けクーポン獲得
注文確定の自動化、Abacate Payを使用:初回購入者向けクーポン報酬、メールおよびSlack経由
If
Set
Code
+
If
Set
Code
13 ノードMatheus Pedrosa
顧客管理
Webhook からリードを生成する
Odoo CRM(v15-v18互換)向けにWebフォームのリードをキャプチャし、構造化
Code
Odoo
Webhook
+
Code
Odoo
Webhook
7 ノードEvozard
顧客管理
Bitrix24 タスクフォームウィジェットアプリケーション ワークフロー サンプル
Bitrix24タスクフォームウィジェットアプリケーションのワークフロー(Webhook統合含む)
If
Set
Code
+
If
Set
Code
21 ノードFerenc Erb
その他
ワークフロー情報
難易度
上級
ノード数18
カテゴリー1
ノードタイプ8
作成者
V3 Code Studio
@v3codestudio🚀 AI & Automation Expert | n8n Creator | Workflow Specialist | Automation Specialist | V3 Code Studio I build smart automation workflows with n8n to help businesses streamline operations, save time, and increase productivity. Passionate about no-code/low-code automation and AI-driven solutions that make processes efficient, scalable, and growth-oriented.
外部リンク
n8n.ioで表示 →
このワークフローを共有