Publish to your Drupal site
Connect a Drupal site and CiteAgentic creates each approved piece as a node in the content type you choose, with the body written as HTML in your chosen text format. Core modules only, no contributed code.
Connecting Drupal takes about ten minutes, and most of that is two configuration steps on the Drupal side that are easy to miss. Get those right and the connection itself needs four values: your site URL, the content type machine name, and a username and password.
What is the Drupal integration?
The Drupal integration creates each approved CiteAgentic draft as a node on your site using the core JSON:API module, authenticating over HTTP basic auth. Nothing contributed is required: both modules ship with Drupal core.
Because Drupal's body field accepts HTML plus a text format, your article is written as real HTML rather than as markdown. Headings, lists, links and emphasis all arrive intact.
By default nodes are created unpublished, so an editor reviews them in Drupal before anything appears on the site.
What are the two setup steps most sites miss?
These are the two reasons a Drupal connection fails, and both are on the Drupal side rather than in CiteAgentic.
1. JSON:API ships read-only. Out of the box, JSON:API answers GET requests
perfectly and refuses every POST. Go to Configuration → Web services →
JSON:API and select "Accept all JSON:API create, read, update, and delete
operations".
This is worth understanding because a site in read-only mode looks completely healthy from the outside. CiteAgentic probes for write mode during the connection test rather than letting you discover it on your first publish.
2. HTTP Basic Authentication is not enabled by default. The basic_auth
module is part of core but is off in a standard install. Without it, Drupal
ignores the Authorization header entirely and treats the request as anonymous,
which surfaces as a permissions error that looks like a wrong password. Enable it
at Extend → HTTP Basic Authentication.
What do you need before you start?
- Drupal 9 or later with the JSON:API and HTTP Basic Authentication modules enabled.
- JSON:API set to accept write operations, as above.
- A content type machine name, e.g.
articleorpage. - A Drupal user with permission to create content of that type.
Create a dedicated API user with a role scoped to content creation rather than reusing an administrator account. The password is stored encrypted, but a narrower account limits the blast radius either way.
Where do you find the content type machine name?
Go to Structure → Content types. The machine name is shown beneath each type's
label, and is lowercase with underscores, e.g. basic_page rather than
"Basic page". Entering the display label is a common mistake, so CiteAgentic
rejects anything that is not a machine name before it even calls your site.
How do you connect Drupal in CiteAgentic?
Open Site Settings → Integrations → Publishing channels, click + Drupal, and fill in the form.
The fields map as follows:
| Field | Required | What to enter |
|---|---|---|
| Drupal site URL | Yes | Base URL where /jsonapi is reachable |
| Content type | Yes | Machine name, e.g. article |
| Body field | No | Defaults to body |
| Text format | No | Basic HTML (default), Full HTML, or Restricted HTML |
| URL alias | No | Let Drupal decide (default), or use the CiteAgentic slug |
| On publish | No | Create unpublished (default) or published |
| Drupal username | Yes | A user who can create this content type |
| Password | Yes | Stored encrypted and never shown again |
Click Test & connect. CiteAgentic checks that JSON:API is present, that your credentials and content type work, and that the site accepts writes, naming whichever of those three is wrong.
Which text format should you choose?
Basic HTML suits most sites and is the default. It permits headings, lists, links, and emphasis while stripping anything unusual.
Full HTML preserves every tag, which matters if your articles include embeds or custom markup. Only use it if the publishing user is trusted, since Full HTML performs no filtering.
Restricted HTML is intended for anonymous comments and strips most structure. It is included for completeness but rarely the right choice for articles.
Should CiteAgentic set the URL alias?
Only if your site does not already generate one.
If you use Pathauto, leave URL alias on "Let Drupal decide". Pathauto creates an alias from its own pattern, and writing a second alias leaves two paths pointing at the same node.
If you do not use Pathauto and want readable URLs, choose "Use the CiteAgentic
slug" and the node is created at /your-article-slug.
How do you publish a draft to Drupal?
On demand: open any draft in Content Studio and choose Share ▾ → Publish to Drupal. The node is created immediately.
On a schedule: link the Drupal channel to a day in the content calendar. Once you approve that piece, it is created on its scheduled date.
CiteAgentic links back to the node's alias if one exists, and to /node/ID
otherwise.
What errors might you see, and what do they mean?
- "No JSON:API found at /jsonapi." The JSON:API module is not enabled, or your site serves it from a custom path.
- "JSON:API is in read-only mode." Write operations are disabled. Configuration → Web services → JSON:API.
- "Authentication failed." Wrong username or password, or the
basic_authmodule is not enabled. Check the module first: without it Drupal never reads the Authorization header. - "Content type … not found." The machine name is wrong.
- "Content type must be a machine name." You entered a display label such as
"Basic Page" instead of
basic_page. - "The user cannot create … content." Credentials are valid but the role lacks the create permission for that content type.
If a scheduled publish fails, the channel is flagged with the error in Site Settings and the failure is recorded against that draft, so nothing fails silently.
Frequently asked questions
Do I need any contributed modules?
Why does my connection test say read-only when the site works fine?
Are nodes published live straight away?
Does the body arrive as HTML or markdown?
Will this conflict with Pathauto?
Can I use OAuth instead of basic auth?
Ready to connect?
Enable JSON:API write operations and HTTP Basic Authentication in Drupal, then Site Settings → Integrations → Publishing channels → + Drupal.