Engagements have HTML tags in their response (e.g. Note body). Is there some parameter or maybe alternative endpoint where we would be able retrieve them without tags? It is just that parsing them on our side would spend considerable amount of resources.
For each engagement type, you need to access the 'metadata' object that is part of each result. I'll describe how you can access the plain text for each engagement type:
Email: The plain text variant is available in the metadata.text object:
The plain text version is available in the metadata.body object:
"metadata": {
"body": ""
}
Calls: This result does not have a plain text version available in the metadata object. However, if the bodyPreviewIsTruncated value is false, you could use the bodyPreview:
I could be mistaken here, but it is possible to retrieve the plain text version for each engagement type except calls and tasks. If the bodyPreviewIsTruncated you can use the bodyPreview but if that one is set to true, you would still need some 'striptags' functionality in your code.
Learn more about HubSpot by following me on LinkedIn or YouTube
✅ Did my answer solve your issue? Help the community by marking it as the solution.
For each engagement type, you need to access the 'metadata' object that is part of each result. I'll describe how you can access the plain text for each engagement type:
Email: The plain text variant is available in the metadata.text object:
The plain text version is available in the metadata.body object:
"metadata": {
"body": ""
}
Calls: This result does not have a plain text version available in the metadata object. However, if the bodyPreviewIsTruncated value is false, you could use the bodyPreview:
I could be mistaken here, but it is possible to retrieve the plain text version for each engagement type except calls and tasks. If the bodyPreviewIsTruncated you can use the bodyPreview but if that one is set to true, you would still need some 'striptags' functionality in your code.
Learn more about HubSpot by following me on LinkedIn or YouTube
✅ Did my answer solve your issue? Help the community by marking it as the solution.