Automation about moving an item as a sub item

Can we do automation for moving item as a sub item in the same group?