# Create or Update Reference Data — GoCanvas

> Creates or updates GoCanvas reference data. See the documentation

- Key: `gocanvas-create-or-update-reference-data`
- Type: Action (Write)
- Version: 0.0.2
- App: GoCanvas (`gocanvas`) — https://pipedream.com/apps/gocanvas.md
- This page (HTML): https://pipedream.com/apps/gocanvas/actions/create-or-update-reference-data
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/gocanvas/actions/create-or-update-reference-data/create-or-update-reference-data.mjs

## Description

Creates or updates GoCanvas reference data. [See the documentation](https://help.gocanvas.com/hc/en-us/article_attachments/26468076609559)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | The attribute name of the dataset to operate on. Will be created if it doesn't already exist. |
| `data` | `string` | Yes | A string of comma separated values representing the data to create/update. Include Column names: Example: Column1,Column2,Column3 Data1Column1,Data1Column2,Data1Column3 Data2Column1,Data2Column2,Data3Column3 |

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

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: "gocanvas-create-or-update-reference-data",
  arguments: {
    name: "Reference Data Name",
    data: "Data",
  },
})
```

**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: "gocanvas-create-or-update-reference-data",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    gocanvas: { authProvisionId: "apn_xxxxxxx" },
    name: "Reference Data Name",
    data: "Data",
  },
})

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": "gocanvas-create-or-update-reference-data",
    "configured_props": {
      "gocanvas": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Reference Data Name",
      "data": "Data"
    }
  }'
```

---

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