Unable to update Variable String (Email Body as value) in Service now Update task activity --> Facing error as ({"error\":{"message":"Exception while reading request","detail":"The payload is not valid JSON."},"status":"failure"})

Hi Team,

  1. I am trying to update work notes using Update task in Service Now API like below but it is not working

Error from the server is below

{"error":{“message”:“Exception while reading request”,“detail”:“The payload is not valid JSON.”},“status”:“failure”}

Can someone please help ?

@Mandava_Naresh

looks like the email body has some special characters which might be causing the issue

Try this

System.Text.Json.JsonSerializer.Serialize(strEmailBodyCopy).Trim(""""c)

cheers

Thank you very much @Anil_G

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.