Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

SFTP step in flow action - copy file to instance

Florian Franke
Tera Contributor

Hello,

I'm trying to implement a flow action which contains a SFTP step. I want to get a file from a SFTP server and copy it to my servicenow instance (create an attachment for a CI record).

What's working: Creating new files on the SFTP server via a flow action.

What's not working: I can't delete or copy files from the SFTP via the flow action.

What I tested: SFTP connection from the MID server is working fine via powershell and I can do all operations (create, get, delete files).

I can't find an example how to get a file from the SFTP in the documentation: https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/flow-designer/reference/copy-files-instace.html

But there are so less parameters I basically tested all possibilties in the sftp step:

find_real_file.png

I'm getting timeouts when I try to copy the file:

find_real_file.png

Out of curiosity getting all file names is working:

find_real_file.png

I'm running out of idea what's going wrong. Maybe someone can point me in the right direction or give an exmple how to configure correctly the SFTP step.

Thanks in advance!

7 REPLIES 7

Abdul Aamer
Tera Contributor

@Florian Franke could you please help me know what credentials did you used to connect to the sftp server here, is the ssh credentials or the windows credentials.
As i am using the windows credentials and getting the error as "TCP connection failure"
Best Regards

Abdul Aamer

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.

 

I hope this helps

Raj Rudra Chat1
Tera Contributor

Hi All,

Please find the KB article below regarding this issue

Flow Action with SFTP step fails after upgrade with error : 'Failed to authenticate with user: <user...

 

Hope it helps !!