Magento 2 node - Needs more fields for updating products

My use case:

I’m trying to keep a Wordpress store & Magento 2 store in sync with regards to some product data, however the current M2 node is extremely limited on what fields it can update.

Curranty only the following fields are supported:

  • Name
  • Price
  • Weight
  • Status
  • Visability
  • Type Set
  • Attribute Set

Fields I would like to see added:

  • Description
  • Short Description (short_description)
  • Qty or Default Stock
  • Sale price (special_price)

and/or the ability to set arbitrary custom attributes (Both WooCommerce & Magento support these).

I have this workflow working well in Integromat/Make, however at 4-6 “operations” per update, and several updates per hour, it will get expensive over there very quickly.

Are you willing to work on this?

I believe I lack the relevant skills to assist directly.

I am also interested in the development of this node.
I already have two nodes currently under development but Magento is next on the list.
I learn on the job, I am not a developer by training, but responsible for my company, if there is no more development by then, we can both see how to move forward.
I come back here asap

It looks like there’s a section for handling custom attributes here: n8n/GenericFunctions.ts at master · n8n-io/n8n · GitHub about line 748 or so.

however they are commented out, and editing nodes is a bit above my skill level at the moment, however looking over the other pre-baked fields, it looks like extending it with some custom ones wouldn’t be very difficult.

Now I’m running into this issue. after working a handful of times in testing now i get this error:

{"message":"400 - {\"message\":\"Specified request cannot be processed.\"}","name":"Error","stack":"Error: Request failed with status code 400\n    at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:538:35)\n    at endReadableNT (node:internal/streams/readable:1345:12)\n    at processTicksAndRejections (node:internal/process/task_queues:83:21)"}

Hi Caleb,

Did you ever get anywhere with this? I’m also looking into this as the fields are very limited, it doesn’t even include inventory levels?

Hello,

I work on Magento Api and how to use n8n with magento.
(I don’t do anything on code of this node)

At first, this node seems very small, but you can do a lot more.

You have to understand the Magento API at first.

This is 2 link differents, take time to understand

Now, if you have a good authentification with Magento Node.
You can use HTTP Request, and using the authentification of Magento Node, for request everhting you want.

For inventory you ask, the url with the second link give me this /V1/stockItems/lowStock/

I have an error here. Probably I have to specify scopeId and qty like is indicate here :

I’m not successful a lot to be honest, because I need to work on it more. But if you understand this way, you have all the API open to you :wink:

@leaton

No I basically abandoned this, it has the potential to allow connecting a wordpress store to a magento store in a “low code” kinda away, but the default module (from last year) is too limited to actually be useful. The whole point of this product is to allow low code communication between apps, if I need to start digging in to custom coding a solution I’ll just grab some available PHP libs and do the solution that way since I’m much more comfortable with that.