Prepare Your Spreadsheet
For SheetBridge to serve your spreadsheet as an API, it needs to be in a particular format. With a few tweaks to your spreadsheet you can make it compatible with SheetBridge.
Make the first row of your spreadsheet the header
The first row of your sheet will be used as the header. This is the most important part of preparing your sheet, as the names you use here will be used as the property names in the returned objects. Each column in your sheet represents that property's value.
For example, if your spreadsheet looked like this:
...then SheetBridge will return this:
[
{
"sheetbridge_id": "01KD33YEFAW594DZXZ2PETGPYR",
"title": "To Kill a Mockingbird",
"synopsis": "A young girl in the Deep South witnesses racial injustice and moral growth.",
"author": "Harper Lee"
},
{
"sheetbridge_id": "01KD33YEFAW594DZXZ2PETGPYS",
"title": "1984",
"synopsis": "A dystopian world ruled by surveillance and totalitarian control.",
"author": "George Orwell"
},
{
"sheetbridge_id": "01KD33YEFAW594DZXZ2PETGPYT",
"title": "The Great Gatsby",
"synopsis": "A mysterious millionaire's pursuit of the American Dream ends in tragedy.",
"author": "F. Scott Fitzgerald"
},
...
]
SheetBridge normalizes your header names by converting them to lowercase and normalizing whitespace to make them more JSON-friendly. For example, "Title" becomes title and "Author" becomes author.
Data Format
SheetBridge normalizes your data values for consistent API responses:
- All values are returned as strings
- Empty cells are returned as empty strings
- Whitespace is normalized (multiple spaces become single spaces)
- Special characters are handled automatically
This normalization ensures your data is consistently formatted and ready for API consumption.
SheetBridge ID Column
SheetBridge automatically creates a sheetbridge_id column in each sheet for stable row identification. This ensures:
- Rows can be reliably updated and deleted using the
sheetbridge_id value
- Row IDs remain stable even if sheet structure changes
- Each row has a unique identifier that persists across API operations
Important: The 1sheetbridge_id column is system-managed and should not be manually edited or removed. Modifying this column can break your API and cause data inconsistencies.
The sheetbridge_id appears in all API responses and is used as the recordId parameter for update and delete operations.
Best Practices
- Use clear header names - Descriptive column names make your API more intuitive
- Keep headers in the first row - Don't skip rows or add headers elsewhere
- Avoid special characters - While supported, simple names work best
- One header per column - Don't merge header cells
Related Topics