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" } } }