How to create sublines in Notion automatically?

Hello, everyone!

Could you tell me how to configure “create database item” so that it can create a subline?


I need the script to create a main line and add more sublines under it.

Is there any way to do this?

Thanks for answers.

Hello, a sub-item is a page that has a relation to the parent item. Therefore, your scenario could:

  1. Create the main page
  2. Create all the sub-pages and populate the relation property by passing the page ID from step #1
1 Like

Thanks, I tried your method, but it still doesn’t work.

More precisely, it works for 1 row only, if I have several rows, the script duplicates the name of the main group and adds them to the duplicate groups instead of adding them all to one:

This is how I would like the data to look like:


For additional information, I will say that the data on the group and subgroups come from the webhook. There is always one group and there can be several subgroups. To do this, I used an iterator and the Split command:

Could you please tell me how to finalize the process so that these IDs are added to one group instead of each one?