# Create Activity — Zixflow

> Creates a new activity or task within Zixflow. See the documentation

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

## Description

Creates a new activity or task within Zixflow. [See the documentation](https://docs.zixflow.com/api-reference/activity-list/create)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `iconType` | `string` | Yes | Specifies the type of icon associated with the activity |
| `iconValue` | `string` | Yes | Defines the specific value of the icon based on the iconType |
| `scheduleAt` | `string` | Yes | Specifies the scheduled time for the activity in the format YYYY-MM-DDTHH:mm:ss.SSSZ |
| `name` | `string` | Yes | The name or title of the activity |
| `description` | `string` | No | A description providing additional details about the activity |
| `statusId` | `string` | No | The unique identifier for the status attribute. To get the Status ID, please use Get Activities action to get all activities, then investigate the status field in each record Options are loaded from the connected account. |
| `associationType` | `string` | No | The association type. Options are loaded from the connected account. |
| `associatedId` | `string` | No | The ID of the collection record associated with the activity. Options are loaded from the connected account. |

## 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": "zixflow",
      },
    },
  },
)

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: "zixflow-create-activity",
  arguments: {
    iconType: "Icon Type",
    iconValue: "Icon Value",
  },
})
```

**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: "zixflow-create-activity",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    zixflow: { authProvisionId: "apn_xxxxxxx" },
    iconType: "Icon Type",
    iconValue: "Icon Value",
  },
})

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": "zixflow-create-activity",
    "configured_props": {
      "zixflow": { "authProvisionId": "apn_xxxxxxx" },
      "iconType": "Icon Type",
      "iconValue": "Icon Value"
    }
  }'
```

---

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