AutomationFlowsWeb Scraping › Syscom Odoo 17 Sync (con Imágenes)

Syscom Odoo 17 Sync (con Imágenes)

Original n8n title: Syscom ➜ Odoo 17 Sync (con Imágenes)

Syscom ➜ Odoo 17 Sync (con imágenes). Uses httpRequest, moveBinaryData. Event-driven trigger; 14 nodes.

Event trigger★★★★☆ complexity14 nodesHTTP RequestMove Binary Data
Web Scraping Trigger: Event Nodes: 14 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Syscom \u279c Odoo 17 Sync (con im\u00e1genes)",
  "active": false,
  "nodes": [
    {
      "id": 1,
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        100,
        200
      ]
    },
    {
      "id": 2,
      "name": "Get Syscom Token",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        300,
        200
      ],
      "parameters": {
        "url": "https://developers.syscom.mx/oauth/token",
        "method": "POST",
        "contentType": "form-urlencoded",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "client_id",
              "value": "={{$env.SYSCOM_CLIENT_ID}}"
            },
            {
              "name": "client_secret",
              "value": "={{$env.SYSCOM_CLIENT_SECRET}}"
            },
            {
              "name": "grant_type",
              "value": "client_credentials"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/x-www-form-urlencoded"
            }
          ]
        }
      }
    },
    {
      "id": 3,
      "name": "Init Page",
      "type": "n8n-nodes-base.set",
      "typeVersion": 2,
      "position": [
        500,
        200
      ],
      "parameters": {
        "values": {
          "number": [
            {
              "name": "page",
              "value": 1
            },
            {
              "name": "per_page",
              "value": 2
            }
          ]
        }
      }
    },
    {
      "id": 4,
      "name": "HTTP Syscom Products",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        700,
        200
      ],
      "parameters": {
        "url": "https://developers.syscom.mx/api/v1/productos",
        "method": "GET",
        "sendQuery": true,
        "queryParametersUi": {
          "parameter": [
            {
              "name": "per_page",
              "value": "={{$node[\"Init Page\"].json.per_page}}"
            },
            {
              "name": "page",
              "value": "={{$node[\"Init Page\"].json.page}}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParametersUi": {
          "parameter": [
            {
              "name": "Authorization",
              "value": "=Bearer {{$node[\"Get Syscom Token\"].json.access_token}}"
            }
          ]
        }
      }
    },
    {
      "id": 5,
      "name": "SplitInBatches",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 1,
      "position": [
        900,
        200
      ],
      "parameters": {
        "batchSize": 50
      }
    },
    {
      "id": 6,
      "name": "HTTP Imagen",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        1100,
        140
      ],
      "parameters": {
        "url": "={{$json.img_portada}}",
        "responseFormat": "binary",
        "dataPropertyName": "data"
      }
    },
    {
      "id": 7,
      "name": "Binary \u2192 Base64",
      "type": "n8n-nodes-base.moveBinaryData",
      "typeVersion": 1,
      "position": [
        1100,
        260
      ],
      "parameters": {
        "mode": "binaryToJson",
        "sourceKey": "data",
        "destinationKey": "data"
      }
    },
    {
      "id": 8,
      "name": "Map Syscom \u279c Odoo",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1300,
        200
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "functionCode": "// margen y cuentas contables\nconst GASTO = { CCTV:5101, INCENDIO:5102, POS:5103, ACCESO:5104, REDES:5105, AUDIOVIDEO:5106 };\nconst MARGEN = 0.7;\nreturn items.map(i => {\n  const p = i.json;\n  const costo = parseFloat(p.precios?.precio_descuento || 0);\n  const venta = +(costo / MARGEN).toFixed(2);\n  const fam = (p.familia || '').toUpperCase();\n  return {\n    json: {\n      sku: p.sku || p.modelo,\n      name: p.titulo,\n      standard_price: costo,\n      list_price: venta,\n      qty_available: p.total_existencia,\n      property_account_income_id: 4010102,\n      property_account_expense_id: GASTO[fam] || 5100,\n      unspsc_code: p.clave_unidad_sat,\n      image_1920: i.json.data\n    }\n  };\n});"
      }
    },
    {
      "id": 9,
      "name": "search_read",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        1500,
        200
      ],
      "parameters": {
        "url": "https://{{$env.ODOO_DOMAIN}}/jsonrpc",
        "method": "POST",
        "sendHeaders": true,
        "headerParametersUi": {
          "parameter": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "X-Api-Key",
              "value": "={{$credentials.ODOO_API_KEY}}"
            }
          ]
        },
        "specifyBody": "json",
        "jsonBody": "={\"jsonrpc\":\"2.0\",\"method\":\"call\",\"params\":{\"service\":\"object\",\"method\":\"execute_kw\",\"args\":[\"{{$env.ODOO_DB}}\",{{$env.ODOO_UID}},\"{{$credentials.ODOO_API_KEY}}\",\"product.template\",\"search_read\",[[[\"default_code\",\"=\",$json.sku]],[\"id\"]]]}}}"
      }
    },
    {
      "id": 10,
      "name": "\u00bfExiste?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1700,
        200
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$json.result.length}}",
              "operation": "largerEqual",
              "value2": 1
            }
          ]
        }
      }
    },
    {
      "id": 11,
      "name": "create",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        1900,
        100
      ],
      "parameters": {
        "url": "https://{{$env.ODOO_DOMAIN}}/jsonrpc",
        "method": "POST",
        "sendHeaders": true,
        "headerParametersUi": {
          "parameter": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "X-Api-Key",
              "value": "={{$credentials.ODOO_API_KEY}}"
            }
          ]
        },
        "specifyBody": "json",
        "jsonBody": "={\"jsonrpc\":\"2.0\",\"method\":\"call\",\"params\":{\"service\":\"object\",\"method\":\"execute_kw\",\"args\":[\"{{$env.ODOO_DB}}\",{{$env.ODOO_UID}},\"{{$credentials.ODOO_API_KEY}}\",\"product.template\",\"create\",[{$json}]]}}}"
      }
    },
    {
      "id": 12,
      "name": "write",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        1900,
        300
      ],
      "parameters": {
        "url": "https://{{$env.ODOO_DOMAIN}}/jsonrpc",
        "method": "POST",
        "sendHeaders": true,
        "headerParametersUi": {
          "parameter": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "X-Api-Key",
              "value": "={{$credentials.ODOO_API_KEY}}"
            }
          ]
        },
        "specifyBody": "json",
        "jsonBody": "={\"jsonrpc\":\"2.0\",\"method\":\"call\",\"params\":{\"service\":\"object\",\"method\":\"execute_kw\",\"args\":[\"{{$env.ODOO_DB}}\",{{$env.ODOO_UID}},\"{{$credentials.ODOO_API_KEY}}\",\"product.template\",\"write\",[[$json.result[0].id],$json]]}}}"
      }
    },
    {
      "id": 13,
      "name": "Next page?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        900,
        50
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$node[\"HTTP Syscom Products\"].json.data.length}}",
              "operation": "larger",
              "value2": 0
            }
          ]
        }
      }
    },
    {
      "id": 14,
      "name": "Inc page",
      "type": "n8n-nodes-base.set",
      "typeVersion": 2,
      "position": [
        700,
        50
      ],
      "parameters": {
        "values": {
          "number": [
            {
              "name": "page",
              "value": "={{$node[\"Init Page\"].json.page + 1}}"
            }
          ]
        }
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Get Syscom Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Syscom Token": {
      "main": [
        [
          {
            "node": "Init Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Init Page": {
      "main": [
        [
          {
            "node": "HTTP Syscom Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Syscom Products": {
      "main": [
        [
          {
            "node": "SplitInBatches",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Next page?",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "SplitInBatches": {
      "main": [
        [
          {
            "node": "HTTP Imagen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Imagen": {
      "main": [
        [
          {
            "node": "Binary \u2192 Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Binary \u2192 Base64": {
      "main": [
        [
          {
            "node": "Map Syscom \u279c Odoo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Syscom \u279c Odoo": {
      "main": [
        [
          {
            "node": "search_read",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "search_read": {
      "main": [
        [
          {
            "node": "\u00bfExiste?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u00bfExiste?": {
      "main": [
        [
          {
            "node": "write",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "create",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Next page?": {
      "main": [
        [
          {
            "node": "Inc page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Inc page": {
      "main": [
        [
          {
            "node": "HTTP Syscom Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Syscom ➜ Odoo 17 Sync (con imágenes). Uses httpRequest, moveBinaryData. Event-driven trigger; 14 nodes.

Source: https://gist.github.com/pipsgdl/3530a2a5b130b3f597db60075b445e71 — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This workflow illustrates how HTML reports can be created using Markdown Node. An example data consists of a Time Sheet table for 2 persons. Based on this table a markdown document is generated using

Item Lists, Email Send, HTTP Request +1
Web Scraping

Functionitem Manual Import Scheduled. Uses moveBinaryData, httpRequest, googleDrive. Event-driven trigger; 9 nodes.

Move Binary Data, HTTP Request, Google Drive
Web Scraping

ChatGPT Bridge — image generation. Uses httpRequest, moveBinaryData. Event-driven trigger; 3 nodes.

HTTP Request, Move Binary Data
Web Scraping

This workflow listens for an “Approved” label on a Trello card, reads the AI draft bookkeeping JSON from card comments, and posts the corresponding transaction to Xero. It then adds a Xero deep link b

Trello Trigger, HTTP Request
Web Scraping

02_LLM_Pipeline v1.0. Uses executeWorkflowTrigger, httpRequest, seaTable. Event-driven trigger; 65 nodes.

Execute Workflow Trigger, HTTP Request, Sea Table