SFTP Integrations and Workflow Files
An SFTP integration stores the connection configuration and credentials a workflow uses to fetch remote files. The fetched object is stored as a file belonging to the workflow run, so downstream steps can use its recorded file ID. Connection setup, remote-file availability, fetch completion and downstream import/email processing are different checks.
Create the connection
Open the dashboard's Integration Connections list and its create/add control, then choose the SFTP provider. This is the team-scoped dashboard.integration-tokens.index/create surface, rendered by Admin/Integrations/Index/Create. Its navigation entry varies by deployment; if settings do not expose it, ask the platform administrator to open that supported integration screen for your team. Use an account allowed to manage the selected integration, then configure:
| Field | Meaning |
|---|---|
| Host | The intended SFTP server hostname |
| Port | Server port; the runtime defaults to 22 when unspecified |
| Username | The remote account the platform should use |
| Root path | Filesystem root exposed to the workflow; defaults to / |
| Authentication method | SSH key or password |
| Password/private key | Stored credential for the selected authentication method |
Use a dedicated remote account/root containing only the intended workflow files. Paths supplied by a step are interpreted through that rooted adapter. A project page token or project REST key is not an SFTP credential.
For key authentication, generate or supply a key through the supported integration controls. The platform stores the private key with encrypted credentials and exposes the public key/fingerprint. Install the public key on the remote server for the configured username before testing. Generate New Key rotates the credential; it does not automatically update the remote server's authorized keys.
Test and inspect connection status
Use Test Connection, then refresh Connection Status and inspect last success/error. The test runs on the workflow workers so it uses the same egress path as a fetch, rather than only the web tier. A queued acknowledgment means the test was started.
The first successful connection learns and pins the server host key. A later mismatch is refused. The fingerprint shown beside the generated public key belongs to the client authentication key; it is not the server host-key fingerprint. The current mismatch message does not display the observed server fingerprint. Have the server/platform administrator independently compare the server's expected host key with the stored host_key pin through the operator process before authorizing a reset. Use Reset Host Key Pin only after independently confirming a legitimate server-key change; the next successful connection learns a new pin. Do not use that action as a generic remedy for an unexplained connection failure.
A successful root listing proves that the account can connect and list that root. It does not prove a specific file exists, is readable, has an allowed type or will fit the workflow's size limit.
Fetch a file in a workflow
Create a workflow with the supported Fetch Remote File action. Select an integration available to that execution's team/project context. The action resolves the integration using the SFTP provider contract; choosing an ID alone does not bypass its scope checks.
Configure:
integration_token_id: the selected SFTP integration.remote_path: the intended path within the configured root.missing_file_behavior:failorskip, depending on whether absence is an error or an expected branch.max_file_size_kb: the accepted size bound. The action defaults to 51,200 KB, with a configured hard cap that defaults to 204,800 KB.allowed_mimetypes: permitted MIME types where the workflow should restrict file content.delete_after_fetch: whether a successful fetch should remove the remote source. Keep this false while developing/testing against a shared source.
The path can be literal or use the supported template/step-output references. Inspect the rendered path for representative input. Missing legacy {payload.key} values fail, while an absent {{trigger.payload.key}} can render empty with a detail note; do not assume the two spellings have identical missing-value behavior. Date/time templates must agree with the expected server filename/time zone.
The download stages through a temporary file. Size is checked while copying and MIME type is determined from the actual bytes. Renaming a file to a permitted extension does not establish its type.
Outputs and downstream steps
A successful fetch records found:true and workflow_file_id. In skip mode, a missing remote file records found:false and a null file ID so a condition can choose whether to continue.
workflow_file_id identifies the workflow file record. It is not an Export Log ID or an arbitrary bucket path. Select the downstream action's supported file-reference input through the editor. An email attachment or import action must resolve the right file record type; an ID from another output contract is not interchangeable.
Use a condition on found when absence is valid. Confirm that the downstream import parses the expected encoding/columns and that any email attachment is the intended fetched object. The fetch succeeding does not prove the later step finished.
Failure and retry behavior
Connection/network failures are retryable through the workflow's configured engine behavior. A missing file in fail mode, an oversized object or a disallowed MIME type is a nonretryable data/configuration failure. Fix the cause before starting an appropriate new attempt.
delete_after_fetch is an external mutation. A repeated completed fetch can find the source gone. Inspect the original invocation and recorded file before retrying. Do not assume a test run makes an arbitrary remote server disposable; use controlled test files with remote deletion disabled.
Retain the integration, run/invocation, rendered path and redacted error when seeking help. Keep passwords, private keys and sensitive file contents out of support messages. Worker/network deployment and recovery procedures remain in the separate runbooks.
Verify and troubleshoot
Use a test server/root and check valid credentials, an unreadable/missing file, host-key mismatch, an oversized object, disallowed content and skip behavior. Verify the stored workflow file and downstream result. Test deletion only with an explicitly disposable remote file after the successful nondeleting path.
| Symptom | Check |
|---|---|
| Connection test is pending | Queued worker test and current Connection Status |
| Authentication fails | Username, selected auth method, installed public key/password and server permissions |
| Host-key mismatch | Independently verified server key; investigate before resetting the pin |
| Connection succeeds but fetch fails | Root/path, filename, permissions, rendered template, size and MIME limits |
| Skip fetch has no attachment | found:false and null output are expected; branch before the file-consuming step |
| Downstream step rejects the ID | Workflow File ID versus Export Log ID and the action's supported reference input |
| Retry cannot find the file | Prior successful fetch and delete_after_fetch behavior |
Implementation reference
Reviewed against app/Http/Controllers/Admin/IntegrationTokenController.php, app/Services/Integrations/IntegrationProviderRegistry.php, app/Services/RemoteFiles/, app/Jobs/TestRemoteFileConnectionJob.php, app/Workflows/WorkflowActions/FetchRemoteFileAction.php, the integrationToken composable, and testing/Integration/Workflows/FetchRemoteFileActionTest.php at experience-portal commit 0cab696769c165d93328253378ad7e51ec7ab62e on 2026-10-13. This guide does not run remote connections or remove remote files.