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

Announcements

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard