Other Attachments File Name Including File Path by Mistake

Hi all, I have a simple but very frustrating issue when I specify “Other Attachments” in a workflow. The file path is being included in the file name. For example, my workflow saves “Example.pdf” to the correct location without an issue. It even attaches the file to the email, no problem. However, in specifying the file path to the file in the “Other Attachments” field, somehow my file gets renamed once it attaches to the email. So “Example.pdf” becomes “Projects/Payroll/Example.pdf” on the actual email attachment.

If anyone can help me with this it would be greatly appreciated, I’ve tried all the troubleshooting I can think of. Whenever I try messing with the file path in the “Other Attachments” field the workflow fails to find the file since it is within a subset of folders.

My app ID is Timekeeping-1049060 and my account ID is 1049060

The expression I’m using in the other attachments field is:

#This is the file path
concatenate(“Payroll Files”,"/",[jobsite].[label],"/",if(len(text(month([Week Ending]-6)))<2,“0”&month([Week Ending]-6),month([Week Ending]-6)) &"-"& if(len(text(day([Week Ending]-6)))<2,“0”&day([Week Ending]-6),day([Week Ending]-6)) &"-"& if(len(text(year([Week Ending]-6)))<2,“0”&year([Week Ending]-6),year([Week Ending]-6)),"/")
&
#This is the file name
year([Week Ending])&"-"&switch(month([Week Ending]), 1,Jan, 2,Feb, 3,Mar, 4,Apr, 5,May, 6,Jun, 7,Jul, 8,Aug, 9,Sep, 10,Oct, 11,Nov,Dec, )&"-"& if(len(text(day([Week Ending])))<2,“0”&day([Week Ending]),day([Week Ending]))&"_"& year(now())& if(len(text(month(now())))<2,“0”&month(now()),month(now()))& if(len(text(day(now())))<2,“0”&day(now()),day(now()))&"_prhourspage.csv"

1 Like

@Phil fixed this and did a rollout that just took effect for me today. Each of my files is now saving to the correct subfolder and is also being attached perfectly to the outgoing email with the correct file name.

I have a relatively complex workflow that saves 3 files to a variable file folder path, and then attaches those files to an outgoing email. It’s working perfectly!

1 Like