Hi Vanessa,
I gave it a try to download the file from sharepoint document library, this is the closest i can get.
------------------ // powershell command starts here
#Config Variables
$SiteURL = "http://sharepoint2016/formex/"
$FileServerRelativeURL = "http://sharepoint2016/formex/HNDocs/"
$DestinationFolder ="C:\Test"
Try {
#Check if the Destination Folder exists. If not, create the folder for targetfile
If(!(Test-Path -Path $DestinationFolder))
{
New-Item -ItemType Directory -Path $DestinationFolder | Out-Null
Write-host -f Yellow "Created a New Folder '$DestinationFolder'"
}
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL
#Check if File exists
$File = Get-PnPFile -Url $FileServerRelativeURL -ErrorAction SilentlyContinue
If($File -ne $Null)
{
#Download file from sharepoint online
Get-PnPFile -Url $FileServerRelativeURL -Path $DestinationFolder -Filename $File.Name -AsFile -Force
Write-host "File Downloaded Successfully!" -f Green
}
Else
{
Write-host "Could not Find File at "$FileServerRelativeURL -f Red
}
}
Catch {
write-host "Error: $($_.Exception.Message)" -foregroundcolor Red
}
----------------
The PowerShell command above prompts for credential window to log on to SharePoint site and then download the file.
I couldn't find a away to pass creds while executing the PowerShell from the plugin. just posting it here just incase anybody knows a way to logon to pass creds.
--------------------
Regards
------------------------------
Hammad Naeem
Precisely Software Inc.
------------------------------
Original Message:
Sent: 03-14-2024 08:43
From: Vanessa Kutasi
Subject: Microsoft Power Automate & Foundation
Thank you Hammad! Unfortunately, we are not using Evolve so I am unable to view the solution. I am trying the powershell command/add attachments plugin but so far have been unsuccessful.
------------------------------
Vanessa Kutasi
Foundation Admin./Application Analyst II
Idexx Operations, Inc.
USA
Original Message:
Sent: 03-13-2024 15:05
From: Hammad Naeem
Subject: Microsoft Power Automate & Foundation
Hi Vanessa,
To download the file from the sharepoint list into a folder using workflow, you can make make use of "Execute Powershell" plugin.
https://winshuttle-help.s3.amazonaws.com/foundation/en/composer/composer-plugins-execute-powershell.htm
The powershell command file is attached below. provide the URL and and destination path, this will download the file, then use "add attachment plugin" to retrieve this file on to the form.
I have a solution created on Evolve that is currently working for customer, attached the solution as well for reference.
use link https://nowtransfer.de/eb06cdaaf0d1 to download.
Hope this helps.
Regards
------------------------------
Hammad Naeem
Precisely Software Inc.
Original Message:
Sent: 03-13-2024 10:41
From: Vanessa Kutasi
Subject: Microsoft Power Automate & Foundation
Hi Tuomas,
We use Studio to execute the query, scheduled via the server. I am aware we can schedule the query locally, and email that way. However, this isn't ideal as the users computer needs to be on and connected to our network. I appreciate the thought.
------------------------------
Vanessa Kutasi
Foundation Admin./Application Analyst II
Idexx Operations, Inc.
USA
Original Message:
Sent: 03-13-2024 07:47
From: Tuomas Silvennoinen
Subject: Microsoft Power Automate & Foundation
I'm sure you have explored what you can do in STUDIO?
https://help.precisely.com/r/Automate-Studio/20.3/en-US/Automate-Studio-with-Connect-User-Guide/Query/Run-Scripts/Schedule-a-Query-run
I know it might limitation to do autimation on your own workstation, but we have helped our customers to run these on virtual workstations, with some codíng utilizing command line runs. If you explore this more, make sure you stay compliant with Licencing recarding human and bot users.
------------------------------
Tuomas Silvennoinen
Account Manager
Adsotech Scandinavia Oy
Espoo
Original Message:
Sent: 03-12-2024 13:38
From: Vanessa Kutasi
Subject: Microsoft Power Automate & Foundation
Hi All
I am looking to use Power Automate to pull files from a user folder within the Query Data Files folder in Foundation, then email them to specific people. I have had success pulling a single specifically named file and emailing it. However, Power Automate can't seem to grab a file when added to the folder. Has anyone had any success with this?
- I am a Foundation application admin so I have ALL of the permissions. IT has also given me gateway access.
- If using Power Automate is not an option, is Winshuttle Foundation workflow an option? I started poking around workflow, however I don't seem to be finding what I need.
- I also don't have the ability to have the folder itself automatically share the files. The option is turned off and I'm not sure if this is a missing SharePoint function, or if it's just something that needs to be turned on within our servers.
Any guidance, suggestions are greatly appreciated.
------------------------------
Vanessa Kutasi
Foundation Admin./Application Analyst II
Idexx Operations, Inc.
USA
------------------------------