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 Apps / Retrieving csv file da...
Power Apps
Unanswered

Retrieving csv file data from sftp site

(1) ShareShare
ReportReport
Posted on by 130
We use this Powershell script to retrieve a csv file which it then reads and uploads to a SharePoint list row by row.
 
 
 
$sftpPath = "xxx"
$sftp = New-SFTPSession -ComputerName $sftpPath -Credential $Credential  -Verbose -AcceptKey -Force
Get-SFTPChildItem -SessionId $sftp.SessionId -Path $remoteOutBoundPath -Recursive | ForEach-Object {
    Write-Output $_.FullName
    Get-SFTPItem -SessionId $sftp.SessionId -Path $_.FullName -Destination $destPath -Force -Verbose

}
Remove-SFTPSession -SessionId $sftp.SessionId
 
Is it possible to do this from within a Powerapp or Power Automate Flow or Azure Logic app?
When I use SFTP-SSH connector in Power Automate or Azure Logic apps, it asks for this information.  The information below is not required for the Powershell module;  I'm not sure where I would get this from.
 
 
After I click the OK button to create the connection in my logic app, I see the following error message.

Failed to create connection: { "error": { "code": 502, "source": "logic-apis-northeurope.azure-apim.net", "clientRequestId": "vvv", "message": "BadGateway", "innerError": { "status": 502, "message": "No such host is known\r\nclientRequestId: lll", "error": { "message": "No such host is known" }, "source": "sftpwithssh-ne.azconn-ne-002.p.azurewebsites.net" } } }
Categories:
I have the same question (0)
  • stampcoin Profile Picture
    5,158 Super User 2026 Season 1 on at
    I think the private key can be ignored, but check with your Org's IT regarding the data security policy,
    Did you type the correct hostname ?
    It should be like sftp.contoso.com, not an internal name.
    Double check your sftp is reachable publicly. If not, it will a little more complicated.
  • AH-02011058-0 Profile Picture
    130 on at
    I tried this and using the IP address by pinging the server.  Still got a bad Gateway message.
    Besides hostname, username and password, are there any other mandatory fields eg port?
    What exactly should I ask the security team?
    In the Powershell script it says Host key is not being verified since Force switch is used.
  • lbendlin Profile Picture
    8,705 Super User 2026 Season 1 on at
    Note that there is an active service advisory for that connector
     
     
    EDIT - was just resolved.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 899

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 499

Last 30 days Overall leaderboard