@neayi/n8n-nodes-mediawiki
v0.1.14
Published
n8n nodes for interacting with MediaWiki
Maintainers
Readme
n8n-nodes-mediawiki
This package contains n8n nodes for interacting with MediaWiki.
n8n is a fair-code, extensible workflow automation tool. It allows you to connect anything to anything.
Table of Contents
Installation
Installation in n8n (Community Nodes)
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-mediawikiin the npm Package Name field - Accept the risks
- Click Install
Manual Installation
To install manually, navigate to the .n8n directory of your n8n installation and run:
npm install n8n-nodes-mediawikiConfiguration
Prerequisites
Before using these nodes, you need to create a bot on your MediaWiki instance:
- Log in to your MediaWiki account
- Go to Special:BotPasswords
- Create a new bot password with the required permissions:
- High-volume editing (to edit pages)
- Edit existing pages (to modify existing pages)
- Create, edit, and move pages (to create new pages)
- Note down the bot name and the generated password
Credentials
MediaWiki API
To use the MediaWiki nodes, you need to create MediaWiki API credentials:
Required parameters:
- MediaWiki Site URL: The URL of your MediaWiki instance (without
/api.php)- Example:
https://your-wiki.example.com
- Example:
- Bot Username: The bot's username (format:
Username@BotName)- Example:
MyAccount@MyBot
- Example:
- Bot Password: The password generated in Special:BotPasswords
- Example:
abcdefgh12345678ijklmnop90123456
- Example:
Testing credentials:
Credentials are automatically tested by calling the MediaWiki API to retrieve site information.
Available Nodes
MediaWiki Add Page
Creates a new page (or optionally overwrites an existing one) in MediaWiki.
- Creates a page with the specified title and content
- Supports multiple content models (wikitext, JSON, CSS, JavaScript, etc.)
- Skips or overwrites existing pages based on configuration
MediaWiki Create or Update Template
Creates or updates a template in a MediaWiki page.
- Reads the content of a MediaWiki page
- Checks whether a template already exists on the page
- If the template exists: updates the template variables
- Possibility to choose what to do if the template does not exist: either fails or adds the template at the top or bottom of the page
MediaWiki Get Page Content
Retrieves the content of a MediaWiki page.
- Returns raw wikitext, plain parsed text, or full rendered HTML
- Optionally includes page metadata (ID, content model, last modified date and author)
MediaWiki Get Template Data
Reads the variables of a template from a MediaWiki page.
- Parses template variable names and values from the page source
- Optionally throws an error if the template is not found
MediaWiki Semantic Query
Executes a Semantic MediaWiki Ask query to retrieve semantic data.
- Runs SMW Ask queries with conditions, property fields, limit and sort order
- Returns each matching page as a separate output item with its semantic properties
- Requires the Semantic MediaWiki extension to be installed on the wiki
MediaWiki Upload File
Uploads a file to MediaWiki from an n8n binary field.
- Uploads any binary file to the wiki file repository
- Supports custom filename, description page content, and upload comment
- Optionally ignores upload warnings (e.g. duplicate files)
Contributing
Contributions are welcome! Feel free to open an issue or a pull request.
Support
If you encounter issues or have questions:
- Check that your MediaWiki credentials are correct
- Make sure the bot has the required permissions
- Consult the MediaWiki API documentation: https://www.mediawiki.org/wiki/API:Main_page
License
Apache 2.0
