Need help with creating a dynamic custom node

I'm creating a custom dynamic that dynamically accepts any number of string inputs along with some fixed parameters. I'm using the onNodeCreated method to add the widgets and inputs to the node. Now I need to figure out a way to get the values from these widgets and inputs into the py script in the backend. These are the things I tried and the issues I ran into,

  1. Tried accessing the values using **kwargs but I'm not able to get the widget values, just the input values.
  2. Tried to run the main processing within the js file, but for some reason I can't get the onExecuted function to work. It runs the main function in the py file but not the one in the js file.

    I don't have a lot of knowledge on custom nodes, and I've only created nodes that use just Python previously. What are the options I have and what resources can I use to understand custom nodes better?

https://preview.redd.it/ara98t0hmcbe1.png?width=468&format=png&auto=webp&s=884f9e40c1b2373b510243355b0fe30d098bf2b5