CMS Development

AlexGG
参加者

How to convert rich text into HTML for CSV upload?

Hi everyone, I have a bit of an issue,

 

We're trying to batch import spreadsheets to HubDB, mainly from Google sheets.

 

However, downloading CSV files from Google Sheets, special characters such as ø and ß are converted into nonsensical text. We also lose the ability to format our 'description' text with bold text, italics, lists, and even new lines.

 

My solution to this problem was to manually convert text into HTML using online converters, meaning we have inline HTML tags in cells.

 

However, I realise if I insert rich text formatting directly into HubDB UI and then download as CSV, it features inline HTML tags - but there doesn't seem to be a way to utilise HubSpot's conversion as I can ONLY upload CSV I build myself?

 

Is there a way to convert rich text into HTML/CSV using HubSpot without having to insert it directly into the table?

0 いいね!
2件の返信
lscanlan
元HubSpot社員
元HubSpot社員

How to convert rich text into HTML for CSV upload?

Hi @AlexGG,

 

Is your goal to import the HTML cells (that you pulled from Google) into HubDB? I've been testing that just now and it seems to work fine. Or at least the simple HTML that I was using. I'd imagine though that any rich text formatting should pull through fine, so long as you're using a rich text field on the HubSpot side.

 

As for converting rich text into HTML, I think the issue is that when you're creating the rich text in the HubDB UI, you're actually creating the HTML that gets outputted through the CSV or through the API: https://developers.hubspot.com/docs/methods/hubdb/v2/get_table.

 

I'm not sure if this is really what you're looking for, but what about creating your rich text in a rich text module in the page editor? The rich text module has a source code button, where you can view and edit the HTML that makes up the rich text. Then you could pull that HTML and add it to your CSV for importing.

 

I'm not entirely sure if I'm getting at what you're asking though, so feel free to clarify if I'm off target here.

 

Thanks,
Leland

Leland Scanlan

HubSpot Developer Support
0 いいね!
AlexGG
参加者

How to convert rich text into HTML for CSV upload?

Hi thanks for responding, I think you've hit the nail on the in regards to what I'm talking about.

 

My issue is, if I'm looking at a HubDB with 200+ rows of details (used in this case for an event's agenda with sessions, session description, speaker names...etc) - AND I'm trying to let non-technical people update these sheets (we have 30+ sheets), I was hoping there'd be a way to remove the step of converting text into HTML code before insertion into the table - or at least batch converting it?

 

Average description would be as follows:

<p>Blah &int; blah <strong>blah&reg;</strong></p>

<ul><li>Blah 1&int;</li><li>Blah 2</li><li><a href="#">&int; Blah 3 Link</a></li></ul>

 

I've included random HTML text codes to show how frequently these pop up. It just adds a layer of difficulty. But it sounds like there's not a pre-existing process? I'm just super confused how people can use HubDB for dynamic pages/rich text without directly editing into the HubDB module and using batch upload instead (must be standard practice??)

 

Al

0 いいね!