# Create Article — Craftboxx

> Creates a new article in Craftboxx. See the documentation

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

## Description

Creates a new article in Craftboxx. [See the documentation](https://api.craftboxx.de/docs/docs.json)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | The name of the article |
| `manufacturer` | `string` | No | The manufacturer of the article |
| `manufacturerArticleNr` | `string` | No | The manufacturer article number of the article |
| `ean` | `string` | No | The EAN of the article |
| `supplierArticleNr` | `string` | No | The supplier article number of the article |
| `unitPrice` | `string` | No | The price of the article. Eg. 2.5 |
| `currency` | `string` | No | The currency of the article |
| `vatRate` | `string` | No | The VAT rate of the article. Eg. 19 |
| `vatIncluded` | `boolean` | No | Whether the price is VAT included |
| `unit` | `string` | No | The unit of the article |
| `priceDate` | `string` | No | The date of the price. Eg. 2024-04-21 |
| `articleUrl` | `string` | No | The URL of the article |
| `info` | `string` | No | The description of the article |
| `dangerousMaterial` | `boolean` | No | Whether the article is dangerous material |

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

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: "craftboxx-create-article",
  arguments: {
    name: "Name",
    manufacturer: "Manufacturer",
  },
})
```

**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: "craftboxx-create-article",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    craftboxx: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    manufacturer: "Manufacturer",
  },
})

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": "craftboxx-create-article",
    "configured_props": {
      "craftboxx": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "manufacturer": "Manufacturer"
    }
  }'
```

---

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