Article published on the 26th of May, 2025.
Contents
1. Introduction
In this article, we will demonstrate how you can use the Create documents, folders and items step to create a set of simple items provided a custom JSON array in the Step Input field.
For demonstration, we will create a simple one-step process which creates a set of initial tasks on a project upon clicking a My Tools button.
2. Configuration
Before we start configuring our process, we will take a look at the task lists on Master project:
In order to create items from a custom JSON array in a task list like this, we need to take note of the internal field names of the columns we want to set for each item.
For example, if we want to add a task which has a title, a category, and progress designation, and a priority, we need to know the internal field names of these fields.
Once we know the internal field names of the columns, we can proceed to set up our WorkPoint Automate process.
Here we have created a process called "Create tasks from JSON" in which we have added the Create documents, folders and items step:
- To add a custom JSON array of tasks to create, we click the "Advanced" button on the Step Input field.
- In the "View" section, we switch to Advanced mode.
- In the "Expression" section, we type in our custom JSON array containing objects representing the tasks we want to create. Note that we have used both raw data as well as references to values within the process context.
- Once we have defined all our tasks as JSON, we close the window.
- We then switch to the "Options" tab of the step.
- In the list of options, we define where to create the tasks we defined. In this demonstration, we select to create them in the Tasks list of the project the user is currently on when running the process. We also select the "Overwrite" option in the Output exists behaviour field.
- Lastly, we click the "Map fields" button to automatically map the fields from the Tasks list to the data from the current element. As multiple items can be created using this step, "Element" refers to each individual element being created by the step. For example, when the first task is created, "Element.Title" refers to the title of that task from the JSON, which is mapped into the "Title" field on the list.
That's all the configuration we need to do for the WorkPoint Automate process.
We can now save and publish it, and then we can create a My Tools button to execute it from inside a project site. We configure this button as follows:
3. Execution
With our My Tools button set up, we can now execute our process from inside a Project site:
- In the My Tools panel, we click the "Create initial tasks" button to run our process.
- In the process settings we could select to skip the Start step, but in this instance, we click the "Run" button.
The process now runs our Create documents, folders and items step:
Once the process completes, we can close the process and refresh the page.
Our Tasks list should now contain our newly created tasks:
Comments
0 comments
Please sign in to leave a comment.