createTask Documentation
Purpose
This node is designed to facilitate the creation of tasks within Asana, a project management tool. It streamlines the task creation process by allowing users to specify various parameters, including the task's name, notes, due dates, and assignments. This function is particularly useful for automating task creation through integrations within the Vantage analytics & data platform, allowing organizations to efficiently manage project workflows.
Settings
This node includes several configurable settings that impact task creation. Below, the settings are outlined in detail:
1. Name
- Input Type: String
- Description: The name of the task being created. It is a mandatory field, and the function will return an error if it is not provided.
- Default Value:
''(empty string)
2. Notes
- Input Type: String
- Description: Additional notes related to the task. This field is optional, and if not provided, will default to
undefined. - Default Value:
''(empty string)
3. Project Gid
- Input Type: String
- Description: The global ID of the Asana project to which the task should be assigned. This field is optional. If not specified, the task will be created without a project association.
- Default Value:
''(empty string)
4. Workspace
- Input Type: String
- Description: The workspace ID within which the task is being created. If omitted and no project ID is provided, the function will attempt to auto-resolve to the user's first workspace.
- Default Value:
''(empty string)
5. Assignee
- Input Type: String
- Description: The user ID of the person assigned to the task. This setting is optional and may be omitted if no specific assignee is needed.
- Default Value:
''(empty string)
6. Due On
- Input Type: String (Date)
- Description: The date by which the task should be completed. This is an optional parameter. If provided, it should follow Asana's date format.
- Default Value:
''(empty string)
7. Start On
- Input Type: String (Date)
- Description: The date the task is set to start. This optional setting may enhance task management and planning if specified.
- Default Value:
''(empty string)
How It Works
This node functions as follows:
- Receives inputs, configuration settings, and context as parameters.
- Extracts task details from provided inputs or defaults.
- Validates that the task name is present; if not, returns an error response.
- Establishes a connection to the Asana API using a secure connection.
- If no workspace or project ID is specified, it auto-resolves the first available workspace.
- Calls the Asana API to create the task with the specified parameters.
- Returns an output object containing the task's globally unique identifier (gid), name, URL, and creation status.
In the event of an error, either from user input validation or the Asana API, an appropriate error message is returned.
Expected Data
This node expects the following data structure from the user, organized under inputs:
{
"name": "String - Required task name",
"notes": "String - Optional task notes",
"projectGid": "String - Optional project ID",
"workspace": "String - Optional workspace ID",
"assignee": "String - Optional assignee ID",
"dueOn": "String - Optional due date in Asana format",
"startOn": "String - Optional start date in Asana format"
}Use Cases & Examples
Use Case 1: Automating Task Creation for Marketing Campaigns
A marketing team can automate the creation of tasks for each campaign stage (e.g., Idea, Development, Review), ensuring all team members are aware of their responsibilities and deadlines.
Use Case 2: Daily Standup Task Generation
A project manager might want to create daily standup tasks automatically for the team, ensuring that each member has a dedicated task on the project board to update their progress.
Detailed Example: Daily Standup Task Creation
To create a task for a daily standup meeting, this node might be configured as follows:
{
"inputs": {
"name": "Daily Standup Meeting",
"notes": "Brief updates to share each team member's progress.",
"projectGid": "1234567890",
"workspace": "0987654321",
"assignee": "user@example.com",
"dueOn": "2023-10-20",
"startOn": "2023-10-20"
}
}In this example:
- The task is named "Daily Standup Meeting."
- Additional notes provide context for the task.
- The task is associated with a specific project (ID
1234567890) and workspace (ID0987654321). - An assignee is specified to indicate who will handle the task.
- Both due and start dates are set to October 20, 2023, establishing a clear timeline for the task.
The result will yield a new task in Asana with the specified details, helping the team stay organized and aligned.