> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# sftp-ftp

> Secure file transfer (SFTP and FTP)

**Server path:** `/sftp-ftp` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`sftp_ftp_copy_file`](#sftp_ftp_copy_file)               | Copy a file on SFTP/FTP server                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [`sftp_ftp_create_directory`](#sftp_ftp_create_directory) | Create a directory on SFTP/FTP server                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [`sftp_ftp_delete_file`](#sftp_ftp_delete_file)           | Delete a single file on SFTP/FTP server                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [`sftp_ftp_download_file`](#sftp_ftp_download_file)       | Download a file from SFTP/FTP server. IN WORKFLOWS: Files are automatically saved to Node Outputs - no manual save step needed. By default, automatically extracts text from supported document formats (PDF, DOCX, PPTX, XLSX) and includes it in the response. Text files (TXT, CSV) do not need extraction. NOTE: Streaming is not available for SFTP/FTP due to protocol limitations. Content is returned as base64. For large files (>5MB), consider transferring to cloud storage first. |
| [`sftp_ftp_get_file_info`](#sftp_ftp_get_file_info)       | Get file information and check if a file exists on SFTP/FTP server                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [`sftp_ftp_list_directory`](#sftp_ftp_list_directory)     | List files and directories in SFTP/FTP remote directory                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [`sftp_ftp_remove_directory`](#sftp_ftp_remove_directory) | Remove a directory on SFTP/FTP server. By default removes the directory only when it is empty; set recursive=true to irreversibly delete the directory and all of its contents.                                                                                                                                                                                                                                                                                                                |
| [`sftp_ftp_rename_file`](#sftp_ftp_rename_file)           | Rename or move a file on SFTP/FTP server                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [`sftp_ftp_upload_file`](#sftp_ftp_upload_file)           | Upload a file to SFTP/FTP server from a URL                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

***

## sftp\_ftp\_copy\_file

Copy a file on SFTP/FTP server

**Parameters:**

| Parameter         | Type   | Required | Default | Description                                             |
| ----------------- | ------ | -------- | ------- | ------------------------------------------------------- |
| `sourcePath`      | string | Yes      | —       | Source file path (e.g., testfiles/original.txt)         |
| `destinationPath` | string | Yes      | —       | Destination file path (e.g., testfiles/Folder/copy.txt) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "sourcePath": {
        "type": "string",
        "description": "Source file path (e.g., testfiles/original.txt)"
      },
      "destinationPath": {
        "type": "string",
        "description": "Destination file path (e.g., testfiles/Folder/copy.txt)"
      }
    },
    "required": [
      "PCID",
      "sourcePath",
      "destinationPath"
    ]
  }
  ```
</Expandable>

***

## sftp\_ftp\_create\_directory

Create a directory on SFTP/FTP server

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                                 |
| ----------- | ------- | -------- | ------- | ----------------------------------------------------------- |
| `path`      | string  | Yes      | —       | Remote directory path to create (e.g., testfiles/NewFolder) |
| `recursive` | boolean | No       | —       | Create parent directories if they don't exist               |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "path": {
        "type": "string",
        "description": "Remote directory path to create (e.g., testfiles/NewFolder)"
      },
      "recursive": {
        "type": "boolean",
        "description": "Create parent directories if they don't exist"
      }
    },
    "required": [
      "PCID",
      "path"
    ]
  }
  ```
</Expandable>

***

## sftp\_ftp\_delete\_file

Delete a single file on SFTP/FTP server

**Parameters:**

| Parameter        | Type | Required | Default | Description                                                 |
| ---------------- | ---- | -------- | ------- | ----------------------------------------------------------- |
| `remoteFilePath` | any  | Yes      | —       | Remote file path to delete (e.g., reports/2024/summary.csv) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "remoteFilePath": {
        "type": "effects",
        "description": "Remote file path to delete (e.g., reports/2024/summary.csv)"
      }
    },
    "required": [
      "PCID",
      "remoteFilePath"
    ]
  }
  ```
</Expandable>

***

## sftp\_ftp\_download\_file

Download a file from SFTP/FTP server. IN WORKFLOWS: Files are automatically saved to Node Outputs - no manual save step needed. By default, automatically extracts text from supported document formats (PDF, DOCX, PPTX, XLSX) and includes it in the response. Text files (TXT, CSV) do not need extraction. NOTE: Streaming is not available for SFTP/FTP due to protocol limitations. Content is returned as base64. For large files (>5MB), consider transferring to cloud storage first.

**Parameters:**

| Parameter        | Type    | Required | Default | Description                                                                                                                                                                     |
| ---------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `remoteFilePath` | string  | Yes      | —       | Remote file path on server (e.g., testfiles/jam.jpeg)                                                                                                                           |
| `extractText`    | boolean | No       | `true`  | Automatically extracts text from supported formats (PDF, DOCX, PPTX, XLSX) and includes it in the response. Text files do not need extraction. Set to false to skip extraction. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "remoteFilePath": {
        "type": "string",
        "description": "Remote file path on server (e.g., testfiles/jam.jpeg)"
      },
      "extractText": {
        "type": "boolean",
        "default": true,
        "description": "Automatically extracts text from supported formats (PDF, DOCX, PPTX, XLSX) and includes it in the response. Text files do not need extraction. Set to false to skip extraction."
      }
    },
    "required": [
      "PCID",
      "remoteFilePath"
    ]
  }
  ```
