Comments (11)
I am actually right now in the process of writing documentation about how the data structure looks like and what variables and functions are available in the Function-Node.
from n8n.
Transformation nodes are definetly needed! Was not sure yet how they should work exactly, what they should do, how many should there be (one to do everything, different ones for numbers, strings, ..). Is probably worth checking out what other similar products like Node-Red, Zapier, Tray.io, parabola.io, integromat.com, ... are doing and what advantages and disadvantages it has.
If you have suggestions, ideas, ... would love to hear them! And if you are interested in implementing them even more.
from n8n.
Wouldn't the more generic FunctionItem work for that? That's what we use internally primarily to do transformations of data.
from n8n.
Yes, it would work for sure but sadly only for people that can code. It should however also be possible for none coders to do as much as possible. So having a node/nodes in place which allows them to do that would be great.
from n8n.
@janober true that.
I just wonder how a calculation node would look like that does not include any code to do the calculation. If I understood the requirement correctly it would be something like: "I have an amount in cents and I want to transform it into an amount in euros (math operations)". But its not mentioned explicitly. Hence, the possibilities for interpretation would be endless. So in my opinion there would need to be some elaboration on the requirements on what should be done with that calculation node:
- I need math operations to transform numbers from cents to Euros (i.e. implementation would be divide by 100 and have a parameter for the decimal precision) <-- math transformation
- When I have an email field I want the characters to be masked <-- string transformation
To be clear it's my personal opinion, I would very much favor a user-friendly approach, but I asked myself, if I could get started on implementing that issue, how should the functionality look like and right now I wouldn't be able to answer that.
Would an idea be to look at how Zapier has implemented it, they have
- Numbers
- Datetime
- Text
- Utilities
from n8n.
haha yes, that is the problem I am neither ;-)
It could similar to the "Set" node. Where people can add multiple values (here operations). Then there could be one field for the "property name" which should be transformed and another one for the "transformation to transform".
Or not being a node at all. Just being different functions that people can use in expressions and select in a proper expression-editor (which I would love to have anyway, the current one simply needs to be improved!). I think Integromat does something similar.
from n8n.
To anyone willing to solve in the meantime:
Learn basic operations on Strings and Numbers
on W3schools, using the funtionItem-node to transform your data in JS vanilla.
from n8n.
@Peppuz I think the biggest issue is not that people don't know Strings and Numbers (by the way w3schools is bad, use MDN instead please) but rather that n8n underlying data structure is not clear enough.
I for example know plenty of JS to get around with everything, however, understanding that you need to manipulate the item's .json property's containing object to actually yield a result, that was the biggest issue here.
from n8n.
Amazing, that'll help greatly.
from n8n.
Ok created now some documentation.
Information about the data-structure, in general, can be found here:
https://docs.n8n.io/#/data-structure
Information about the Function-Nodes here:
https://docs.n8n.io/#/nodes?id=function-and-function-item-node
Hope it makes things a little bit clearer.
from n8n.
Hey @gabrieligbastos, thanks for the feedback. You can go to our community https://community.n8n.io/ and request the calculation node.
from n8n.
Related Issues (20)
- OpenAI Assistant & gpt4-o HOT 9
- OpenAI Assistant creating new thread everytime HOT 8
- Accessing Ticket Object ID in Hubspot Trigger Node HOT 3
- 1.41.0 - Bug: Number of Executions Shown in Side Panel is Limited to 10 at a Time HOT 7
- ERROR: The DNS server returned an error, perhaps the server is offline HOT 2
- OpenAI Assistant - The requested model ‘gpt-4o’ cannot be used with the Assistants API in v1 HOT 1
- HTTP Request / OpenSSL Error HOT 3
- "Convert to HTML Table" Does Not Add the "Row Attributes" Option HOT 2
- workflows.map is not a function HOT 2
- Renaming the node by leaving the name field empty causes unexpected behavior HOT 5
- Can you add options for multi-branch parallel execution and for nodes to continue the workflow execution even if an error occurs? HOT 1
- Error: HTTP status 403 HOT 7
- Node Max Tries / Wait Values Limits Too Low HOT 7
- Ask AI is not present in the Code node on self-hosted Docker ver 1.41.1 HOT 3
- Pagination Does Not Reset When Re-Testing Node HOT 3
- NPM - Esm modules are not supported, dynamic (async) import fails HOT 8
- http node executes "successfully" but error is returned HOT 3
- Webhook only work in test mode... HOT 3
- IF issue. Wrong type ' NNN' is a string but was expecting a number HOT 1
- RabbitMQ Workflow had to be deactivated HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from n8n.