Convert POML to AI-Ready Prompts & Chat Messages with Zero Dependencies
POML → Prompt/Messages (No-Deps)
What this does
Turns POML markup into either a single Markdown prompt or chat-style messages[] — using a zero-dependency n8n Code node. It supports variable substitution (via context), basic components (headings, lists, code, images, tables, line breaks), and optional schema-driven validation using componentSpec + attributeSpec.
Credits Created by Real Simple Solutions as an n8n template friendly POML compiler (no dependencies) for full POML feature parity. View more of our templates here
Who’s it for
Teams who author prompts in POML and want a template-safe way to turn them into either a single Markdown prompt or chat-style messages—without installing external modules. Works on n8n Cloud and self-hosted.
What it does
This workflow converts POML into:
prompt** (Markdown) for single-shot models, or messages[]** (system|user|assistant) for chat APIs when speakerMode is true.
It supports variable substitution via a context object ({{dot.path}}), lists, headings, code blocks, images (incl. base64 → data: URL), tables from JSON (records/columns), and basic message components.
How it works
Set (Specs & Context):** Provide componentSpec (allowed attrs per tag), attributeSpec (typing/coercion), and optional context. Code (POML → Prompt/Messages):** A zero-dependency compiler parses the POML and emits prompt or messages[].
> Add a yellow Sticky Note that includes this description and any setup links. Use additional neutral sticky notes to explain each step.
How to set up
Import the template. Open the first Set node and paste your componentSpec, attributeSpec, and context (examples included). In the Code node, choose:
speakerMode: true to get messages[], or false for a single prompt. listStyle: dash | star | plus | decimal | latin. Run → inspect prompt/messages in the output.
Requirements
No credentials or community nodes. Works without external libraries (template-compliant).
How to customize
Add message tags (<system-msg>, <user-msg>, <ai-msg>) in your POML when using speakerMode: true. Extend componentSpec/attributeSpec to validate or coerce additional tags/attributes. Preformat arrays in context (e.g., bulleted, csv) for display, or add a small Set node to build them on the fly. Rename nodes and keep all user-editable fields grouped in the first Set node.
Security & best practices
Never** hardcode API keys in nodes. Remove any personal IDs before publishing. Keep your Sticky Note(s) up to date and instructional.
Related Templates
Reply to Outlook Emails with OpenAI
Who is this template for? This template is for any Microsoft Outlook user who wants a trained AI agent to reason and rep...
Use OpenRouter in n8n versions <1.78
What it is: In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot...
Task Deadline Reminders with Google Sheets, ChatGPT, and Gmail
Intro This template is for project managers, team leads, or anyone who wants to automatically remind teammates of tasks ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments