CSV File coming in as string

When getting a CSV file from a API it comes in as a long string which make and none of the convert to’s are wroking for this

No error - The file contents is just seen as a long string

Please share your workflow

Share the output returned by the last node

[
{
“data”: “iPolicyID,iProductID\r\n57109,17108\r\n57161,17108\r\n57288,17143\r\n57362,17161\r\n57370,17161\r\n57379,16667\r\n57405,17161\r\n57468,17169\r\n57480,16636\r\n57482,16636\r\n57580,17143\r\n57634,16636\r\n57644,17159\r\n57876,16070\r\n58070,16322\r\n59287,16450\r\n59301,16459\r\n”
}
]
–What i’m expecting here is that this would be as expected, a csv file with the first linne having the “header”/“column names” and the rest are all rows

Information on your n8n setup

  • n8n version: Version 1.68.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker
  • Operating system: Windows 11
  • The intention is to move this workflow into a cloud one for a client of ours

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Harry_Gentech,

You can try converting to text file with a file name specified as a csv which might solve your issue:

HIya Aya!

Thanks for the suggestion, doing that unfortunately returns the attached

and just to add, the output of the HTTP request is as below

See below what the “Conver to File” node does as well
image

never mind… found my issue
Had to in the http request add a response file type :slight_smile: all sorted

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.