SFTP Functions

Overview

Contains multiple Smart Services for interacting with a remote file server via SFTP, FTP, or SCP.  Using these services, an Appian application can be configured to send and receive files, folders, and metadata in a process.  Features support for zlib compression.

Key Features & Functionality

Smart Services included:

  • SFTP:
    • Send File Over SFTP
    • Receive File Over SFTP
    • Get Remote Folder Contents Over SFTP
    • Create Folder Over SFTP
    • Remove File Over SFTP
    • Receive Files In Folder Over
    • SFTP Rename File Over SFTP
  • SCP:
    • Send File Over SCP
    • Receive File Over SCP
  • FTP:
    • Send File Over FTP
    • Receive File Over FTP
    • Get Remote Folder Contents Over FTP
    • Receive Files In Folder Over FTP
    • Remove File Over FTP
    • Rename File Over FTP
  • FTPS
    • Get Remote Folder Contents Over FTPS
    • Receive File Over FTPS
    • Receive Files In Folder Over FTPS
    • Send File Over FTPS

Functions:

  • getfoldercontentsoverftp
  • getfoldercontentsoverftps
  • getfoldercontentsoversftp
  • All smart services in the package use Secure Credentials Store.
Anonymous
  • Hi - we are experiencing this issue as well where files are being copied over at "0" size when there is actual data in appian. We are being returned with "Input stream is closed" error. Your issue seems to be similar with out findings. Can you confirm if you were able to find a solution to this? We are currently on 2.2.1 version of SFTP Functions

  • Hi Author,

    Has recently there been changes to the 'Send File Over SFTP' smart service with the latest version of the plugin?

    When I upgraded the plugin from 1.6.2 to 2.2.2 then the 'Send File Over SFTP' smart service started failing for no reason. And the interesting thing is smart service node passes without any error and the file is not placed onto the SFTP location.

    And when I check logs the following is the error:

    [Appian Work Item - 16520 - WorkID 208 - execution00 - process 169537 - model 10914 : UnattendedJavaActivityRequest] ERROR com.appian.ps.plugins.sftpsmartservices.SendFileOverSFTP - Error transferring file to SFTP server 2: The system cannot find the path specified.     at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)


  • This seems to be a common issue.
    When I upgraded the plugin from 1.6.2 to 2.2.2 then the 'Send File Over SFTP' smart service started failing for no reason.
    So, I'm now rolling back to the old version.

  • Hi,

    We use a smart service named - 'Send File Over SFTP (Basic Credentials)' to transfer files/documents from Appian to the SFTP location.


    Is there any limit on file size that can be transferred via a smart service named - 'Send File Over SFTP (Basic Credentials)'?

  • Hi, When we connect to SFTP, what is default connection time out set? Is it possible to have the connection time out as parameter?

    Regards,

    Surjit

  • Hello,

    Im facing issue with "send file over SFTP".

    Do you know if is there file max size upload?

    Plugin version: 2.2.2

    Error: Timeout

    File size: 200Kb

    2022-09-08 10:16:13,599 [Appian Work Item - 161610 - execution01 : UnattendedJavaActivityRequest] ERROR com.appian.ps.plugins.sftpsmartservices.SendFileOverSFTP - Error transferring file to SFTP server
    4: java.net.SocketException: Connection timed out (Write failed)
    	at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:697)
    	at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:540)
    	at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:492)
    	at com.appian.ps.plugins.sftpsmartservices.SendFileOverSFTP.run(SendFileOverSFTP.java:151)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:136)
    	at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:136)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:130)
    	at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:27)
    	at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:130)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:88)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:21)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:67)
    	at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
    	at com.appiancorp.common.persistence.data.AppianDataUserContextProvider.executeWithConsistentDataReads(AppianDataUserContextProvider.java:143)
    	at com.appiancorp.process.engine.ProcessContinuationRequest.executeOuter(ProcessContinuationRequest.java:68)
    	at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:124)
    	at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    	at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:104)
    	at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:750)
    Caused by: java.net.SocketException: Connection timed out (Write failed)
    	at java.net.SocketOutputStream.socketWrite0(Native Method)
    	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
    	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
    	at com.jcraft.jsch.IO.put(IO.java:60)
    	at com.jcraft.jsch.Session._write(Session.java:1379)
    	at com.jcraft.jsch.Session.write(Session.java:1343)
    	at com.jcraft.jsch.ChannelSftp.sendWRITE(ChannelSftp.java:2646)
    	at com.jcr

  • Hi Team, 

    Do you have any documentation on Receive File Over SCP? I reviewed the documentation in the download and didn't see anything referencing SCP. 

    Thanks!

  • What's the appian version ?