How to Add a New Column to Bundles in Make.com
Have you ever found yourself in a situation where you have a hundred bundles that are a collection of sales transactions, each bundle having several 'columns' imported from a CSV, such as item name, net sales, quantity, etc., and you want to add a column to each bundle? Let's call this new column 'Price', which is simply each bundle's net sales divided by quantity. For instance, if one of your bundles had a quantity of 3 and a net sales of 18, you want to add a column that is 'Price' with a value of 6.
Well, you're not alone. Many Make.com users have faced this challenge and it can be quite frustrating. But don't worry, there's a solution.
Step-by-step Solution
Firstly, you need to understand that Make will process each of your bundles generated. So if you want to calculate something like price per item, you just set the calculation/update to happen after the bundles get generated and the calculation module will run 100 times (or however many bundles are generated from your previous module).
Aggregator helps if you want to combine all the prices from the 100 lines of sale. You can set an aggregator that combines all the bundles to an array and you can sum the values of that array to get total sale cost (or whatever other data/calculation you are looking for).
Now, let's get into the specifics. You can accomplish this using an 'Aggregate to JSON' followed by Parse JSON. What you do next depends on what you're doing with the information.
'Aggregate to JSON' will go through each bundle, get the info you want from it, then create a new structured object from it. With this, you'd also have to create your own data structure. 'Parse JSON' would then turn that JSON back into bundles. After 'Parse JSON', you could use a Text Aggregator to make a new file, CSV module to make a new CSV, Array Aggregator to make one bundle with a bunch of arrays, etc.
Troubleshooting Tips
If you're having trouble with this process, remember that you can perform calculations while doing other steps. This might not seem possible when you need to perform calculations to create new fields prior to other steps, but it is. Also, don't forget to check out Make Academy, they discuss this technique for a very similar situation.
Conclusion
In conclusion, adding a new column to your bundles in Make.com might seem like a daunting task, but with the right steps and a little patience, it can be done. Remember, the key is to set the calculation/update to happen after the bundles get generated and use the 'Aggregate to JSON' and 'Parse JSON' modules. Happy Making!
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.