Skip to content

Overview

The CMS talks to one Google spreadsheet. Some of its tabs are written by people and read by Umbraco; others are written by Umbraco and are safe to read but not to edit. This page is the map — the URLs, the tabs, and which way the data flows. The mechanics of each direction live in Export and Import.

One page in this section is not about the spreadsheet at all: Azure Storage sync covers the JSON copy of published content that Umbraco keeps in blob storage for search indexing. It runs on its own, as editors publish, with no endpoint to call.

NRI data spreadsheet — ID 19-hJexgJGFlwazvJZlvRspEPNZDPgHg8l3L-7QMf05M.

That is the production spreadsheet. The ID comes from the GoogleSheets:SpreadsheetId setting, with this ID compiled in as the fallback. Development points at a separate test spreadsheet in appsettings.Development.json. Changing the setting needs an application restart.

Tab Written by Touched by
Imports People Content tag import reads it
Members People Members import reads it
Umbraco: Content Umbraco Content export overwrites it
Umbraco: Media Umbraco Media export overwrites it
Umbraco: Tags Umbraco Tags export overwrites it
Umbraco: Members Umbraco Members export overwrites it
Umbraco: Search Results Umbraco Search results export overwrites it

This is the single most common wrong assumption about these endpoints. The two directions use different tabs:

  • Content export writes Umbraco: Content. The content tag import reads Imports.
  • Members export writes Umbraco: Members. Members import reads Members.

So you cannot export a tab, edit it in place, and import it back. An export is a snapshot for reference — to compare, to find what is missing, to copy values across by hand. To change Umbraco, you edit the people-owned tab and run the import.

For content, copy the rows you want to change from Umbraco: Content into Imports, edit them there, and run the import. Media, tags, and search results are export-only.

All of them live under the back-office management API:

/umbraco/management/api/v1/
Endpoint Methods What it does
exports/media POST Writes every media file to Umbraco: Media
exports/members GET, POST Writes every member to Umbraco: Members
exports/tags GET, POST Writes every tag, grouped by tag group, to Umbraco: Tags
exports/content GET, POST Writes every page whose type has tags to Umbraco: Content
exports/search-results GET, POST Writes search-term statistics to Umbraco: Search Results
imports/tags POST Reads Imports and updates page tags, publication dates, and the archived flag
imports/members GET, POST Reads Members and updates member profile fields
imports/media-references POST Repairs page-to-media relations; reads no sheet

Two things worth knowing before you go looking for a bug:

  • The sheet imports default to a dry run. ?dryRun=true is the default on imports/tags and imports/members, so a call without it reports what would change and writes nothing. imports/media-references has no dry run.
  • In Production, a daily job runs all five exports. See Export.

Every one of these is a back-office endpoint, limited to the Administrators and nriAdmin user groups and authenticated with a back-office bearer token. Without one they return 401; a signed-in user outside those groups is refused with 403.

The practical way to run them is the backoffice: a Google Sheets exports button in the header for exports, and the imports modal for imports. Scripting needs a bearer token on the request.

Google Sheets access uses a service account. Set either:

  • GoogleSheets:ServiceAccountJson — the whole downloaded service-account JSON as one value, or
  • GoogleSheets:ServiceAccountEmail and GoogleSheets:PrivateKey.

Then share the spreadsheet with the service-account email address, as an editor. Access is a Google Sheets share, not an API setting — without it every call fails at the Sheets API even though the credentials are valid.

Members import additionally geocodes addresses through the Google Maps Geocoding API, read from the first of GoogleMaps:GeocodingApiKey, GoogleMaps:ServerApiKey, GoogleMaps:ApiKey. That one is optional: with no key the import logs a warning and falls back to parsing the address text locally.

The same shape applies to every endpoint on both pages.

Code Meaning
200 Ran. Read the body — an import can succeed and still have skipped every row.
400 The source tab was empty, or is missing a required column. Import only.
401 No back-office bearer token.
403 Signed in, but not in the Administrators or nriAdmin group.
500 Service-account credentials are not configured, or a tab is missing when the export resizes it.
502 The Google Sheets API could not be reached, or refused the request.