# Grain — Pipedream Connect

> Grain joins your calls to take notes, document the next steps, and file automated meeting notes in platforms like Slack, HubSpot, and more.

- API slug: `grain` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Productivity
- Website: https://grain.com/
- This page (HTML): https://pipedream.com/apps/grain
- Tools: 9 actions · 9 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: grain`

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

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

const { tools } = await mcp.listTools()

// e.g. run Download Recording:
const result = await mcp.callTool({
  name: "grain-download-recording",
  arguments: {
    recordingId: "Recording ID",
    syncDir: "SyncDir",
  },
})
```

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

## API proxy

For a Grain endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.grain.com/_/public-api/me

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZ3JhaW4uY29tL18vcHVibGljLWFwaS9tZQ?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.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: "grain-download-recording",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    grain: { authProvisionId: "apn_xxxxxxx" },
    recordingId: "Recording ID",
    syncDir: "SyncDir",
  },
})
```

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

## Actions (9)

### `grain-download-recording` — Download Recording (Read-only)

Downloads a Grain recording's media file (video or audio) and writes it to File Stash, returning filePath, filename, and contentType. Only recordings with processed media have a downloadable file — check media_type (video or audio, not transcript) from List Recordings or Get Recording first. Use…

Full schema: https://pipedream.com/apps/grain/actions/download-recording.md

### `grain-get-recording` — Get Recording (Read-only)

Fetches a specific recording by its ID from Grain, returning its metadata (title, times, URL, tags, teams, meeting type). Enable the optional include props to add highlights, participants, AI action items, AI summary, calendar event, HubSpot data, or screenshares to the response. Use List…

Full schema: https://pipedream.com/apps/grain/actions/get-recording.md

### `grain-get-transcript` — Get Transcript (Read-only)

Fetches the full transcript of a Grain recording. The json format returns structured segments with speaker, participant ID, start/end times in milliseconds, and text; txt, vtt, and srt return plain text or subtitle formats. Use List Recordings to find recording IDs; use Get Recording for the…

Full schema: https://pipedream.com/apps/grain/actions/get-transcript.md

### `grain-list-meeting-types` — List Meeting Types (Read-only)

Lists the meeting types configured in your Grain workspace (id, name, scope), where scope is internal or external. Use this to understand how recordings are categorized, or to resolve a meeting type's ID for filtering. Example: returns [{"id": "e8b894a9-7ecf-4330-a282-527c085618fd", "name"…

Full schema: https://pipedream.com/apps/grain/actions/list-meeting-types.md

### `grain-list-recordings` — List Recordings (Read-only)

Lists Grain recordings, optionally filtered by start datetime range (ISO8601), title search, participant scope, team, or meeting type. Automatically paginates and returns up to Max Results recordings. Use this to find recording IDs for Get Recording and Get Transcript. Example: titleSearch: "Acme"…

Full schema: https://pipedream.com/apps/grain/actions/list-recordings.md

### `grain-list-teams` — List Teams (Read-only)

Lists the teams in your Grain workspace (id, name). Use this to resolve a team's ID before sharing a recording with it via Manage Recording Sharing. Example: returns [{"id": "a414c333-c9fe-4fdc-9131-fb31796699b2", "name": "Pipedream"}]. See the documentation

Full schema: https://pipedream.com/apps/grain/actions/list-teams.md

### `grain-list-users` — List Users (Read-only)

Lists the users in your Grain workspace (id, name, email). Use this to resolve a user's ID before sharing a recording with them via Manage Recording Sharing, or to identify who's who when reviewing recording participants. Example: returns [{"id": "d91b7ed0-a149-425c-9623-0664148e4fc1", "name"…

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

### `grain-manage-recording-sharing` — Manage Recording Sharing (Write)

Shares or unshares a recording with a specific user or team. Use List Recordings to find the recording's ID, and List Users or List Teams to resolve the target's ID. Set operation to share to grant access or unshare to revoke it, and targetType to user or team. Example: recordingId…

Full schema: https://pipedream.com/apps/grain/actions/manage-recording-sharing.md

### `grain-update-recording` — Update Recording (Write)

Renames a recording and/or adds and removes tags on it. All fields are optional — pass only what you want to change. Use List Recordings first to find the recording's ID. Example: to retitle a recording and tag it, pass title and addTags: ["qa-verified"] together. See the documentation

Full schema: https://pipedream.com/apps/grain/actions/update-recording.md

## Triggers (9)

### `grain-new-highlight-instant` — New Highlight (Instant) (Instant)

Emit new event when a highlight is added. See the documentation

Full schema: https://pipedream.com/apps/grain/triggers/new-highlight-instant.md

### `grain-removed-highlight-instant` — New Highlight Removed (Instant) (Instant)

Emit new event when a highlight is removed. See the documentation

Full schema: https://pipedream.com/apps/grain/triggers/removed-highlight-instant.md

### `grain-updated-highlight-instant` — New Highlight Updated (Instant) (Instant)

Emit new event when a highlight is updated. Deduplicates retried webhook deliveries of the same update; each distinct update still emits. See the documentation

Full schema: https://pipedream.com/apps/grain/triggers/updated-highlight-instant.md

### `grain-new-recording-instant` — New Recording (Instant) (Instant)

Emit new event when a recording is added. See the documentation

Full schema: https://pipedream.com/apps/grain/triggers/new-recording-instant.md

### `grain-removed-recording-instant` — New Recording Removed (Instant) (Instant)

Emit new event when a recording is removed. See the documentation

Full schema: https://pipedream.com/apps/grain/triggers/removed-recording-instant.md

### `grain-updated-recording-instant` — New Recording Updated (Instant) (Instant)

Emit new event when a recording is updated. Deduplicates retried webhook deliveries of the same update; each distinct update still emits. See the documentation

Full schema: https://pipedream.com/apps/grain/triggers/updated-recording-instant.md

### `grain-new-story-instant` — New Story (Instant) (Instant)

Emit new event when a story is added. See the documentation

Full schema: https://pipedream.com/apps/grain/triggers/new-story-instant.md

### `grain-removed-story-instant` — New Story Removed (Instant) (Instant)

Emit new event when a story is removed. See the documentation

Full schema: https://pipedream.com/apps/grain/triggers/removed-story-instant.md

### `grain-updated-story-instant` — New Story Updated (Instant) (Instant)

Emit new event when a story is updated. Deduplicates retried webhook deliveries of the same update; each distinct update still emits. See the documentation

Full schema: https://pipedream.com/apps/grain/triggers/updated-story-instant.md

---

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