How can I create action nodes under one main node?

n8n version 1.47.3
running via npm on MACOS

Hi guys, so I have this main node called “main” and I want to implement the same workflow as you have for instance in S3.
You search for the node (i.e company name), then select it and you see all of the action nodes, like authenticate, add files and whatever. I am not being able to implement this structure nor find anything relevant. The implementation i have right now is that it shows the main, I click it and it shows the actions (right now only have authenticate and upload file), but when I select that node it still shows the dropdown on top to select other nodes. As I have seen on S3 for instance this is not what happens…

description: INodeTypeDescription = {
    displayName: 'main',
    name: 'main',
    icon: 'file:main.png',
    group: ['transform'],
    version: 1,
    description: 'Create a project and translate a file in this node.',
    defaults: {
      name: 'main',
      color: '#4B8BBE',
    },
    inputs: ['main'],
    outputs: ['main'],
    properties: [
      {
        displayName: 'Operation',
        name: 'operation',
        type: 'options',
        options: [
          {
            displayName: 'Authenticate',
            name: 'Authenticate',
            value: 'Authenticate',
            description: 'Authenticate your account',
          },
          {
            displayName: 'Upload File',
            name: 'uploadFile',
            value: 'uploadFile',
            description: 'Upload a file in main',
          },
        ],
        default: 'Authenticate',
        description: 'Select the operation',
      },
      {
        displayName: 'Username',
        name: 'username',
        type: 'string',
        default: '',
        displayOptions: {
          show: {
            operation: ['Authenticate'],
          },
        },
        description: 'The username for authentication',
        required: true,
      },
      {
        displayName: 'Password',
        name: 'password',
        type: 'string',
        typeOptions: {
          password: true,
        },
        displayOptions: {
          show: {
            operation: ['Authenticate'],
          },
        },
        default: '',
        description: 'The password for authentication',
        required: true,
      },
      {
        displayName: 'Project Name',
        name: 'projectName',
        type: 'string',
        displayOptions: {
          show: {
            operation: ['uploadFile'],
          },
        },
        default: '',
        description: 'Name of the project to create.',
      },
      {
        displayName: 'Source Language',
        name: 'sourceLanguage',
        type: 'string',
        displayOptions: {
          show: {
            operation: ['uploadFile'],
          },
        },
        default: '',
        description: 'Source language of the project.',
      },
      {
        displayName: 'Target Language',
        name: 'targetLanguage',
        type: 'string',
        displayOptions: {
          show: {
            operation: ['uploadFile'],
          },
        },
        default: '',
        description: 'Target language of the project.',
      },
      {
        displayName: 'File Input',
        name: 'fileInput',
        type: 'string',
        displayOptions: {
          show: {
            operation: ['uploadFile'],
          },
        },
        default: '',
        placeholder: 'Select file...',
        typeOptions: {
          multipleValues: false,
          multipleValueButtonText: 'Add File',
        },
        required: true,
        description: 'The file to be processed.',
      },
    ],
  };

Refer to these screenshots for better understanding


this is what i currently have

In my package.json I have

"nodes": {
      "main": [
        "dist/nodes/main/authenticate.node.js",
        "dist/nodes/main/uploadFile.node.js"
      ]
    }

What do you recommend i do? Any videos or articles to follow?
I couldn’t really find anything.
Thanks

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:

Apologies, this is my first interaction, I have added the informations I know. Let me know if anything else is needed.

Hey @Tomas_Da_Mota,

Welcome to the community :raised_hands:

The best thing to do here would be to follow our node creation guide as a starting point then look at the code for other nodes to see how it is done.

The actions are normally built based on the Resource and Operation fields where Resource is the title and operation is the action.

Hi Jon, thank you for your reply. I did follow the documentation but there is nothing regarding this.
Could you share some sample I could refer to please? I couldn’t find any custom nodes that implement this

Hey @Tomas_Da_Mota,

Have you tried adding the action field to the options?

Hi Jon, yes I am using that.
My question is regarding the those action nodes “group titles”

How could I achieve that?

Hey @Tomas_Da_Mota,

Those are based on the Resource field names, if you wanted to use those as well I would make use of the Resource and Operation fields.