View as Markdown
SFTP (key-based auth) icon

SFTP (key-based auth) ACTION

Upload File

Uploads a file or string in UTF-8 format to the SFTP server. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's SFTP (key-based auth) account once, then configure and run Upload File 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: "sftp-upload-file",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    sftp: { authProvisionId: "apn_xxxxxxx" },
    file: "File Path or URL",
    data: "Data",
  },
})

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.

Upload File inputs
Property Type Description
file File Path or URL string
The file to upload. Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.txt).
Optional
data Data string
Upload a string in UTF-8 format to the remote server.
Optional
remotePath Remote Path string
The path on the sftp server for store the data. e.g. ./uploads/my-file.txt
Required
syncDir SyncDir dir
Optional

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
sftp-upload-file
Version
0.4.2
App
SFTP (key-based auth)
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes