Hi @Sandhya V,

 

I created an action that passed inputs of the Attachment Sys id (attachment that will be saved) and Target Folder Path (where the file is being saved)

 

1st: set inputs on action

 

Dazler_0-1722261105392.png

2nd: Set a script step to convert the csv to a GlideBase64 encoding

 

Dazler_1-1722261327327.png

 

3rd:  Set up a PowerShell that will take the encoded string and save it to the target folder path.

 

Dazler_2-1722261607430.png

PowerShell script:

 

function Convert-StringToBinary {
	[CmdletBinding()]
	param (
		[string] $EncodedString,
		[string] $FilePath = ('{0}\{1}' -f $env:TEMP, [System.Guid]::NewGuid().ToString())
	)

	try {
		if ($EncodedString.Length -ge 1) {
		     # decodes the base64 string
		    $ByteArray = [System.Convert]::FromBase64String($EncodedString);
		    [System.IO.File]::WriteAllBytes($FilePath, $ByteArray);
		}
	}
	catch {
	}
}

Convert-StringToBinary -EncodedString $Base64String -FilePath $TargetFileName

sleep 5

try{
 Get-Item -Path $TargetFileName -ErrorAction Stop
 Write-Output "File has been saved."
}
catch{
 Write-Output "File was not saved | $($error[0].exception.message)"
}

 

Hopefully this will help.