Docs

Publish to BaseHub

Connect your BaseHub repository so every article becomes a row in a collection your site already reads from. No code needed.

Last updated on

Connect your BaseHub repository once and GrowWriter adds a row to a collection for every article you publish, committed and live right away. You need about ten minutes and an admin token for the repository.

What you need

  • Access to the BaseHub repository your site reads from.
  • An Admin Token for that repository, created in the next section.
  • A collection for posts, with its fields already defined.

If someone else set up BaseHub for your site, send them this section. The token is the only thing they need to hand you.

Create the token

  1. Open the repository on basehub.com.
  2. Go to the repository settings, then API Tokens.
  3. Create an Admin Token. It must have write access; a read token cannot publish.
  4. Copy it. BaseHub shows it once.

Connect in GrowWriter

Open the Channels page, find BaseHub under Websites & CMS and click Connect.

  1. Admin Token: paste the token.
  2. Click Test Connection. Connection successful means GrowWriter can read the repository and write to it.

Two optional settings sit under Advanced options:

  • Dashboard URL: the repository's address, like https://basehub.com/your-team/your-repo. With it, the View post link after publishing opens the row in BaseHub.
  • Locales: the language variant codes of your repository, comma-separated, like en, es. Leave en if you do not use variants.
Step 1 of the Connect BaseHub dialog with the Admin Token field, the Advanced options folded, and the Test Connection button.
Step 1: the admin token. The two advanced settings are optional.

Pick the collection

Step 2 lists the collections in the repository. Choose the one your site uses for posts and click Continue.

If the list says No collections to publish to, create a collection in BaseHub first, then click Back and Continue to reload.

Step 2 of the Connect BaseHub dialog with the Collection picker open.
Step 2: the collection that holds your posts.

Map the fields

Step 3 pairs each GrowWriter field with a field of the collection: title, slug, body, meta description, cover image, published date, modified date and author. GrowWriter matches what it can by name and tells you how many it found; set the rest from the dropdowns or choose Skip.

Two details worth knowing:

  • The body arrives as rich text written from Markdown, so pick a rich text field for it.
  • Map Modified date to a date field if you have one. GrowWriter bumps it on every republish while the published date stays put.

Click Save Connection. The row on the Channels page reads Connected.

Step 3 of the Connect BaseHub dialog showing GrowWriter fields paired with collection fields.
Step 3: match the fields, then save.
The BaseHub row on the Channels page with the Connected status.
Connected. BaseHub now appears as a channel in the publish dialog.

Publish your first article

Open your Library, pick a finished article and click Publish. Tick BaseHub, choose an author if your mapping has one, and click Publish. GrowWriter adds the row and commits it, so the article is live as soon as your site rebuilds or refetches.

Publishing again later updates the same row in place. The full flow, with screenshots, is on Choose where to publish.

Troubleshooting

  • The BaseHub token is invalid or lacks write access: create a new Admin Token, Disconnect and connect again.
  • The BaseHub collection could not be found: the collection was deleted or renamed. Disconnect, reconnect and pick it again.
  • BaseHub rejected the update: a mapped field does not accept the value, usually a required field left on Skip or a wrong field type. Reconnect and adjust the mapping.
  • The selected author no longer exists in the CMS: pick another author in the publish dialog.

On this page