View as Markdown
Grain icon

Grain ACTION

Download Recording

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 Get Transcript instead if you only need the spoken content, not the media file itself. Example: recordingId: "8a089fcb-0961-4393-8da2-f0db5f8cfd79" downloads the file and returns {"filePath": "/tmp/grain-recording-8a089fcb-....mp4", "filename": "grain-recording-8a089fcb-....mp4", "contentType": "video/mp4"}. See the documentation
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Grain account once, then configure and run Download Recording from your backend or agent.

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

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Download Recording inputs
Property Type Description
recordingId Recording ID string
The ID of the recording to fetch. Use List Recordings to find recording IDs.
Required
syncDir SyncDir dir
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
grain-download-recording
Version
0.0.1
App
Grain
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes