We're improving the Set node and need your suggestions 😊

Hi all :wave:

We’re planning to update the Set node with a goal of making it more intuitive and flexible. We would absolutely love your input on where we should focus. Specifically, it would be great to understand:

  • Is there anything particularly confusing or frustrating about the current Set node?
  • Is there anything that is difficult or impossible for you to do with the Set node that comes up a lot?
  • Are there any options or functionality you’ve love to see added to the Set node?

For any requests or feedback you submit on this thread, please try to give some context to the task you’re trying to achieve (example workflows are great!). Already on our horizon is clarifying the UX copy and making nested fields neater/ more digestable.

Thanks everyone :pray:

7 Likes

Hey @maxT,

It would be nice if we would set multiple items, At the moment to do multiple items we need to use a function (unless I have missed something) this is handy when testing community issues and mocking up data sources without calling APIs.

It would be nice to have the documentation updated to mention that you can create arrays with the set node as well it took me a couple of weeks to work out I can do that :smiley:

Other than that I like the Set node.

6 Likes

@Jon thanks for this - agreed that trying to create multi-item mock data can be tricky at times.

Would a table view make sense for this usecase? (like a very lightweight airtable). Wondering if that should simply be a whole different node, while set is more so for creating specific schemas (or setting simple values).

@maxT that isn’t a bade idea and it would make it very easy to quickly mock up data or set multiple values, Maybe a “Set Advanced” or something.

2 Likes

Oooh this would be helpful, how do you make an array with the set node?

Hey @jhambach,

On mobile so don’t have an example to hand but the trick is to set your first name to myname[0] then for your next item change the 0 to a 1 and keep incrementing as needed.

1 Like

Nice, I can see that being handy for setting up mock data. Thank you!

I wish there was a more visual way in the set node to apply regex. I know how to do it via the expression editor so I end up using the Set node for this, but I wish there was a way I could copy my expression from regex101 and just paste it into the set node. I suppose a regex node may be a better idea for this but wanted to give my 2 cents.

Also agree that a table in the Set node would be amazing. My only frustration with the set node is when I try to add nested JSON which I think a table would solve.

3 Likes

@djangelic what is your specific regex usecase? Is it a regex extract you’re attempting to perform on an input string?

Hi @maxT,
Yes I do mean regex extract specifically. When working with beginners on a similar platform, most did not fully understand how regex works. Add to that the fact that some people struggle to use the expression editor outside of the point and click functionality as it is, since they do not have any coding experience and you have a recipe for frustration.

It took me a few months to learn how to use regex extract successfully using n8n, but what I would like propose is a Regex node that begins with extract, but would eventually add other functions of regex.

I find it simple to take beginners to a website like https://regex101.com and have them put their string, and then play with their expression using the site tools to capture what they need. Where we struggle is then getting this back to n8n.

This node would need an input for the expression (hopefully copied and pasted straight from regex101 would work without additional modification) and an input for the captured string. The output would then be the captured value.

In the past, the other platforms I’ve worked with had a dedicated Regex Node that allowed you to change the regex operation. For example a dropdown to choose between extract or substitute. This would make it trivial to visit a regex teaching website, fiddle out the expression, then bring it back to n8n for processing.

Let me know if this makes sense! Thanks for all you do for this little community!

2 Likes

Thanks a lot @djangelic makes a lot of sense. Quick follow up question: if you were searching for this node, typed “Regex” and first result was a “text manipulation” node - do you think you’d try that node out? Or would that not fit your mental model?
Just wondering if we could have a node with a less technical name but has regex extract + substitute operations (likely extract and substitute operations with the option to define those via regex).

1 Like

I think it depends on the functionality of the app and your demographic. Something I’ve seen is that more advanced users get lost if things are too simple. But if the app isn’t friendly enough then you lose the beginners so definitely a fine line to walk.

As a slightly more experienced user, I think seeing a text manipulation node would make total sense, and even better if it came up when searching for regex.

Most beginners I’ve worked with don’t realize that a single node can have multiple functions behind it. They prefer that each function be its own node.

1 Like

Quite new to n8n and looked into extracting part of the subject from the IMAP node using the ‘set’ node.
One hour later, it’s still not clear how to use a regex to extract specific part of the subject to a new variable. :confused:

I have seen one or two examples - none of them are clear to me but I know regexp’s quite well since earlier.

My two cents, (the current documention for the ‘set’ node doesn’t have any example for regex,
so anything is an improvement.

For n8n in general and work with input data to node and see output, it was very easy to pick up and get it. For data manipulation as mentioned, I hope it get’s more intuitive.

//Daniel

@maxT
it would be nice to have a default value option if the input is null or remove the property if it is null …for example a name field that arrives null from a webhook … have in the set in a nocode way the option of what to do (remove or add a default value) would be great.

2 Likes