Automation from item to subitem

Hi, please add automation that let me move an item as subitem into another group and item.