</Expandable>

***

## sftp\_ftp\_get\_file\_info

Get file information and check if a file exists on SFTP/FTP server

**Parameters:**

| Parameter        | Type   | Required | Default | Description                                                       |
| ---------------- | ------ | -------- | ------- | ----------------------------------------------------------------- |
| `remoteFilePath` | string | Yes      | —       | Remote file path to check (e.g., testfiles/SahilFolder/README.md) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "remoteFilePath": {
        "type": "string",
        "description": "Remote file path to check (e.g., testfiles/SahilFolder/README.md)"
      }
    },
    "required": [
      "PCID",
      "remoteFilePath"
    ]
  }
  ```
</Expandable>

***

## sftp\_ftp\_list\_directory

List files and directories in SFTP/FTP remote directory

**Parameters:**

| Parameter       | Type    | Required | Default | Description                                                 |
| --------------- | ------- | -------- | ------- | ----------------------------------------------------------- |
| `remotePath`    | string  | No       | `"/"`   | Remote directory path to list. Must have trailing slash "/" |
| `includeHidden` | boolean | No       | `false` | Include hidden files and directories                        |
| `recursive`     | boolean | No       | `false` | List directories recursively                                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "remotePath": {
        "type": "string",
        "default": "/",
        "description": "Remote directory path to list. Must have trailing slash \"/\""
      },
      "includeHidden": {
        "type": "boolean",
        "default": false,
        "description": "Include hidden files and directories"
      },
      "recursive": {
        "type": "boolean",
        "default": false,
        "description": "List directories recursively"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## sftp\_ftp\_remove\_directory

Remove a directory on SFTP/FTP server. By default removes the directory only when it is empty; set recursive=true to irreversibly delete the directory and all of its contents.

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                                                                                                                                                                           |
| ----------- | ------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path`      | any     | Yes      | —       | Remote directory path to remove (e.g., reports/2024)                                                                                                                                                  |
| `recursive` | boolean | No       | `false` | Remove the directory and all of its contents. Defaults to false (only removes the directory when it is empty) for safety. Set to true to irreversibly delete the directory and everything beneath it. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "path": {
        "type": "effects",
        "description": "Remote directory path to remove (e.g., reports/2024)"
      },
      "recursive": {
        "type": "boolean",
        "default": false,
        "description": "Remove the directory and all of its contents. Defaults to false (only removes the directory when it is empty) for safety. Set to true to irreversibly delete the directory and everything beneath it."
      }
    },
    "required": [
      "PCID",
      "path"
    ]
  }
  ```
</Expandable>

***

## sftp\_ftp\_rename\_file

Rename or move a file on SFTP/FTP server

**Parameters:**

| Parameter | Type   | Required | Default | Description       |
| --------- | ------ | -------- | ------- | ----------------- |
| `oldPath` | string | Yes      | —       | Current file path |
| `newPath` | string | Yes      | —       | New file path     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "oldPath": {
        "type": "string",
        "description": "Current file path"
      },
      "newPath": {
        "type": "string",
        "description": "New file path"
      }
    },
    "required": [
      "PCID",
      "oldPath",
      "newPath"
    ]
  }
  ```
</Expandable>

***

## sftp\_ftp\_upload\_file

Upload a file to SFTP/FTP server from a URL

**Parameters:**

| Parameter        | Type   | Required | Default | Description                                                                                    |
| ---------------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------- |
| `remoteFilePath` | string | Yes      | —       | Remote directory path on server where file will be uploaded. Must have trailing slash "/"      |
| `fileUrl`        | string | Yes      | —       | URL of the file to upload (e.g., [https://example.com/file.pdf](https://example.com/file.pdf)) |
| `fileName`       | string | No       | —       | Optional file name to save as on server (if not provided, derived from URL)                    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID"
      },
      "remoteFilePath": {
        "type": "string",
        "description": "Remote directory path on server where file will be uploaded. Must have trailing slash \"/\""
      },
      "fileUrl": {
        "type": "string",
        "description": "URL of the file to upload (e.g., https://example.com/file.pdf)"
      },
      "fileName": {
        "type": "string",
        "description": "Optional file name to save as on server (if not provided, derived from URL)"
      }
    },
    "required": [
      "PCID",
      "remoteFilePath",
      "fileUrl"
    ]
  }
  ```
</Expandable>
