Local AI and Drupal Migration Work: Checking Generated Field Mappings

Drupal's AI migration modules draft field mappings, but core's Migrate API — not AI — still moves the actual content.

Checking generated field mappings means reviewing, before any data moves, the content types and field assignments an AI tool proposes when mapping legacy content into Drupal's structure. Drupal's AI-assisted migration tools now do this analysis step with AI, but the actual migration still runs through Drupal's own, non-AI import system. Two contrib modules currently handle this work on Drupal sites, and both put a review step between the AI's suggestion and the live migration. Understanding what each one actually automates — and what it still asks a person to confirm — determines how much a migration team can trust the output without re-checking it field by field afterward.

Table of Contents

What "AI-generated field mappings" actually means

A field mapping tells a migration which piece of source content (a heading, a date, an image URL) goes into which Drupal field on which content type. Building these mappings by hand for a large legacy site, especially one with inconsistent HTML, is slow and error-prone work that migration teams have traditionally done by writing YAML migration definitions one field at a time. The Drupal contrib module AI Content Migrate automates the first pass of that work.

It analyzes sample legacy HTML or URLs and proposes content types, fields, and XPath selector mappings, along with handling for related media imports, according to the module's Drupal.org project page. A second module, AI Migration, works from the other direction: it parses source pages against a site's existing Drupal content-type schema and generates the Migrate API YAML needed to pull content in, per its project page. In both cases, the AI's job stops at proposing a mapping. Neither module uses AI to move or transform the actual content during migration.

Why the AI step and the migration step are kept separate

This separation is deliberate, not incidental. Once AI Content Migrate's analysis produces content types and field mappings, the real migration executes through Drupal core's standard Migrate API, the same system that has run Drupal migrations for years, rather than through any AI process, according to reporting from TheDropTimes. That design means an AI misjudgment is contained to the proposal stage.

A wrong field mapping gets caught before data moves, instead of surfacing as corrupted or misplaced content after thousands of nodes have already imported. It also means the migration itself is auditable and repeatable in the same way any Drupal Migrate API job is, since nothing in the actual data transfer depends on an AI provider's behavior at the moment of import. AI Migration's dependencies reflect the same core-first design: it requires `drupal/ai` ^1.2, `drupal/migrate` ^6.0, and `drupal/migrate_plus` ^6.1, building its generated YAML on top of Drupal's existing migration framework rather than replacing it, per its Drupal.org listing.

The review step the modules insist on

Both tools are explicit that a generated mapping is a draft, not a finished configuration. AI Content Migrate's own setup instructions tell users to "always review AI suggestions before approval" and lay out a four-step flow: analyze, review mappings, run a dry run, then migrate, according to the module's documentation. That dry-run step matters in practice.

It lets a team see how the proposed mappings would populate content types across a representative sample before a single node is created on the live site. A field mapped to the wrong content type, or an XPath selector that grabs the wrong HTML element, shows up in the dry run's output rather than in production content. This review requirement lines up with how the wider Drupal community is framing AI-assisted migration work. At DrupalCon Rotterdam 2026, developer Raffaele Chiocca is presenting a session titled "Legacy Chaos: Drupal CMS, AI-Assisted Content Modeling & Migration," which frames AI-proposed content models and field mappings as drafts that require critical human evaluation rather than a final authority on site structure, according to the session listing.

What to check before trusting a mapping

A reviewer going through generated mappings has a few specific things worth checking before approving them: That last point connects to a broader governance note: Drupal.org marks `ai_content_migrate` as "not covered by Drupal's security advisory policy," carrying a use-at-your-own-risk notice, according to Drupal.org's project status page. That status doesn't mean the module is unsafe to use, but it does mean a site relying on it for sensitive legacy content should treat the dry-run and review steps as mandatory rather than optional, since no formal security process backstops the module itself.

  • **Content type fit**: does the proposed content type actually match the source content, or did the tool default to a generic type because the HTML was inconsistent?
  • **XPath selector accuracy**: run the dry run and confirm each selector is pulling the exact element intended, not a sibling or parent node that happens to contain similar text.
  • **Media and related content**: confirm image and file imports resolved to the correct assets rather than broken or placeholder references.
  • **Schema compatibility**: for AI Migration, confirm the generated YAML respects the site's existing content-type schema rather than inventing fields that don't exist.
  • **Data handling disclosure**: check what happens to the HTML sent for analysis, since AI Content Migrate's own page warns that snippets sent for analysis may be transmitted to whatever AI provider is configured, per Drupal.org.

Running the AI analysis step locally instead of through a hosted provider

Teams uneasy about sending legacy HTML to a third-party AI provider during the analysis step have a self-hosted alternative within the same ecosystem. The Drupal AI module ships a dedicated "AI Provider Ollama" submodule that connects Drupal's core AI module to a self-hosted Ollama server, configured under Connection details at `/admin/config/ai/providers/ollama` and selected as the active provider at `/admin/config/ai/settings`, according to the Drupal AI module's documentation. This matters specifically for AI Content Migrate, since that module's provider is configurable and a local Ollama connection keeps legacy HTML off a third-party API entirely. AI Migration, by contrast, documents only hosted models for its mapping step — OpenAI GPT-4.1-mini, GPT-5-nano, or Gemini 2.5 Flash — and names no locally-run model as a supported or recommended option for generating migrations, per its project page.

A team wanting local inference for migration mapping work today has a clearer path through AI Content Migrate than through AI Migration. One setup detail affects where that local model actually runs. The AI module's own DDEV developer documentation advises against running Ollama inside the DDEV container itself, noting that local inference generally benefits from the host machine's own CPU or GPU resources rather than a sandboxed container, according to the module's DDEV documentation. Running Ollama on the host and pointing Drupal's provider settings at it avoids the resource ceiling a dev container would otherwise impose on the model.

Frequently Asked Questions

Does the AI ever touch the actual migrated content, or only the planning stage?

Only the planning stage. Once content types and field mappings are proposed, Drupal core's standard Migrate API runs the actual migration, according to TheDropTimes.

Can the mapping analysis run without sending data to an external AI provider?

Yes, through the AI module's Ollama provider, configured at `/admin/config/ai/providers/ollama` and selected at `/admin/config/ai/settings`, per the module's documentation.

Is there a way to test a generated mapping before it touches the live site?

Yes. AI Content Migrate's documented workflow includes a dry-run step between reviewing mappings and running the real migration, according to its Drupal.org page.


You Might Also Like