Last reviewed: August 7, 2025

Content Publisher for Drupal: How to Get Started


Before you begin

Content Publisher is a content integration service that allows you to publish content created in Google Docs to your Drupal website (we plan to support other authoring tools than Google Docs in the future). The service acts as a middle layer between Google Docs and your website, where content can be enriched, organized and structured. Think of it as a headless-CMS with Google Docs as an editorial interface!

Our goal on this page is to help you get to the point where you can effectively publish content on a website. For that, you’ll need:

  • You and/or your content creators to install our Google Docs add-on
  • A content collection initialized in Content Publisher
  • A Drupal (10+) website configured for Content Publisher where the content in your collection will be published

Let’s get this running!

Prerequisites

  • A Google Workspace Account.
  • A Drupal 10+ site on Pantheon: If you don’t have one, create a free site on Pantheon following these instructions.
  • Pantheon Search enabled at the site level, and the version configured in the pantheon.yml file. Follow these instructions.
  • PCC CLI: To use Content Publisher, you must create at least one Collection, a virtual location where Google Docs will be managed and made accessible for publishing. This currently requires the Pantheon Content Publisher’s command line tool installation. Directions to install the CLI are here.


Note: The Content Publisher Drupal module can also be used without Pantheon and Pantheon Search. The Search API module should be sufficient. The rest of this guide assumes you use Pantheon and Pantheon Search.

Installation

Initial Drupal Setup

Once you have cloned the site’s code to your local environment, add the Drupal Content Publisher and the Search API Pantheon module using Composer:

composer require drupal/pantheon_content_publisher:"^1.0"

composer require drupal/search_api_pantheon:^8

Add the composer.json and composer.lock files to Git and commit the files. Push the changes to your Pantheon repository. This will trigger a build on Pantheon.

Once the build is complete, navigate to /admin/modules or use Drush to enable both the Content Publisher module and the Search API Pantheon module or use the Terminus CLI.

Content Publisher Setup

Create your Content Collection in Content Publisher CLI

Go to your terminal and create your collection with the CLI. For the site url, use the one of your Drupal install above. It can always be edited later if ever you would like to move your content collection from Dev to Test or Prod environment.

pcc site create --url <site-url>

✔ Successfully created the site with given details.

Id: xXXXXXXXXXXX

Save your collection identifier (Site ID).

Setup a webhook on your site’s main url followed by the path /api/pantheoncloud/webhook. This webhook is used to notify Drupal for any update on a published document.

pcc site configure <site-id> --webhook-url <site-url/api/pantheoncloud/webhook>

✔ Successfully updated the site.

Create an access token in Content Publisher Admin Panel

Navigate to the Tokens section of the Content Publisher dashboard. Generate an Access Token to ensure the collection is securely connected to the site

Note: you can create a token restricted to this very collection, or a token that would grant access to all your collections, both work). Store this token safely, as you will not be able to view it once you navigate from this page. If you lose it, generate another one.

Update the Site with the collection Information

Navigate to /admin/structure and select Pantheon Content Publisher collection. Click the button to add the collection and token information you previously created. Token will be created in the Key module.

1st step: create the token:

  • Access token name: name your token.
  • Description: optional.
  • Provider settings: your choice, we recommend Configuration for development environments, File, integrating it with your secret management system for production.
  • Value: the value of your access token previously created.

2nd step: declare your collection:

  • Label: name of your choice.
  • Collection Identifier: paste here the collection id previously created in Content Publisher.
  • Token: select the token created at the 1st step.
  • Content Publisher URL: leave unchanged.

Once you save, your integration is ready for use with the default configuration.

Publishing a Google Doc

In Chrome, install the Google Add-on, as described here. This will allow you to take any open Google doc, connect it to a collection, and push it to your Drupal site. It also contains many useful content management and curation tools.

You should be able to open a Google Doc, and the Pantheon icon will appear on the right-hand side of the browser.

Clicking that walks you through adding the document to your Collection.

Connect the document to your collection created above. Make any final changes, then preview and publish your document.

Content Publisher will walk you through the publishing steps and dynamically generate a link to view your published document.

Once a document has been published with Content Publisher, it can also be accessed in admin/content/pantheon-content-publisher. By design, this access is read-only then.