---
url: 'https://metadrop.net/en/articles/a-content-manager-on-steroids-combine-drupal-with-ai-to-create-content-efficiently'
title: 'A content manager on steroids: combine Drupal with AI to create content efficiently'
author:
  - 'Manuel Bermúdez'
  - 'Olalla Rodicio'
date: '2024-11-26T10:22:19+00:00'
updated: '2026-06-10T08:42:27+00:00'
type: article
summary: 'This guide provides detailed instructions to install and configure the OpenAI module in Drupal, integrating it with CKEditor to leverage artificial intelligence capabilities during content editing.'
tags:
  - 'Drupal Planet'
  - Drupal
  - 'Artificial intelligence'
image: 'https://metadrop.net/sites/default/files/styles/full/public/2024-11/image_ckeditor_ai.jpg.webp?itok=h4VoMMqZ'
published: true
og:
  determiner: Automatic
  site_name: Metadrop
  'image:url': 'https://metadrop.net/sites/default/files/styles/full/public/2024-11/image_ckeditor_ai.jpg.webp?itok=h4VoMMqZ'
  'image:type': image/jpeg
  'image:width': '740'
  'image:height': '740'
  'image:alt': 'A content manager on steroids: combine Drupal with AI to create content efficiently'
  street_address: 'Calle Manuel Luna, 12, 3 Dcha'
  locality: Madrid
  region: Madrid
  postal_code: '28020'
  country_name: España
  email: hola@metadrop.net
  phone_number: '910053180'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      '@type': Article
      '@id': 'https://metadrop.net/en/articles/a-content-manager-on-steroids-combine-drupal-with-ai-to-create-content-efficiently#article'
      name: 'A content manager on steroids: combine Drupal with AI to create content efficiently'
      headline: 'A content manager on steroids: combine Drupal with AI to create content efficiently'
      description: 'This guide provides detailed instructions to install and configure the OpenAI module in Drupal, integrating it with CKEditor to leverage artificial intelligence capabilities during content editing.'
      about:
        - Drupal
        - 'Artificial intelligence'
      image:
        '@type': ImageObject
        url: 'https://metadrop.net/sites/default/files/styles/full/public/2024-11/image_ckeditor_ai.jpg.webp?itok=h4VoMMqZ'
        width: '740'
        height: '740'
      datePublished: '2024-12-03T10:22:19+0100'
      dateModified: '2026-06-10T10:42:27+0200'
      author:
        '@type': Person
        name:
          - 'Manuel Bermúdez'
          - 'Olalla Rodicio'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
      mainEntityOfPage: 'https://metadrop.net/en/articles/a-content-manager-on-steroids-combine-drupal-with-ai-to-create-content-efficiently'
    -
      '@type': Organization
      '@id': 'https://metadrop.net/#organization'
      url: 'https://metadrop.net/'
      name: Metadrop
      sameAs:
        - 'https://www.drupal.org/metadrop'
        - 'https://twitter.com/metadrop'
        - 'https://asociaciondrupal.es/partner/metadrop'
        - 'https://www.linkedin.com/company/metadrop'
      logo:
        '@type': ImageObject
        url: 'https://metadrop.net/themes/custom/mdrop_radix/logo-metadrop-500-500.jpg'
        width: '500'
        height: '500'
    -
      '@type': ItemPage
      '@id': 'https://metadrop.net/en/articles/a-content-manager-on-steroids-combine-drupal-with-ai-to-create-content-efficiently'
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: Home
            item: 'https://metadrop.net/en'
          -
            '@type': ListItem
            position: 2
            name: 'Expert Drupal & Tech Articles'
            item: 'https://metadrop.net/en/articles'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
