Create task action allows automatically create task in Microsoft Planner. Created task is contained in a existing specified plan and can be assigned to a bucket in a plan.
Example of Create task action configuration on the current site
For more information about Action Builder read Action Builder introduction article.
Note 1: In order to use the Create task action in Scheduled/Triggered Actions skybow Planner Connector and the site have to be approved by a tenant administrator before this action can be used. You can change the list of approved sites manually. Learn more about skybow M365 Connectors.
Note 2: When you deploy the solution to another SharePoint tenant, it requires approval of skybow Planner Connector on the deployment tenant as well.
Note 3: In order to use the Create task action in Modern Forms, List Actions and Automation Actions you have to approve API access request (SharePoint Admin Center->Advanced->API access) with 'Tasks.ReadWrite' and 'Directory.Read.All' permissions. This should be done once per tenant by a tenant admin.
To configure the action Create task additional properties should be specified:
Configuration
| Property | Required | Type | Description |
| Group | yes | String | Specify the name or the Id of the Microsoft 365 group with the plan as a containet to the task. |
| Plan | yes | String | Specify the name or the Id of the plan. |
| Bucket | no | String | Specify the name or the Id of the bucket to which the task belongs. The bucket needs to be in the plan that the task is in. |
| Title | yes | String | Specify the title for the new task. |
| Assign users | no | String | Specify the Id(s) or email(s) of the user(s) that you want to assign the task you create. Ids or emails should be separated with ','. |
| Start date | no | String | Specify the date at which the task starts. Date should be set in the format 'yyyy-mm-dd', 'mm-dd-yyyy'. |
| Due date | no | String | Specify the date at which the task is due. |
| Progress | no | String | You can render the task in the task board view when grouped by progress. |
| Priority | no | String | Specify the priority of the task. The possible values are Low, Medium, Important, Urgent, or the custom value. |
| Urls to attachments | no | String |
You can specify the url(s) to the attachments. Urls should be separated with ','. To configure attachments with Display name and set 'Show on card' option, pass a valid JSON object with properties: {url:'...', displayName: '...', showOnCard: boolean} Example: =JSON.stringify({url:[[@Item.DisplayFormUrl]], displayName: [[Title]], showOnCard: true}) |
| Checklists | no | String |
To configure checklists for a task, pass a valid JSON object with properties: [{title:'...', isChecked: boolean}] Example: =JSON.stringify([{title:'Todo 1', isChecked: false},{title:'Todo 2', isChecked: false},{title:'Todo 3', isChecked: true}]) |
| Labels | no | String | Specify the color label for the new task |
Availability
| Modern Forms | List Actions | Scheduled/Triggered Actions |
| ✓ | ✓ | ✓ |
Output
| Output Parameter | Type | Description |
| GroupID | String | Returns the Id of the M365 group as output parameter and can be used in subsequent actions. |
| PlanID | String | Returns the Id of the plan. |
| TaskID | String | Returns the Id of the created task. |
| TaskName | String | Returns the name of the created task. |
Examples:
There is an example how to dynamically check item attachments and add them to the task with displayName and showOncard properties:
let attachments = [];
[[Attachments.Url]].forEach(link => {
let urlParts = link.split('/');
let displayName = "";
if (urlParts.length > 0) {
//take last part of link as display name
displayName = urlParts[urlParts.length - 1];
}
else {
//trim url to fit 100 symbols limit
displayName = link.substring(0, 100);
}
attachments.push({ url: link, displayName: displayName, showOnCard: false });
});
return JSON.stringify(attachments);