Set up AI tools
The AI tools in Drupal CMS aim to make building a site and managing its content more efficient. Content creators get help adding accessible descriptions to images, and site administrators get an assistant that navigates Drupal CMS’s feature set, completes site building tasks, and helps create content types, fields, and categories.
The AI Assistant add-on installed and connected to a provider, with the assistant available in the toolbar and AI-generated alternative text available when uploading images.
Prerequisites
Section titled “Prerequisites”- A running Drupal CMS site with an administrator account.
- A supported provider: amazee.ai, Anthropic, or OpenAI. No API key is needed for amazee.ai; you get a limited free trial, which registering for an account extends. Otherwise you need an OpenAI API key or an Anthropic API key. Both require payment, and neither is the same thing as a ChatGPT key.
The assistant, like the language models it is built on, is good at tasks that allow some creative freedom, and less reliable (though still useful) when being true to fact is what matters most. It is always wise to review the assistant’s work.
Install the AI Assistant add-on
Section titled “Install the AI Assistant add-on”- Go to Extend → Recommended
/admin/modules/browse/recommended. - Locate the AI Assistant recipe and select Install.
- Select a provider and select Continue.
- Add the API key, if your provider requires one.
Once the add-on is installed, it adds an option to generate alternative text to the image uploading UI and configures an AI-powered chatbot for common administrative tasks. An AI Assistant button appears in the top toolbar; you may need to clear the cache to see it. Select the button to open the chat in the sidebar.
Ask the assistant to change configuration
Section titled “Ask the assistant to change configuration”Use the assistant to locate and change configuration options faster. Ask, for example, “How do I change the site name?” The assistant makes the configuration change for you when it can, or it provides instructions for navigating to the relevant configuration forms so you can make the change yourself.
Generate alternative text for an image
Section titled “Generate alternative text for an image”- Go to Create → Image.
- Choose an image to upload.
- Under Alternative text, select Generate with AI.
- Review the generated text and select Save to add the image to your media library.
Generated alternative text saves you time and improves your site’s accessibility.
Scaffold features with the assistant
Section titled “Scaffold features with the assistant”The assistant understands Drupal CMS best practices and how to use the existing tools: content types, fields, and views. Ask it to scaffold new features, with a query like this one:
“I want to create a new section of my site that lists different types of wines. Create a wine content type with fields for describing the wine, reviews, and an image. Add the option to categorize wines by region using taxonomy. And populate the wine region taxonomy with a list of popular wine regions.”
Verify
Section titled “Verify”- The AI Assistant button appears in the top toolbar and opens a chat in the sidebar.
- Uploading an image at Create → Image offers Generate with AI under Alternative text.
Related
Section titled “Related”- Add features with recommended add-ons explains how add-ons like this one install.
- Content modeling covers the content types and fields the assistant scaffolds.
- Accessibility essentials covers writing alternative text yourself.
Was this page helpful?
Drupal is a registered trademark of Dries Buytaert.