SFTP Step: Copy Attachments to SFTP Server

kchorny
Tera Guru

Is anyone successfully using the SFTP action step to copy file attachments to a server? I am not sure what the 'Attachment records' field is expecting as input. It seems like it wants a sys_id, based on the error message, but it only seems to be grabbing a piece of the sys_id that I enter.

 

I have an input called Attachment that is type string, max 8000 chars. To test the action, I am entering the sys_id of a valid attachment (3a60c2eb1b2f2910fbbbeaccac4bcb25). Below is the error I'm getting. Why is the sys_id in the error message not the full sys_id that I entered?

 

[{"attachment_name":"","error":"Attachment does not exist or user does not have read permission on attachment with sysid 0fbbbeaccac4bcb2.","attachment_sys_id":"0fbbbeaccac4bcb2"}]

1 ACCEPTED SOLUTION

The array need to contain the attachment record itself. So you'd have a "Look Up Records" action in your flow with a condition of "Sys ID | is | <attachment sys_id>". Doing so will return an array with your attachment record. Then you have your SFTP action and can pass it the results of the "Look Up Records" action. There might be a better way to do it, but that's how I was able to work around it.

View solution in original post

5 REPLIES 5

Anna T_
Tera Expert

Hi there,

I know this thread is a bit old but I am wondering if you ever received the "Given path is incorrect or is not a directory" error when copying attachments? I am able to write to the "/" path, but not to the more specific path as defined by the client.

 

Thanks!