8
n8n 한국어amn8n.com

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)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수18
카테고리1
노드 유형8
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

저자
V3 Code Studio

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에서 보기

이 워크플로우 공유

카테고리

카테고리: 34