Skip to main content
Solved

SYNC API Error - "Column names must be non-empty strings"

  • February 3, 2025
  • 1 reply
  • 2 views

Hello everyone,

I’m encountering an issue when trying to use the Sync API to upload a CSV file to Airtable. Every time I send my request, I receive the following error message:

“Column names must be non-empty strings.”

I’ve carefully checked my CSV file, and everything seems fine. The column headers are properly defined, and there are no empty values. What’s more confusing is that when I manually import the same CSV file into Airtable through the UI, it works perfectly without any errors.

I have double-checked that:

• The CSV file is correctly formatted.

• Column headers are valid and properly named.

• There are no empty column names.

• The same file works fine when imported manually via the UI.

Has anyone else faced this issue with the Sync API? Is there a specific requirement for the column headers when using this API that differs from the manual import?

Code example :

const res = await fetch(AIRTABLE_ENDPOINT, {
method: "POST",
headers: {
"Content-Type": "text/csv",
Authorization: `Bearer ${AIRTABLE_ACCESS_KEY}`,
},
body: `${csvContent}`,
});

Thanks in advance for any help!

Best answer by rbdrueds

I found the issue! The problem was caused by having too many columns in my CSV file.

For anyone facing similar issues:

- CSV generation errors are a common cause of API issues.

- Always open your CSV in a spreadsheet (Excel, Google Sheets) to verify the structure before uploading.

- Check for hidden extra columns, empty headers, and unexpected formatting issues.

View original
Did this topic help you find an answer to your question?

1 reply

  • Author
  • New Participant
  • 1 reply
  • Answer
  • February 21, 2025

I found the issue! The problem was caused by having too many columns in my CSV file.

For anyone facing similar issues:

- CSV generation errors are a common cause of API issues.

- Always open your CSV in a spreadsheet (Excel, Google Sheets) to verify the structure before uploading.

- Check for hidden extra columns, empty headers, and unexpected formatting issues.


Reply