> For the complete documentation index, see [llms.txt](https://docs.leadbay.app/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.leadbay.app/doc/product-guides/sftp-connector.md).

# SFTP Connector

Automatically import leads from a CSV file hosted on your SFTP server. Leadbay connects to the server, reads the file, and keeps your data in sync.

{% hint style="info" %}
The SFTP connector is only available to **admin** users. See [Team & Organization](/doc/product-guides/team-management.md) for role details.
{% endhint %}

***

## When to Use SFTP

Use the SFTP connector when your CRM or internal system exports lead data as a CSV file to an SFTP server. Instead of downloading and re-uploading the file manually each time, Leadbay connects directly and syncs automatically.

***

## Set Up a Connection

1. From the side menu, navigate to **Data Sources**
2. Click **Add new integration**
3. Select **SFTP** from the list

<figure><img src="https://1428241958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzhwr2nXLtM9EytX9Xvg%2Fuploads%2Fgit-blob-023f91c7b45720b93067ca9868a8e8345343845f%2Fscreenshot-sftp-connector.png?alt=media" alt="SFTP connector form"><figcaption><p>The SFTP connection form</p></figcaption></figure>

Fill in the connection form:

| Field         | Description                                                         |
| ------------- | ------------------------------------------------------------------- |
| **Host**      | SFTP server address (e.g. `sftp.yourcompany.com`)                   |
| **Port**      | Server port (default: `22`)                                         |
| **Username**  | Your SFTP login                                                     |
| **Password**  | Your SFTP password                                                  |
| **File Path** | Full path to the CSV file on the server (e.g. `/exports/leads.csv`) |

### Test Before Connecting

Click **Test connection** to verify that Leadbay can reach the server and find the file. A green checkmark confirms the connection is working.

Once the test passes, click **Connect** to create the connector. Leadbay immediately queues a first sync.

***

## How Sync Works

* Leadbay checks the SFTP file periodically
* The file is only re-imported when its content changes (detected via checksum)
* Each sync parses the CSV and imports leads using your field and status mappings — the same mappings used for manual CSV imports

{% hint style="info" %}
Your CSV file must follow the same format as a regular Leadbay CSV import — at minimum a company name column. See [Data Sources](/doc/product-guides/data-sources.md) for column requirements and mapping details.
{% endhint %}

***

## Editing or Removing a Connector

To update connection details, open the connector from your integrations list and modify the fields. To remove it, delete the connector from the same screen.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.leadbay.app/doc/product-guides/sftp-connector.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
