Import content from a CSV file into GitBook
Learn how to add data from Zendesk — or any other CSV file — into GitBook
This guide explains how to import HTML content stored in a CSV file into GitBook.
This process is useful for migrating content from various sources, such as help centers like Zendesk, documentation databases, or any application that exports HTML data to CSV.
Scroll to the bottom of this page to see a video version of this guide.
Connect GitBook to your Git repository
You can follow our import/migration guide to add your content from a GitHub or GitLab repository into to a new GitBook space. Read more about Git Sync in our documentation
Preparing your CSV file
Before you import your CSV content, you should first make sure it’s in the right format for import:
Open your CSV file in a spreadsheet editor (e.g., Google Sheets, Microsoft Excel).
Ensure your CSV file has the following essential columns:
Section: This column will determine the organization of your content in GitBook. It represents the section or category the HTML content belongs to. If your data does not contain sections, you can create a single section name for all rows.
Article Title: The title of each page.
Article Body: The HTML content itself.
Zendesk example: If you’re migrating from Zendesk, you’ll typically export a CSV that includes columns like “Section”, “Article Title”, and “Article Body” (which contains the HTML).
Converting CSV to Markdown
To import your CSV data into GitBook, you first need to convert it into Markdown so GitBook can interpret it correctly. Here’s how:
Upload your prepared CSV file.
Review the preview to ensure the data is displayed correctly.
Click the Convert to Markdown and Download button.
Download the resulting ZIP file. This file will contain Markdown files for each article and a
SUMMARY.md
file.
Adding files to your Git repository
Unzip the downloaded ZIP file.
If your upload is small (less than 100 pages) you can drag and drop the extracted Markdown files into your repository. Alternatively you can use the command line to push from your machine to GitHub and GitLab. If you are not familiar with the command line, GitHub’s desktop app is also a user friendly way to add large folders to your repository.
Commit and push the changes.
The CSV-to-Markdown converter creates a SUMMARY.md
file that GitBook uses for navigation. Ensure this file is added to your repository. If you encounter issues with page display, review the SUMMARY.md
to confirm the correct page order and inclusion. For reference, this is how a GitBook SUMMARY.md
file looks.
Last updated
Was this helpful?