web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SFTP file from email a...
Power Automate
Answered

SFTP file from email attachment

(0) ShareShare
ReportReport
Posted on by 2

I am trying to create a workflow that copies an email attachment (CSV) to a remote server using SFTP. It appears to work, but when I download the file it appears as a random assortment of characters. I have a separate workflow that did the exact same thing that was working, but now appears to be doing the same thing. Here is the workflow:

 

adraper_0-1702305214850.png

 

adraper_1-1702305248353.png

I have tried "Get all file metadata" set to both Yes and No, with the same results.

 

It is a very simple workflow. The file content I am sending over looks like this:

adraper_2-1702305297748.png

 

However when it gets to the server it looks like this:

adraper_3-1702305335716.png

 

I am assuming that it converts the content to bytes but does not convert it back to text. I am confused that the other workflow was not modified but when I did a test run it yielded the exact same results. I am concerned that both are not working properly. Is there anything I am missing? 

Categories:
I have the same question (0)
  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    You need to use the expression base64ToBinary on the attachment content:

     

    Base64toBinary 

  • adraper Profile Picture
    2 on at

    That worked great, thanks!

  • ericmabkv Profile Picture
    12 on at

    Hello,

     

    I am having this same issue and would appreciate if you could provide a bit more detail as to how to use the expression base64ToBinary.  I am new to Power Automate and cannot figure out how to use the base64ToBinary expression.  Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard