Aylee Andersen
Kilo Sage

I built out a flow that uses the SFTP step to copy file attachments to a server. It took me a while but I got it working eventually.

 

One thing I noticed was that the 'Attachment records' is expecting a list of records, not just a single record. I had to add an action to my flow before my SFTP action to grab a list of records that returned an array containing my single attachment record.

 

I also ran into the same error message you did, but was able to resolve that by making sure my sys_user record that was associated to my MID Server had the right user roles to access the table that the attachment lived on. 

 

I hope some of that is helpful!

Thank you! Does the array contain the sys_id of the attachment, or the file name?

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

Thank you so much, it's working!!!

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!