Skip to main content

Google Sheets CSV Builder

What Is This Tool?​

The Travelgate Inventory CSV Builder is a Google Sheets template pre-configured by Travelgate. It helps you create, validate, and export all inventory CSV files without building them manually.

The tool covers all 8 inventory entities:

SheetCSV EntityPurpose
🏨 HotelsMasterhotelsMasterRegister hotels in the master catalog
πŸ›οΈ RoomsMasterroomsMasterDefine room type master records
🏩 HotelshotelsActivate hotels and configure booking notifications
πŸ’° RatePlansrateplansCreate and configure rate plans per hotel
πŸšͺ RoomsroomsAssign room types to rate plans
πŸ“‹ PoliciespoliciesDefine cancellation policies per rate
🧾 TaxestaxesConfigure taxes and surcharges per rate
🎁 OffersoffersSet up promotional offers per rate

Workflow Overview​

You create your personal sheet copy using the button below
↓
You fill in βš™οΈ Config (Client Code + Supplier Code)
↓
Load dynamic data from the API β†’ dropdowns auto-populated
↓
Fill data sheet by sheet (follow the recommended order)
↓
Validate all sheets β†’ fix errors highlighted in red
↓
Export CSVs β†’ rename if needed β†’ upload to SFTP βœ…

Step 1 β€” Get Your Own Copy of the Builder​

Click the button below to create your own private copy of the Travelgate Inventory CSV Builder. Google will open a dialog asking you to confirm the destination Google Drive β€” the copy then belongs entirely to you.

πŸ“„ Make my own copy

Safe for parallel use

Each copy is a fully independent Google Sheet with its own Apps Script instance. Your data, your dropdowns and your exported CSV files belong only to your Google Drive β€” multiple clients can create and use their copies in parallel without ever interfering with each other.

Your API key is never exposed

The Travelgate API key required to load dynamic data is not stored inside the sheet. The Apps Script bundled with your copy calls a Travelgate-hosted endpoint that holds the credentials server-side, so the key is never visible in any cell, formula, or script property β€” not even to you.

After the copy is created, Google will open it automatically. Continue with Step 2 to configure your codes.


Step 2 β€” Configure Client and Supplier Codes​

Open the βš™οΈ Config tab and fill in:

SettingDescriptionExample
Client CodeYour Travelgate inventory client codeAXI
Supplier CodeYour channel manager provider codeHOTP

These codes are used automatically to name your exported CSV files.

How to find your codes

Go to My Connections, click Get form data on any access:

  • The Password field β†’ your Client Code
  • The User field β†’ your Supplier Code

Step 3 β€” Initialize Sheets​

Click πŸ“¦ Inventory CSV β†’ βš™οΈ Initialize Sheets in the top menu.

This will:

  • Create (or reset) all 8 data sheets with correct column headers
  • Apply data validation dropdowns for enum fields (Active, PaymentType, Currency, etc.)
  • Add column tooltips β€” hover over any header cell to read the expected format
  • Clear any previous data and reset cell highlight colors
caution

Re-running Initialize Sheets will erase all data in all sheets. Only do this when starting a completely new batch.


Step 4 β€” Load Dynamic Data from the API​

Click πŸ“¦ Inventory CSV β†’ πŸ”„ Load Dynamic Data (API)

This fetches live data from Travelgate and populates the following dropdowns automatically:

FieldSheetDescription
Context codesHotelsMaster, HotelsInventory contexts available for your supplier
Hotel categoriesHotelsMasterFull hotel category catalog
Meal plansRatePlansAll available meal plan names
Room Master codesRoomsYour existing rooms master codes
note

If a dropdown is empty after loading, the API returned no results for your Client/Supplier combination. Double-check the codes in βš™οΈ Config.


Step 5 β€” Fill In Your Data​

Fill each sheet following the order below. Order matters: each entity references data from the previous ones (e.g. Rooms reference Rate Codes from RatePlans).

1. 🏨 HotelsMaster   ← Only if hotels are not yet in the master catalog
2. πŸ›οΈ RoomsMaster ← Define room types before assigning them
3. 🏩 Hotels ← Activate hotels and set notification emails
4. πŸ’° RatePlans ← Create rate plans per hotel
5. πŸšͺ Rooms ← Assign room types to rate plans
6. πŸ“‹ Policies ← Cancellation conditions per rate
7. 🧾 Taxes ← Taxes and surcharges per rate
8. 🎁 Offers ← Promotional offers per rate

Formatting Rules​

Field typeExpected formatNotes
Datesdd/MM/yyyye.g. 14/04/2026. Date-type cells convert automatically.
BooleanTrue or FalseDropdowns enforce valid values. The export converts them to 1/0 automatically (the format expected by setup_loading).
Multi-valuePipe-separated |e.g. MerchantPay|LaterPay or ES|FR|DE
Markets IncludedISO-2 codes or emptyEmpty = all markets. ALL is accepted and exported as empty.
Markets ExcludedISO-2 codes or emptyEmpty = none excluded. N/A is accepted and exported as empty.
Decimal numbers. or ,18.5 and 18,5 are both valid
Use column tooltips

Hover over any header cell to read a tooltip describing the expected format. This is the quickest way to check requirements without leaving the sheet.

For complete field-by-field specifications, see the individual entity pages:


Step 6 β€” Validate Your Data​

Click πŸ“¦ Inventory CSV β†’ βœ… Validate All Sheets

