How to add sublines in Notion automatically?

Hi,

I have a problem when I add a main group and sub-objects, instead of adding them to 1 main group, several of these main groups are created and the sub-objects are linked to them.
Like this:
image

I don’t need that. I need the IDs of the subgroups to be attached to one main group like this:

Now my script looks like this (the data from the webhook, which contains the name of the group and subgroups) goes into an iterator, where I split these subgroups with the split function and create the required number of them, then the module creates the main group and binds their IDs:



The problem is that if there are, for example, 2 or more groups, the script makes copies of the main group and links the subgroups separately to these copies.

Question: how to link all these subgroups to 1 main group? That is, so that the ID of the subgroups is written only to 1 main group and does not make duplicates?

Is your Array Aggregator’s Source Module field set correctly – where the bundles are coming from?

It looks like you need to set it to the Iterator [36].

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

General

Help Center Basics

Articles & Videos

Partner & Custom Apps

samliewrequest private consultation

Join the Make unofficial Discord server!

2 Likes

You need to select iterator as your source for array aggregator…

Princy Jain
Make consultant,
For consulting support: Follow up Automated

2 Likes

Yes guys, you are right! I change a source on Iterator + add map function inside a module, and… all is works!


image

2 Likes

No problem, glad I could help!

1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

samliewrequest private consultation

Join the Make unofficial Discord server!

1 Like