posts
# ===== Settings ===== $clientId = "c9b5eaab-40cf-4e97-98ba-822241c2088c" $dateTime = Get-Date -Format "yyyy-MM-dd-HH-mm-ss" $CertPath = Read-Host "Please enter Certificate (.PFX) Path" $CertPassword = Read-Host "Please enter Certificate Password" -AsSecureString $Org = "bankofenglandcouk.onmicrosoft.com" $invocation = Get-Variable -Name MyInvocation -ValueOnly $directoryPath = Split-Path $invocation.MyCommand.Path # Log file path $logFile = Join-Path $directoryPath "Log-$dateTime.csv" # Create log header "Timestamp,Message,Status" | Out-File -FilePath $logFile -Encoding utf8 # ===== Logging Function ===== function Log-Message { param ( [string]$Message, [string]$Status = "Info" ) switch ($Status) { "Success" { $color = "Green" } "Info" { $color = "Blue" } "Error" { $color = "Red" } default { $color = "White" } } Write-Host -ForegroundColor $color "$Status => $Message" $logEntry = [PSCustomObject]@{ Timestamp = (Get-Date).
posts
Here’s a step-by-step guide to implement your Power Automate flow:
1.Trigger:
Add a PowerApps trigger (manual) to start the flow and accept two inputs: SearchInput (text) and Database (text_1). 2.Get Items from SharePoint:
Add a “Get items” action for SharePoint. Set the site address and list/table. Use a filter: substringof(’@{triggerBody()[’text’]}’,Title) and Database eq ‘@{triggerBody()[’text_1’]}’ and InsiderList eq ‘No’
3.Select Action:
Add a “Select” data operation. From: @outputs(‘Get_items’)?[‘body/value’] Map fields: ID, Title, Team, Channel, Folder Status, Database, Path.