Newbie Automation Q: Convert Project to Folder

Admittedly, I’m new to Omni Automation. I did go through the tutorial and thought this should be a relatively straightforward automation, but I’m hopelessly stumped.

I have a number of projects within a folder. I’d like to convert these projects to folders (2d level folders within the existing primary folder). Each new folder would have the same name (title) as the converted project. It seems that this should be possible with omni-automation, right?

I think part of the problem is that omni-automation needs to know what to do with the existing tasks and subprojects under the existing project that is converted to a folder. Ideally, they should be under the newly created folder.

I think that I may be overcomplicating things here. Any thoughts or suggestions on how to set this up would be greatly appreciated. Thank you.

Yes, it’s possible. Database class has an Instance Function called convertTasksToProject, and it’s parameters are:

  • tasks: Array of Task, and
  • position: Folder or Folder.ChildInsertionLocation

You would get an array of Project objects as a result.

Folder object has a constructor:

new Folder(name: String, position: Folder or Folder.ChildInsertionLocation or null)

So, using it, you can create the folders you want.

Thank you for your help. I think I understand what you are suggesting. I will work on this over the weekend. Thanks again.

1 Like

Do you have the URL for the tutorial? I know I had it at some point but I can’t relocate it and want to start dabbling in automation.