I am trying to access the content from the contentnote object. I queried ContentDocumentLink where i passed account id as LinkedEntityId and got the ContentDocumentId. Using ContentDocumentId, I queried the ContentNote. I am able to get the title, created date, created by, textpreview, and content.
For, content I am getting an url like this:
/services/data/v42.0/sobjects/ContentNote/0693s00000JBRj6AAH/Content
If I use the same ContentNote soql query in workbench or talend using salesforce object, I am able to get the coded notes message. But this is not same when I use simple-salesforce to query ContentNote.
I then use the simple_Salesforce object to get the note's content like this -
sf.ContentNote.get("0693s00000JBRj6AAH/Content")
this gives:
raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I tried json.loads or json.dumps but no way I am able to remove the JSONDecodeError error.
Is there any other way to solve the problem? Am I retrieving the notes from ContentNote
correctly??