# Snowflake — Pipedream Connect

> A data warehouse built for the cloud

- API slug: `snowflake` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Databases
- Website: https://www.snowflake.com/
- This page (HTML): https://pipedream.com/apps/snowflake
- Tools: 9 actions · 14 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: snowflake`

```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": "snowflake",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Execute SQL Query:
const result = await mcp.callTool({
  name: "snowflake-execute-sql-query",
  arguments: {
    sql: "SQL Query",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## SDK

```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: "snowflake-execute-sql-query",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    snowflake: { authProvisionId: "apn_xxxxxxx" },
    sql: "SQL Query",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (9)

### `snowflake-execute-sql-query` — Execute SQL Query (Write)

Execute a custom Snowflake query. See our docs to learn more about working with SQL in Pipedream.

Full schema: https://pipedream.com/apps/snowflake/actions/execute-sql-query.md

### `snowflake-execute-sql-query-in-session` — Execute SQL Query In Session (Write)

Execute a Snowflake query inside a session started by the Start SQL Session action, so it shares that session's state — temporary tables, USE context, and session parameters — with the other queries in the same session. Pass the serialized session from Start SQL Session to the Session prop. Note…

Full schema: https://pipedream.com/apps/snowflake/actions/execute-sql-query-in-session.md

### `snowflake-insert-multiple-rows` — Insert Multiple Rows (Write)

Insert multiple rows into a table

Full schema: https://pipedream.com/apps/snowflake/actions/insert-multiple-rows.md

### `snowflake-insert-row` — Insert Single Row (Write)

Insert a row into a table

Full schema: https://pipedream.com/apps/snowflake/actions/insert-row.md

### `snowflake-list-database-options` — List Database Options (Read-only)

Retrieves available options for the Database field.

Full schema: https://pipedream.com/apps/snowflake/actions/list-database-options.md

### `snowflake-list-users-options` — List User Name Options (Read-only)

Retrieves available options for the User Name field.

Full schema: https://pipedream.com/apps/snowflake/actions/list-users-options.md

### `snowflake-list-warehouses-options` — List Warehouse Name Options (Read-only)

Retrieves available options for the Warehouse Name field.

Full schema: https://pipedream.com/apps/snowflake/actions/list-warehouses-options.md

### `database-query-sql-database` — Query SQL Database (Write)

Execute a SQL Query. See our docs to learn more about working with SQL in Pipedream.

Full schema: https://pipedream.com/apps/snowflake/actions/database-query-sql-database.md

### `snowflake-start-sql-session` — Start SQL Session (Write)

Start a Snowflake session and return it in serialized form, so subsequent Snowflake actions can run in the same session (preserving temporary tables, USE context, and session parameters) by passing it to their Session prop. The returned value contains session auth tokens — treat it as sensitive…

Full schema: https://pipedream.com/apps/snowflake/actions/start-sql-session.md

## Triggers (14)

### `snowflake-new-row` — New Row (Polling)

Emit new event when a row is added to a table

Full schema: https://pipedream.com/apps/snowflake/triggers/new-row.md

### `snowflake-query-results` — New Query Results (Polling)

Run a SQL query on a schedule, triggering a workflow for each row of results

Full schema: https://pipedream.com/apps/snowflake/triggers/query-results.md

### `snowflake-failed-task-in-schema` — Failed Task in Schema (Polling)

Emit new events when a task fails in a database schema

Full schema: https://pipedream.com/apps/snowflake/triggers/failed-task-in-schema.md

### `snowflake-new-database` — New Database (Polling)

Emit new event when a database is created

Full schema: https://pipedream.com/apps/snowflake/triggers/new-database.md

### `snowflake-deleted-role` — New Deleted Role (Polling)

Emit new event when a role is deleted

Full schema: https://pipedream.com/apps/snowflake/triggers/deleted-role.md

### `snowflake-deleted-user` — New Deleted User (Polling)

Emit new event when a user is deleted

Full schema: https://pipedream.com/apps/snowflake/triggers/deleted-user.md

### `snowflake-new-role` — New Role (Polling)

Emit new event when a role is created

Full schema: https://pipedream.com/apps/snowflake/triggers/new-role.md

### `snowflake-new-schema` — New Schema (Polling)

Emit new event when a schema is created

Full schema: https://pipedream.com/apps/snowflake/triggers/new-schema.md

### `snowflake-new-table` — New Table (Polling)

Emit new event when a table is created

Full schema: https://pipedream.com/apps/snowflake/triggers/new-table.md

### `snowflake-updated-role` — New Update Role (Polling)

Emit new event when a role is updated

Full schema: https://pipedream.com/apps/snowflake/triggers/updated-role.md

### `snowflake-updated-user` — New Update User (Polling)

Emit new event when a user is updated

Full schema: https://pipedream.com/apps/snowflake/triggers/updated-user.md

### `snowflake-usage-monitor` — New Usage Monitor (Polling)

Emit new event when a query is executed in the specified params

Full schema: https://pipedream.com/apps/snowflake/triggers/usage-monitor.md

### `snowflake-new-user` — New User (Polling)

Emit new event when a user is created

Full schema: https://pipedream.com/apps/snowflake/triggers/new-user.md

### `snowflake-change-to-warehouse` — New, Updated, or Deleted Warehouse (Polling)

Emit new events when a warehouse is created, altered, or dropped

Full schema: https://pipedream.com/apps/snowflake/triggers/change-to-warehouse.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
