An AI Automators plugin that converts uploaded Word (.docx), PDF, ODT, and RTF files to clean HTML using the pandoc command-line tool.

Once configured, the automator runs automatically when a node is saved, writing the converted HTML into any text_long target field — no custom code required.

Features

Requirements

Installation

drush en ai_automator_pandoc

After enabling, visit Administration → Content authoring → Pandoc settings and enter the full path to the pandoc binary (e.g. /usr/local/bin/pandoc). Run which pandoc on the server to find the correct path.

Installing pandoc

Docker note: images based on Alpine Linux use apk, not apt-get. Use apk add --no-cache pandoc or add it to your Dockerfile.

Drush test command

The module ships with a Drush command for end-to-end testing of the conversion without going through the UI:

drush ai-automator-pandoc:test /path/to/document.docx

The command prints the resolved pandoc path, version, exit code, conversion time, and an HTML preview. Use --save to write the full HTML output next to the source file.

Related modules