Stripping HTML for Hubspot Integration

Hi there, relatively new to the Make platform.

I have a scenario where I get html text, that I am cleaning/parsing and pushing to Hubspot after. Often it works but due to signatures with images in the mails the text becomes too long and I get the following error: Scenario has encountered an error while being processed. Fix the error or clear the queue. The reason is: [400] Property values were not valid: [{“isValid”:false,“message”:“Property \“hs_note_body\” value is over max characters 65536. Portal 146592694, object type 0-46”,“error”:“MAX_CHARACTERS”,“name”:“hs_note_body”,“localizedErrorMessage”:"Property \“hs_note_body\” value is over max characters 65536.

Is there someone who can help me with this?

Thanks in advance!

Nikos

Welcome to the Make community!

To do this, you can use thisbuilt-in function to remove HTML:

Here’s an example of how you can use this function:

{{ stripHTML(1.html) }}
(copy-paste the above into the field, or type it exactly as shown)

You can also use this built-in function to truncate the string length to a certain number of characters:

Here’s an example of how you can use this function:

{{ substring(2.text; 0; 65536) }}
(copy-paste the above into the field, or type it exactly as shown)

These functions may have also been covered in the Make Academy tutorials — refer to the Make Academy Course Overview to learn more.

Hope this helps! Let me know if there are any further questions or issues.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

Hi Samliew, thanks for the response, this worked.

Out of interest is there an easy way to remove images/signatures as well?

No problem, glad I could help you with “Stripping HTML for Hubspot Integration

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help as newer questions are displayed higher on the forum’s “new” page.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

Hope this helps! Let me know if there are any further questions or issues.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!