Interacting with ServiceNow via SFTP

Akihiko2
Kilo Contributor

Hi Community,

Is it possible to exchange files between our on-prem system and ServiceNow via SFTP?
That is, PUT or GET from the SFTP client on the on-prem system side to ServiceNow.
If yes, it would be great if you could tell us how to issue a private key for SSH on NOW.

Thanks,
Akihiko

1 ACCEPTED SOLUTION

Hello Akihiko,

Given you configure the SFTP data source with server, port, username, password, etc. I would say it utilizes a GET method being that ServiceNow goes out to the SFTP server - but I am not certain and there is no documentation I can find on the actual method retrieval. 

If you need to utilize PUT due to system configuration limitations, you may be able to do something with the Attachment API and a flow that triggers on the sys_attachment table being updated with a condition of File Name is {your file}. I've never tried something like that but the tools necessary should be there if you have to look at that route. 


Please mark my answer as correct/helpful if it has helped you.

Thanks,
Logan

View solution in original post

4 REPLIES 4

Logan Poynter
Mega Sage
Mega Sage

ServiceNow supports SFTP data sources.

Hi @Logan

Thank you for your prompt reply!
I understand that we can import files from a remote network server to ServiceNow via SFTP.
In this case, which of the following is correct?

 -PUT from the remote network server (SFTP client in our on-premise system) to ServiceNow

 -GET from the ServiceNow side to the remote network server (SFTP server on our on-prem system (DMZ))

Since our on-prem system only has SFTP client (no SFTP server), it would be great if we could PUT to ServiceNow.

Regards,
Akihiko

Hello Akihiko,

Given you configure the SFTP data source with server, port, username, password, etc. I would say it utilizes a GET method being that ServiceNow goes out to the SFTP server - but I am not certain and there is no documentation I can find on the actual method retrieval. 

If you need to utilize PUT due to system configuration limitations, you may be able to do something with the Attachment API and a flow that triggers on the sys_attachment table being updated with a condition of File Name is {your file}. I've never tried something like that but the tools necessary should be there if you have to look at that route. 


Please mark my answer as correct/helpful if it has helped you.

Thanks,
Logan

Hi @Logan,

Thank you very much for your answer, including the idea!
I would like to explore the feasibility of the Attachment API and the above flow.
helpful, sorry!

Best Regards,
Akihiko