Description field throws error while creating a ticket through the V2 API
Hello everyone, I'm stuck with an issue. I made a script that will export emails from an Outlook folder then for each conversation it will create a ticket. I'm using Powershell and the following code : # Outlook Variables $outlook = new-object -com outlook.application; $ns = $outlook.GetNameSpace("MAPI"); $inbox = $ns.GetDefaultFolder(6) # Get the emails that are in the folder named "folder_name" $targetfolder = $inbox.Folders | where-object { $_.name -eq "folder_name" } $items_list = $targetfolder.items | Select-Object ConversationID, sentOn, SenderName, To, TaskSubject, htmlbody, Attachments | sort-object -Property ConversationID, @{Expression = { $_.sentOn }; Ascending = $false } | select -First 1 foreach($item in $items_list){ $item.Body } # Fresh's Part [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 $APIKey = 'API_KEY' $EncodedCredentials = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $APIKey, $null))) $HTTP