Hi,
Thanks for your comment I did like you said but that didn't helped and I think I might did something wrong with condition step. I added as second step


as you can see. But that didn't helped I got the same error on run script part but this time I also another one on condition part but when I try to send file that wasn't excel it worked

but when I try to send file that wasn't excel it worked

when it comes to hard coding the path it worked but that solution won't be possible because the name of the file in email will be different every time when it will be sent and that's why I have to use dynamic reference so that the run script step looks for a file by the name of the email attachment