---
 1. [Articles](https://metadrop.net/en/articles)
 
  

# A content manager on steroids: combine Drupal with AI to create content efficiently

Tuesday, December 03, 2024

 

 



This guide provides detailed instructions to install and configure the OpenAI module in Drupal, integrating it with CKEditor to leverage artificial intelligence capabilities during content editing.



   



## Revolutionizing Content Editing with AI in Drupal

Nowadays, **artificial intelligence (AI) has become a powerful tool** to enhance the process of creating and managing digital content. **Drupal, known for its flexibility and robustness** as a content management system (CMS), has already **started to integrate this new technology**, adding exceptional capabilities for generating and improving content.

In this detailed guide, as a showcase, we will demonstrate how to **install and configure the modules** [**AI**](https://www.drupal.org/project/ai "AI (Artificial Intelligence) module page on Drupal.org")[ **(Artificial Intelligence)**](https://www.drupal.org/project/ai "AI (Artificial Intelligence) module on Drupal.org") **and** [**Image Genie AI** ](https://www.drupal.org/project/ai_image_generation "Image Genie AI module on Drupal.org")in Drupal, the first to integrate AI with CKEditor, thereby improving its editing capabilities, such as **text generation, tone alterations, or translations, and the second to generate images**, enabling the creation of complete content **,** quickly and efficiently.

It is worth mentioning that these modules are currently **in development phase**, so their use in production is currently discouraged.

## Prerequisites

Before starting to integrate AI capabilities, it is essential to ensure certain requirements are met so that everything can function smoothly.

You will need to have at least **Drupal 9 or a higher version** installed, depending on what you want to use: the image generation module, for example, requires at least Drupal 10.3.

Although in this article **we are going to focus on using OpenAI services, we can use many other LLM models** both free and private such as Claude, Ollama, Mistral, or LM studio, to name a few. Regardless of the model chosen, an API key will be necessary to make calls to the model we choose. In the case of OpenAI, it can be obtained on its [API keys page](https://platform.openai.com/api-keys "OpenAI API key management page").

## Basic installation and configuration

Once the prerequisites are confirmed, we can start with the installation and basic configuration of our Drupal to integrate the chosen AI.

### Provider configuration

The first step is to integrate a provider of AI capabilities. As we have mentioned before, we will focus on the services provided by OpenAI, so **we will install and activate the module** [**OpenAI Provider**](https://www.drupal.org/project/ai_provider_openai "OpenAI Provider module on Drupal.org"):

```plaintext
composer require 'drupal/ai_provider_openai:1.0.x-dev@dev'
drush en ai_provider_openai
```

The module, as indicated, **requires an OpenAI API key**. Since these keys are sensitive data due to the credit consumption that occurs with each request to the AI provider's API, the module requires **the module** [**Key**](https://www.drupal.org/project/key) **for secure secret storage**. Since it is a dependency of the OpenAI Provider module, it should already be installed. If for any reason it is not, just run the following commands:

```plaintext
composer require 'drupal/key'
drush en key
```

Once installed, it will be possible to add a new key in the *System &gt; Keys* section within the Drupal admin panel. We will add our OpenAI API key on that configuration page.

Finally, we must assign the API key we added to the OpenAI provider. For this, we access the *AI &gt; Provider settings* section of the configuration panel and select the key created previously.

### OpenAI module installation

The Drupal AI module provides a **framework for integrating artificial intelligence capabilities into any site built with Drupal**. This module offers a suite of tools and a base API that facilitate content generation and modification, automatic translations, and semantic search, among other functionalities.

To install it, simply use *composer* as we did previously:

```plaintext
composer require 'drupal/ai:^1.0@beta';
drush en ai
```

## Integration with CKEditor

We will specifically focus on its capabilities related to content generation and translation, two key aspects for optimizing content creation in digital environments. For this, we need CKEditor to be able to make use of AI quickly and easily.

The first step is to **enable the AI CKEditor integration module**, one of the submodules of the Drupal AI module. This module introduces a plugin for CKEditor that **acts as a bridge between the text editor and language models**, offering functionalities such as text generation, translation, HTML code formatting, or changing the tone of the text, among others.

To activate the module, we will run the following command:

```plaintext
drush en ai_ckeditor
```

### CKEditor configuration

The next step is to configure the plugin in CKEditor. In the section *Configuration &gt; Content authoring &gt; Text formats and editors*, we should edit the text format we want this tool to be available for and **add the AI CKEditor plugin to the toolbar**. The *Source Editing* plugin is also required so we should enable it as well.

#### Configuring the enabled functionalities

Once the plugin is integrated, **it's necessary to enable and customize the different functionalities we want to be able to use**. In the *AI Tools* section of the vertical tabs, available in the CKEditor plugins configuration panel, you will find the different options that can be enabled by checking the corresponding checkboxes.

 

Enabling content generation in CKEditor configuration.

 

 

  How to enable powered text generation functionality.  #### Configuring translations and tone

For functionalities like translation and tone adjustment, it's **necessary to associate vocabularies that define the available options**.

In the case of translations, it is necessary to create a **vocabulary with the languages to translate to**. For example, we can create a taxonomy called "IA Translations" and add terms for different languages such as Spanish, English, Italian, etc.

In the case of tone, we must also create a **taxonomy with the tones we want to use**. For example, we can create a vocabulary called "IA Tone" and add terms like "formal", "critical", "informative", "technical" or "humorous".

After creating the vocabularies, we can select them in the configuration of each functionality.

 

Selecting the vocabulary to use for tone.

 

 

Each **enabled functionality allows selecting an LLM model** provided by the configured provider. In the case of OpenAI, it's possible to choose between models like gpt4o, gpt40-mini, or o1-preview, to mention a few.

 

Selecting the LLM model for the Summarize functionality.

 

 

#### Example of usage

Once we have our CKEditor correctly integrated with our AI provider, we can start using it. Below **are a couple of videos showing how to use it:** generating content, translating it, changing the tone, and reformatting the text:

  

Ckeditor - AI Features

 

 

  Generating content with an IA.    

AI CKeditor reformat HTML use example

 

 

  Using IA to give format text  ## Integration with Drupal translation system

While it is possible to translate texts from CKEditor as shown in the previous video, this is not ideal for automatically translating content. A Drupal content can have many fields and different texts, making the process tedious. However, **we can integrate AI with the Drupal translation system, making this process much cleaner and faster**.

### Prerequisites

The first step is to **enable the AI Translate submodule**, either with Drush or the Drupal administration interface.

If we don't already have multiple languages enabled on our site, we must add them in *Configuration &gt; Regional and language &gt; Languages*. Similarly, if we do not have the **content translation system active**, we must activate it in the section. The multilingual configuration in Drupal is complex, but broadly speaking, we will need to enable the Multilingual: content translation module and then in *Configuration &gt; Regional and language &gt; Content language and translation*, choose which content and fields will be translatable.

### Module configuration

Finally, we access the configuration of AI Translate from *Configuration &gt; AI &gt; AI Translate Settings*, where we can **configure the translation options**. For each language, we can set the following:

- **OpenAI Model**: AI model to be used for translating into the language (e.g., GPT-3.5).
- **Prompt**: since ultimately a prompt is sent to the AI provider, this prompt can be configured for each language. This is especially necessary given that each language has its own characteristics and we might want to specify certain uses (for example, indicating not to use title case when translating into Spanish).

Additionally, we can indicate whether we want **referenced entities to be translated** or not and which ones. An example would be translating Paragraphs, so that when an entity is translated, its paragraphs are also translated.

### Translating content

To translate the content, just **go to the translation tab** of any content. An ***AI Translations*** **column should appear with a link to translate** the content using the model you've specified in the module configuration .

 

 

  Columna con los enlaces para traducir cada idioma.  By clicking on a link, the AI translates the content, so you just need to review the translation afterward. The process can be seen in the following video:

  

AI Contetent Translate use example

 

 

  Translating content automatically.  ## Image generation

In addition to text, it is possible to generate images for our content. For this, we can use the **module** [**Image Genie AI**](https://www.drupal.org/project/ai_image_generation)**, which uses OpenAI's DALL·E models** to transform textual descriptions into images. We can choose between different versions of the model, like DALL·E 2 and DALL·E 3. The difference between them is that DALL·E3 is more advanced in its capabilities but also more expensive.

### Installation and configuration

To start, **we will install and activate the module** Image Genie AI:

```plaintext
composer require 'drupal/ai_image_generation:^1.0';
drush en ai_image_generation
```

Before continuing, and specifically if OpenAI's API keys are used, it is necessary to apply two **patch to fix two issues**.

The first [patch](https://www.drupal.org/files/issues/2024-11-27/apikey_increase_maxlength-3490280-2.patch "Patch to fix the API key field length issue") is necessary because OpenAI's current API keys are 164 characters long, but the module's configuration form [only accepts 128 characters](https://www.drupal.org/project/ai_image_generation/issues/3490280 "Issue at Drupal.org"). The second [second patch](https://www.drupal.org/files/issues/2024-12-02/config_validation_fix-3491097-2.patch "Patch to fix the configuration export error") fixes an [issue](https://www.drupal.org/project/ai_image_generation/issues/3491097 "Issue at Drupal.org") with module's configuration export.

Once the patches are applied, we access the module's configuration (*/admin/content/ai\_image\_generation\_settings*), and add the organization ID and the API key from our OpenAI account.

### Example of usage

With this, we will be able to start the module and generate images in our Drupal. Below is an example:

  

AI Image generate use example

 

 

  Drupal automatically translating a node.  ## Permission configuration

It is possible to set who can access and use the different AI-based functionalities through the many **permissions that the Drupal AI module declares**. For example, we can allow **only editors or administrators to access these advanced tools**, which would be logical if we want to control the cost that intensive use of AI services can generate.

In other cases, for example, it might make the translation service available to all users. Let's consider a blog platform with subscription access so that the cost of using AI is covered.

 

Permissions of the Drupal AI module.

 

 

  Some Drupal AI permissions.  ## Conclusion

The integration of **artificial intelligence into Drupal opens up a world of possibilities for improving the management and creation of content**. This integration not only optimizes the editorial workflow but also places the project that uses it at the **technological forefront in terms of content management** thanks to the new capabilities offered by AI-based solutions.

With the **Drupal AI module, it's easy to integrate these capabilities**, as demonstrated in this article. Although the modules used are not mature enough for production use with complete confidence, the reality is that they already offer very useful features. Our tests at Metadrop indicate that they do offer a reasonable degree of stability to be used in projects that are not highly critical. And we believe that **they will soon be stable enough to be used in other projects**.



[Drupal](https://metadrop.net/en/articles?text=Drupal)

[Artificial intelligence](https://metadrop.net/en/articles?text=Artificial%20intelligence)

 

- Manuel Bermúdez
    
    Senior iOS &amp; Android developer
- Olalla Rodicio
    
    Drupal Developer
 
 We integrate powerful, practical AI solutions into the Drupal platform you already trust 

[Drupal AI: Improve Search, Personalization &amp; Automation](https://metadrop.net/en/services/drupal/drupal-ai " See Drupal AI: Improve Search, Personalization & Automation")

Metadrop integrates AI into Drupal platforms — enabling intelligent search, content personalization, automated workflows, and LLM-powered user experiences.

 

 See more