The validator checks every row across all 8 sheets and:

  • Highlights invalid cells in red (hard errors)
  • Highlights suspicious code values in orange (e.g. ##########, {HotelCode}, ---- β€” values that are technically non-empty but almost certainly corrupted)
  • Shows a copyable modal dialog listing all errors and suspicious findings, so you can paste the full list into Gemini or another assistant for help
  • Displays "βœ… All sheets valid!" when everything passes

Fix all red and orange cells before exporting. Both errors and suspicious values block the export. Common errors and their solutions:

Error messageCauseFix
Id is required / Id must be numericHotels sheet: the Id column must contain the numeric Travelgate hotel IDCopy the numeric Id from your HotelsMaster
Invalid email formatA malformed email addressUse a valid email; multiple addresses must be pipe-separated
Markets Included must be ISO-2A value like SPAIN was enteredUse 2-letter codes (ES, FR) or leave the cell empty
Uses format: 2-0-0|2-0-1Room occupancy format is wrongUse adults-children-infants e.g. 2-0-0|2-1-0
Booking From: use dd/MM/yyyyDate format is incorrectType as dd/MM/yyyy or use a Google Sheets date cell
Currency is requiredCurrency column is emptySelect a value from the dropdown
⚠️ SOSPECHOSO (Suspicious) β€” Code looks invalidA code cell contains a corrupted or placeholder value (e.g. ##########, {HotelCode}, ----)Replace it with the actual code. These cells are highlighted in orange.
note

Validation runs automatically again at export time. If errors or suspicious values exist, the export is blocked until all red and orange cells are fixed.


Step 7 β€” Export CSV Files​

Once validation passes, export via the menu:

  • πŸ“¦ Inventory CSV β†’ πŸ“₯ Export CSV β†’ [Sheet name] β€” exports one entity
  • πŸ“¦ Inventory CSV β†’ πŸ“₯ Export CSV β†’ πŸ“¦ Export All β€” exports all 8 entities at once (silent/batch mode β€” no per-file pop-ups, one final summary dialog)

Each export:

  1. Re-validates the sheet (export blocked if errors or suspicious values remain)
  2. Generates files using semicolon (;) delimiter and UTF-8 encoding
  3. Converts boolean values from True/False to 1/0 automatically
  4. Auto-splits per-hotel entities (rateplans, rooms, policies, taxes, offers) into one file per hotel, using the context from the Hotels / HotelsMaster sheet
  5. Names files automatically following the correct naming convention:
    • Masters: {ClientCode}-{SupplierCode}-hotelsMaster.csv
    • Hotels setup: {ClientCode}-{SupplierCode}-hotels.csv
    • Per-hotel entities: {ClientCode}-{SupplierCode}-{HotelCode}#{ContextCode}-{entity}.csv
  6. Saves files to your Google Drive root and downloads them to your local machine via a browser dialog
No manual renaming needed

Since version 3.4 of the script, the tool automatically splits setup entities by hotel code and includes the #ContextCode suffix in the filename. The context is read from the Context column of the Hotels or HotelsMaster sheet. You no longer need to rename files manually before uploading to the SFTP.

Missing context blocks the export

If a hotel referenced in a setup entity (e.g. RatePlans) does not have a Context defined in the Hotels or HotelsMaster sheet, the export will fail and list the affected hotel codes. Fill in the Context column for those hotels before exporting.


Step 8 β€” Upload to SFTP​

Upload the exported CSV files to:

sftp://sftp.travelgate.com:22

Place the files inside the Inventory folder. The system checks for new files approximately every hour. After a file is picked up, it is renamed with a status suffix:

SuffixMeaning
-QueuedFile has been detected and is waiting to be processed
-ProcessingFile is currently being processed
-ProcessedFile was loaded successfully βœ…
-ErrorProcessing failed β€” check file name and field values

Monitor these suffixes on the SFTP to track your uploads.
For full SFTP setup instructions, see Uploading Files to SFTP.


Working with Multiple Hotels or Clients​

Multiple hotels, same client and supplier​

All sheets support multiple rows. Fill RatePlans, Rooms, Policies, Taxes, and Offers for all hotels in one session. The Hotel Code column in each setup sheet groups the rows β€” on export, the tool automatically splits the data into one file per hotel, each named with the correct HotelCode#ContextCode suffix. No manual renaming is needed.

Different clients or suppliers​

Create a separate sheet copy per client/supplier combination using the same Make my own copy button. Update βš™οΈ Config in each copy. Exported file names will reflect the correct codes automatically.

Team collaboration on the same sheet​

  • Coordinate who edits each sheet (e.g. person A fills RatePlans, person B fills Policies)
  • Use File β†’ Version history β†’ See version history in Google Sheets to review and revert changes
  • Avoid simultaneous editing of the same sheet to prevent data conflicts

Troubleshooting​

SymptomSolution
Menu πŸ“¦ Inventory CSV not visibleReload the page (F5). The menu loads via an onOpen script trigger.
Dropdowns empty after InitializeRun πŸ”„ Load Dynamic Data (API)
Load Dynamic Data failsVerify Client Code and Supplier Code in βš™οΈ Config. Contact Travelgate support if the issue persists.
Export is blocked (red cells)Fix all red-highlighted cells (validation errors), then retry
Export is blocked (orange cells)Orange cells indicate suspicious/corrupted code values (e.g. ##########, {HotelCode}). Replace them with the actual codes.
Export fails with "Missing context"The Context column is empty for one or more hotels referenced in setup entities. Fill in the Context in the Hotels or HotelsMaster sheet.
# in filename saved as %23No action needed β€” the system decodes %23 β†’ # automatically during processing. If your SFTP client or OS still causes issues, upload the file from Google Drive instead (or rename %23 back to #).
File stuck as -Processing after 2+ hoursContact Travelgate support with the file name and upload timestamp
ALL / N/A in Markets fieldsValid inputs β€” converted to empty on export (= all markets / no exclusions)