n8n-nodes-open5e
v0.1.2
Published
n8n community node for the Open5e API - D&D 5e SRD content
Maintainers
Readme
n8n-nodes-open5e
This is an n8n community node that lets you access D&D 5th edition SRD content from the Open5e API in your n8n workflows.
n8n is a fair-code licensed workflow automation platform.
Installation Operations Credentials Compatibility Usage Resources Limitations License
Installation
Follow the installation guide in the n8n community nodes documentation.
Manual Installation
npm install n8n-nodes-open5eOperations
The Open5e node provides access to 12 different D&D 5e resources through the Open5e API. Each resource supports three operations:
- Get Many: Retrieve multiple items with optional filters and pagination
- Get: Retrieve a single item by its identifier (slug or key)
- Search: Search for items by name or description
Credentials
No credentials required! The Open5e API is completely free and public. No API key or authentication is needed.
Compatibility
- Minimum n8n version: unknown - the node was developed and tested on n8n 2.7, but should be compatible with earlier versions as well
- Tested with n8n version: 2.7
Usage
Resources
The node provides access to the following D&D 5e resources:
- Monsters - Creatures and NPCs
- Spells - Magic spells
- Magic Items - Magical equipment
- Weapons - Weapon stats
- Armor - Armor types and stats
- Feats - Character feats
- Conditions - Status conditions
- Races - Player character races
- Classes - Player character classes
- Backgrounds - Character backgrounds
- Planes - Planes of existence
- Sections - Rules and lore sections
Example Workflows
1. Random Encounter Generator
Create random encounters by fetching monsters filtered by challenge rating:
- Add an Open5e node to your workflow
- Select Resource: Monster
- Select Operation: Get Many
- In Filters, add:
- Challenge Rating:
5 - Document Source:
wotc-srd
- Challenge Rating:
- Toggle Return All ON to get all matching monsters
- Connect to a Function node to randomly select 3-5 monsters
- Format the output as needed (Discord message, email, etc.)
2. Spell Lookup Bot
Build a Discord bot that looks up spell information:
- Use a Discord Trigger node to listen for commands
- Add a Function node to extract the spell name from the command
- Add an Open5e node:
- Resource: Spell
- Operation: Search
- Search Term:
={{ $json.spellName }}
- Add a Function node to format the spell details
- Send the formatted spell info back to Discord
3. Item Database Search
Search for magic items and weapons by name:
- Add an HTTP Request trigger or Form trigger to accept search queries
- Add an Open5e node:
- Resource: Magic Item (or Weapon)
- Operation: Search
- Search Term:
={{ $json.query }} - Limit:
10
- Format and return the results
Filters and Options
Common Filters (All Resources)
- Document Source (
document__slug): Filter by source book- Examples:
wotc-srd(official SRD),tob(Tome of Beasts),cc(Creature Codex)
- Examples:
- Ordering: Sort results
- Options:
name(A-Z),-name(Z-A)
- Options:
Resource-Specific Filters
Monsters:
- Challenge Rating: e.g.,
5,1/2,0 - Type: e.g.,
dragon,humanoid,undead - Size: Tiny, Small, Medium, Large, Huge, Gargantuan
Spells:
- Level: 0-9 (0 = cantrip)
- School: e.g.,
evocation,abjuration,necromancy - Class: e.g.,
wizard,cleric,druid
Weapons & Armor:
- Category: e.g.,
simple,martial(weapons);light,medium,heavy(armor)
Magic Items:
- Type: e.g.,
weapon,armor,wondrous item - Rarity:
common,uncommon,rare,very rare,legendary
Pagination
- Return All: When enabled, automatically fetches all pages of results
- Limit: When Return All is off, specify how many results to return (1-100)
The node automatically handles pagination by following the API's next links.
Resources
Limitations
Global Search Not Supported
The Open5e API's global search endpoint (/v1/search/) returns HTML instead of JSON, so it is not supported by this node. Use the Search operation on individual resources instead.
Self-Hosted Instances Not Supported
The node only connects to the public Open5e API at api.open5e.com. Self-hosted Open5e instances are not supported in v1.
Advanced Filtering
Only the most commonly used filters are exposed in the node UI. For advanced filtering needs, use the HTTP Request node directly with the Open5e API.
Development
# Install dependencies
npm install
# Build the node
npm run build
# Run in development mode
npm run dev
# Lint the code
npm run lint
# Fix linting issues
npm run lint:fixLicense
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
- Report issues at: https://github.com/garritfra/n8n-nodes-open5e/issues
- Join the n8n community: https://community.n8n.io/
