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:

10 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.

9 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.

4 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.

4 Likes

Also it would be great if we can put if condition inside set node :slightly_smiling_face:

Can you list some scenarios where you’d want to do this in the set node instead of an if node @Pooja ?

@maxT I’m not sure whether this is still an active issue, but if so, here’s my 2c: when I started working with n8n, I remember that I started of adding the Set node to my workflow only to find out that what I wanted was a bit more complex. 9 out of 10 times, I would then step up to one of the Function (now Code) node. Coming from a low code background (FileMaker), I had to learn how to speak JavaScript. I’m not sure whether you want to head in this direction, but if you want to make n8n even more low code, you may want to consider adding data/text manipulation to the Set node. And although I’m not a big fan of Excel, maybe you want to copy/mimic some of the most popular data (text, number and date/time) functions. A lot of knowledge workers start of using Excel, and then move on to low-code platforms. Again, just my 2c :slight_smile:

P.s.: some links on text functions …

in Excel:

in FileMaker:

https://help.claris.com/en/pro-help/content/text-functions.html

2 Likes

This would idd make it a lot easier for users, especially users without Javascript knowledge.
There is a community node that covers most of it but would be great to have it in the standard set node. The issue would probably be how to make it not seem overwhelming to use.

@BramKn start off with the most popular functions, and let it grow step by step …

1 Like

Hey @dickhoning the good news is we are already working on this:

  • I reviewed the first batch of expression functions this past week. There’s a shortlist for each main data type, incl. datetimes. For example, myDate.plus(“day”, 3) would add 3 days to myDate; isPresent() returns false if key:val doesn’t exist.
  • Those should be released very soon and can be used in any expression.
  • Separately, we’re working to overhaul the expression experience itself. That is coming out in phases. Soon on that roadmap, we’ll have a pattern to list available functions (be it via autocomplete, or a functions library popover beside the expression).
  • Once that roadmap is fully implemented, I envision an experience similar to excel/ Airtable/ Retool, where you also have a mini reference for that function (for arguments + how to use), alongside autocomplete.
  • From there, I anticipate we’d identify which functionality also makes sense as a dedicated node and have a node for that.

Hope this context helps and thanks for the suggestions - it helps validate that we’re on the right track :slight_smile:

4 Likes