Help in the source code for collaboration, how get properties in canvas

Hi, I’m trying to collaborate with the n8n project, one thing I don’t understand and I’ve been trying to understand for days is: how did you define the n8n nodes with properties etc in the current workflow? From what I understand, n8n calls an api to get the nodes, but this api doesn’t have properties and other things, but how do you do it anyway? Is there any specific function in the code?

n8n version: 1.27.0
Database: SQlite
n8n EXECUTIONS_PROCESS: own, main
Running via: npm
Operating System: Windows

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
1 Like

hello @Tawan

Why are you trying to get the properties from the json file? All of them are available in the GUI
image

json file does not contain all properties. Only non-default are there

1 Like

hi, I think I couldn’t express myself well, I’m Brazilian so forgive me for my English, I’m actually a programmer, and I want to contribute to the n8n open source project, at the moment I’m trying to understand how n8n does to get all the properties of us, since when it pulls the workflow api, it returns a request without these properties, how does it load the modal data if the json does not return credentials, properties and the like?

image

This api is loaded when we enter the workflow, but it doesn’t contain the data inside the node, so how can we do it?

image

that’s because all properties are stored in the node’s schema files, it doesn’t use API. And the properties are dynamic (a node may have different properties for different node versions). E.g. for HTTP node there are 3 version of properties. They are being loaded only when you place the node on the canvas. There is no API method which allows you to build the json structure for the node programmatically. You can do it only by copying the node from the canvas

Base schema for HTTP Node: n8n/packages/nodes-base/nodes/HttpRequest/HttpRequest.node.ts at master · n8n-io/n8n · GitHub
schema for V3 Node:
n8n/packages/nodes-base/nodes/HttpRequest/V3/Description.ts at master · n8n-io/n8n · GitHub

More details are there
Node UI elements | n8n Docs

2 Likes

Oh, thank u so much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.