> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.teamwork.core.CreateSubtask

- Component: `appmixer.teamwork.core.CreateSubtask`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.teamwork 1.1.0](https://connectors.appmixer.com/connector/appmixer.teamwork/1.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.teamwork/1.1.0/component/appmixer.teamwork.core.CreateSubtask>

Create a subtask in Teamwork.com

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Name (`name`) | text | - |
| Description (`description`) | text | - |
| Project (`projectId`) | select | - |
| Task List (`tasklistId`) | select | - |
| Parent Task (`parentTaskId`) | select | - |
| Assignees (`assignees`) | multiselect | - |
| Tags (`tagIds`) | multiselect | - |
| Priority (`priority`) | select | - |
| Start Date (`startDate`) | date-time | - |
| End Date (`endDate`) | date-time | - |
| Estimated Minutes (`estimatedMinutes`) | number | - |
| Custom Fields (`customfields`) | expression | - |

## Output ports

### Port `task`

| Field | Type | Description |
| --- | --- | --- |
| Task (`task`) | object | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.teamwork.core.CreateSubtask",
  "auth": {
    "service": "appmixer:teamwork"
  },
  "author": "hugh.marron@teamwork.com",
  "description": "Create a subtask in Teamwork.com",
  "private": false,
  "version": "1.0.0",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tasklistId": {
            "type": "integer"
          },
          "projectId": {
            "type": "string"
          },
          "parentTaskId": {
            "type": "string"
          },
          "assignees": {
            "type": "array"
          },
          "tagIds": {
            "type": "array"
          },
          "priority": {
            "type": "string"
          },
          "startDate": {
            "type": "string"
          },
          "endDate": {
            "type": "string"
          },
          "estimatedMinutes": {
            "type": "integer"
          },
          "customfields": {
            "type": "object"
          }
        },
        "required": [
          "name",
          "parentTaskId"
        ]
      },
      "inspector": {
        "inputs": {
          "name": {
            "index": 0,
            "type": "text",
            "label": "Name"
          },
          "description": {
            "index": 1,
            "type": "text",
            "label": "Description"
          },
          "projectId": {
            "index": 2,
            "type": "select",
            "label": "Project",
            "source": {
              "url": "/component/appmixer/teamwork/core/ListProjects?outPort=projects",
              "data": {
                "transform": "ListProjects#toInspector"
              }
            }
          },
          "tasklistId": {
            "index": 3,
            "type": "select",
            "label": "Task List",
            "source": {
              "url": "/component/appmixer/teamwork/core/ListProjectTasklists?outPort=tasklists",
              "data": {
                "messages": {
                  "in/projectId": "inputs/in/projectId"
                },
                "transform": "ListProjectTasklists#toInspector"
              }
            }
          },
          "parentTaskId": {
            "index": 4,
            "type": "select",
            "label": "Parent Task",
            "source": {
              "url": "/component/appmixer/teamwork/core/ListTasksInList?outPort=tasks",
              "data": {
                "messages": {
                  "in/tasklistId": "inputs/in/tasklistId"
                },
                "transform": "ListTasksInList#toInspector"
              }
            }
          },
          "assignees": {
            "index": 5,
            "type": "multiselect",
            "label": "Assignees",
            "min": 0,
            "source": {
              "url": "/component/appmixer/teamwork/core/ListPeople?outPort=people",
              "data": {
                "transform": "ListPeople#toInspector"
              }
            }
          },
          "tagIds": {
            "index": 6,
            "type": "multiselect",
            "label": "Tags",
            "source": {
              "url": "/component/appmixer/teamwork/core/ListTags?outPort=tags",
              "data": {
                "transform": "ListTags#toInspector"
              }
            }
          },
          "priority": {
            "index": 7,
            "type": "select",
            "label": "Priority",
            "options": [
              {
                "content": "High",
                "value": "high"
              },
              {
                "content": "Medium",
                "value": "medium"
              },
              {
                "content": "Low",
                "value": "low"
              }
            ]
          },
          "startDate": {
            "index": 8,
            "type": "date-time",
            "label": "Start Date",
            "config": {
              "format": "YYYY-MM-DD"
            }
          },
          "endDate": {
            "index": 9,
            "type": "date-time",
            "label": "End Date",
            "config": {
              "format": "YYYY-MM-DD"
            }
          },
          "estimatedMinutes": {
            "index": 10,
            "type": "number",
            "label": "Estimated Minutes"
          },
          "customfields": {
            "type": "expression",
            "label": "Custom Fields",
            "index": 11,
            "levels": [
              "AND"
            ],
            "fields": {
              "name": {
                "type": "select",
                "label": "Field",
                "index": 1,
                "source": {
                  "url": "/component/appmixer/teamwork/core/ListCustomFields?outPort=customfields",
                  "data": {
                    "messages": {
                      "in/entity": "task",
                      "in/onlyTextAndNumber": true
                    },
                    "transform": "./ListCustomFields#toInspector"
                  }
                }
              },
              "value": {
                "type": "text",
                "label": "Value",
                "index": 2
              }
            }
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "task",
      "options": [
        {
          "label": "Task",
          "value": "task",
          "schema": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "title": "ID"
              },
              "name": {
                "type": "string",
                "title": "Name"
              },
              "description": {
                "type": "string",
                "title": "Description"
              },
              "priority": {
                "type": "string",
                "title": "Priority"
              },
              "tagIds": {
                "type": "array",
                "title": "Tag IDs"
              },
              "estimateMinutes": {
                "type": "number",
                "title": "Estimated Minutes"
              },
              "tasklistId": {
                "type": "number",
                "title": "Task List ID"
              }
            }
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
