# Create Task — Firmao

> Create a new task for the organization. See the documentation

- Key: `firmao-create-task`
- Type: Action (Write)
- Version: 0.0.2
- App: Firmao (`firmao`) — https://pipedream.com/apps/firmao.md
- This page (HTML): https://pipedream.com/apps/firmao/actions/create-task
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/firmao/actions/create-task/create-task.mjs

## Description

Create a new task for the organization. [See the documentation](https://firmao.net/API-Documentation_EN.pdf)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | Name of the task |
| `priority` | `string` | No | Priority of the task |
| `responsibleUsers` | `string[]` | No | Array of users responsible for the task Options are loaded from the connected account. |
| `estimatedHours` | `integer` | No | Estimated hours to complete the task |
| `description` | `string` | No | Description of the task |
| `plannedStartDate` | `string` | No | Planned start date of the task. e.g 2012-07-17T00:00:00+02:00 |
| `plannedEndDate` | `string` | No | Planned end date of the task. e.g 2012-07-17T00:00:00+02:00 |
| `orderCalculateFromGross` | `boolean` | No | Flag to indicate if order calculation is from gross |
| `orderVatPercent` | `integer` | No | VAT percent for the order |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "firmao",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "firmao-create-task",
  arguments: {
    name: "Name",
    priority: "Priority",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "firmao-create-task",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    firmao: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    priority: "Priority",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "firmao-create-task",
    "configured_props": {
      "firmao": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "priority": "Priority"
    }
  }'
```

---

- App: https://pipedream.com/apps/firmao.md · All apps: https://pipedream.com/apps
