{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":4024,"path":"build-workflows/workflow-studio/copy-files-sftp-server.md","title":"Copy Attachments To SFTP Server","bundle":null,"doc_type":null,"release":"australia","body":"\n# Copy Attachments To SFTP Server\n\nCopies the specified attachments from ServiceNow instance to an SFTP server.\n\n## Fields\n\n<table id=\"table_k5k_qnj_kjb2\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td colspan=\"2\">\n\nConnections\n\n</td></tr><tr><td>\n\nConnection\n\n</td><td>\n\nType of connection to use to connect to the source SFTP server.-   **Define Connection Inline**: Define connection information within the action step.\n-   **Use Connection Alias**: Define connection information using the Connection Alias table. Using an alias eliminates the need to configure multiple credentials and connection information profiles when using an action in multiple environments. Likewise, if the connection information changes, you don't need to update your custom action.\n\n To learn more about connections and credentials, see [Introduction to credentials, connections, and aliases](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/credentials-connections-alias.md).\n\n</td></tr><tr><td>\n\nConnection Alias\n\n</td><td>\n\nConnection &amp; Credential alias record that the system uses to run the action step. Users with the flow\\_designer or admin role can create or select an associated Connection record. Using an alias eliminates the need to configure multiple credentials and connection information profiles when using an action in multiple environments. Likewise, if the connection information changes, you don't need to update your custom action. To learn more about connections and credentials, see [credentials, connections, and aliases](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/credentials-connections-alias.md). The credential value is displayed as a Password \\(2 Way Encrypted\\) data pill on the data panel. This field is available when **Use Connection Alias** is selected from the Connection list.\n\n</td></tr><tr><td>\n\nCredential Alias\n\n</td><td>\n\nCredential alias that the system uses to run the action step. Users with the flow\\_designer or admin role can create or select an associated Connection record. Using an alias eliminates the need to configure multiple credentials when using an action in multiple environments. Likewise, if the credential information changes, you don't need to update your custom action. To learn more about connections and credentials, see [credentials, connections, and aliases](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/credentials-connections-alias.md). The credential value is displayed as a Password \\(2 Way Encrypted\\) data pill on the data panel. This field is available when **Define Connection Inline** is selected from the Connection list.**Note:** The SFTP step requires a credential record that supports either SSH private key credentials or SSH credentials. This step does not support Windows credentials where the **Use MID Server service account** option is selected.\n\n</td></tr><tr><td>\n\nHost\n\n</td><td>\n\nName or IP address of the SFTP server to which the files you should be copied. This field is available when **Define Connection Inline** is selected from the Connection list.\n\n</td></tr><tr><td>\n\nPort\n\n</td><td>\n\nPort number to communicate with the server. This field is available when **Define Connection Inline** is selected from the Connection list.\n\n</td></tr><tr><td>\n\nMID Selection\n\n</td><td>\n\nOption to select a specific MID Server or MID Cluster. Choose any one of the following options. -   **Auto-Select MID Server**: Your ServiceNow instance selects the MID Server without manual input.\n-   **Specific MID Server**: Your ServiceNow instance uses MID Server that you specify.\n-   **Specific MID Cluster**: Your ServiceNow instance uses the MID Cluster that you specify.\n\nA MID Cluster is a group of MID Servers that enables your ServiceNow instance to handle multiple integrations, and improve integration speed. For more information, see [Configure a MID Server cluster](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/t_ConfigureAMIDServerCluster.md).\n\n\n This field is available when **Define Connection Inline** is selected from the Source Connection list.\n\n</td></tr><tr><td>\n\nMID Server\n\n</td><td>\n\nSpecific MID Server to run the SFTP step. This field is available when **Specific MID Server** is selected from the MID Selection list.\n\n</td></tr><tr><td>\n\nMID Cluster\n\n</td><td>\n\nData pill for the MID Cluster you want to use. This field is available when **Define Connection Inline** is selected from the Source Connection list, and **Specific MID Cluster** is selected from the MID Selection list.\n\n</td></tr><tr><td>\n\nMID Application\n\n</td><td>\n\nOption to use a MID Server to run the SFTP step. This field is available when **Define Connection Inline** is selected from the Connection list and **Auto-Select MID Server** is selected from the MID Selection list.\n\n</td></tr><tr><td>\n\nCapabilities\n\n</td><td>\n\nCapability of the MID Server. Select **SSH**. This field is available when **Define Connection Inline** is selected from the Connection list and **Auto-Select MID Server** is selected from the MID Selection list.\n\n</td></tr><tr><td>\n\nMID Server\n\n</td><td>\n\nData pill of the required MID Server. This field is available when **Define Connection Inline** is selected from the Connection list and **Specific MID Server** is selected from the MID Selection list.\n\n</td></tr><tr><td colspan=\"2\">\n\nAttachments to Copy\n\n</td></tr><tr><td>\n\nAttachment Records\n\n</td><td>\n\nRecords in your ServiceNow instance that you want to copy to SFTP server.\n\n</td></tr><tr><td colspan=\"2\">\n\nCopy to SFTP Target\n\n</td></tr><tr><td>\n\nTarget Path\n\n</td><td>\n\nFull path to the file in the target server you want to copy the contents. For example, `/root/doc/`. In this case, the attachments would be copied to this path on the server.\n\n</td></tr><tr><td colspan=\"2\">\n\nRetry Policy\n\n</td></tr><tr><td>\n\nEnable Retry Policy\n\n</td><td>\n\nOption to enable the retry policy. For more information, see [Retry policy](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/retry-policy.md).\n\n</td></tr><tr><td>\n\nOverride Default Policy for Alias\n\n</td><td>\n\nOption to override the default retry policy. This option is not applicable when **Define Connection Inline** is selected from the **Connection** list.\n\n</td></tr><tr><td>\n\nRetry Policy\n\n</td><td>\n\nDefault retry policy associated with **Connection Alias**. If **Override Default Policy for Alias** is selected, you can override the default retry policy and select another existing retry policy based on your requirement.\n\n</td></tr></tbody>\n</table>## Action error evaluation\n\n-   **If this step fails**\n\n    Data type: **Choice**\n\n    Option to continue running the next step or go to error evaluation. To use the step status code or message for a custom action error condition, see [Action error evaluation](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/action-error-evaluation.md).\n\n\n**Parent Topic:**[SFTP step](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/sftp-step.md)\n\n"}}