# Get Thing — Bubble

> Retrieves a specific thing (record) by its unique ID from your Bubble app's database. See the documentation

- Key: `bubble-get-thing`
- Type: Action (Read-only)
- Version: 0.0.1
- App: Bubble (`bubble`) — https://pipedream.com/apps/bubble.md
- This page (HTML): https://pipedream.com/apps/bubble/actions/get-thing
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/bubble/actions/get-thing/get-thing.mjs

## Description

Retrieves a specific thing (record) by its unique ID from your Bubble app's database. [See the documentation](https://manual.bubble.io/core-resources/api/the-bubble-api/the-data-api/data-api-requests#retrieve-record-by-id)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `typeName` | `string` | Yes | The name of the data type (e.g., customer, product). The API will convert this to lowercase with spaces removed. |
| `thingId` | `string` | Yes | The unique ID of the thing to retrieve or modify |

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

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: "bubble-get-thing",
  arguments: {
    typeName: "Data Type Name",
    thingId: "Thing ID",
  },
})
```

**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: "bubble-get-thing",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    bubble: { authProvisionId: "apn_xxxxxxx" },
    typeName: "Data Type Name",
    thingId: "Thing ID",
  },
})

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": "bubble-get-thing",
    "configured_props": {
      "bubble": { "authProvisionId": "apn_xxxxxxx" },
      "typeName": "Data Type Name",
      "thingId": "Thing ID"
    }
  }'
```

---

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