# Create Product — WP Maps

> Creates a new product in WP Maps. See the documentation

- Key: `wp_maps-create-product`
- Type: Action (Write)
- Version: 0.0.2
- App: WP Maps (`wp_maps`) — https://pipedream.com/apps/wp-maps.md
- This page (HTML): https://pipedream.com/apps/wp-maps/actions/create-product
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/wp_maps/actions/create-product/create-product.mjs

## Description

Creates a new product in WP Maps. [See the documentation](https://support.agilelogix.com/hc/en-us/articles/900006795363-API-Access-Points#create-product)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `title` | `string` | Yes | Title of the product |
| `description` | `string` | Yes | Description of the product |
| `price` | `string` | Yes | Price of the product |
| `image` | `string` | No | The URL of the product image |
| `url` | `string` | No | The product URL |

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

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: "wp_maps-create-product",
  arguments: {
    title: "Title",
    description: "Description",
  },
})
```

**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: "wp_maps-create-product",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    wp_maps: { authProvisionId: "apn_xxxxxxx" },
    title: "Title",
    description: "Description",
  },
})

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": "wp_maps-create-product",
    "configured_props": {
      "wp_maps": { "authProvisionId": "apn_xxxxxxx" },
      "title": "Title",
      "description": "Description"
    }
  }'
```

---

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