APIs & Integrations

crtag
Participant

Import CSV with newline character

SOLVE

I'm migrating a significant amount of data to Hubspot and stumbled upon seemingly trivial issue - deals description contain newlines characters and this is quite normal in CSV format, and acceptable across other systems. But, importing it into Hubspot yields an error about malformed CSV. Of course, I can replace it with some special character and then do API update for all the records replacing it back, but this seems to be not right for many reasons. Did anyone solve this kind of the problem in an acceptable way, ie minimal operations with CSV or resulting records? 

 

I've tried to replace newline characters with literal \n hoping it would result in newlines after import, but to no avail. The import went fine and produced deal description with no newlines but all \n being in place.

 

UPDATE: Newline characters are fine, the issue is about tab characters, see explanation below.

0 Upvotes
1 Accepted solution
crtag
Solution
Participant

Import CSV with newline character

SOLVE

False alarm. After having a good sleep found the issue being tab characters breaking the import. Regardless, a tab character is still a valid one if fields are properly wrapped, so I suggest Hubspot CSV parser is a bit crippled.

View solution in original post

3 Replies 3
quentin_lamamy
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

Import CSV with newline character

SOLVE

@crtagGlad to hear that your issue is solved. If you think this behavior with tab shouldn't not exist feel free to post in the idea section of the board , detail the current behaviour and the expecting behaviour with a code example.

 

Don' tforget to mark this topic as solved, have a nice day


quentin_lamamy
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

Import CSV with newline character

SOLVE

Hi @crtag ,

Can you send me your code and an anonymised example of your csv ?


0 Upvotes
crtag
Solution
Participant

Import CSV with newline character

SOLVE

False alarm. After having a good sleep found the issue being tab characters breaking the import. Regardless, a tab character is still a valid one if fields are properly wrapped, so I suggest Hubspot CSV parser is a bit crippled.