blog: add standalone n8n reference prompt with API and skill library
This commit is contained in:
@@ -152,6 +152,73 @@
|
|||||||
<a href="https://derez.ai/#pricing">Deploy your n8n-connected agent now.</a>
|
<a href="https://derez.ai/#pricing">Deploy your n8n-connected agent now.</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<h2 id="n8n-reference">Standalone n8n Prompt for Hermes Agent</h2>
|
||||||
|
<p>Copy this entire prompt into any Hermes agent (derez.ai or self-hosted) to give it direct n8n integration skills — REST API access, skill library awareness, and workflow execution management. Replace the API key with your own n8n instance key.</p>
|
||||||
|
|
||||||
|
<div class="prompt-box" style="font-style:normal">
|
||||||
|
<strong style="color:#00f5ff">## Integrations</strong><br /><br />
|
||||||
|
|
||||||
|
<strong>### N8N Skills</strong><br />
|
||||||
|
Create a skill that integrates with n8n's skill library and REST API.<br /><br />
|
||||||
|
|
||||||
|
<strong>## Configuration</strong><br />
|
||||||
|
<code>N8N_URL=https://n8n.derez.ai/</code><br />
|
||||||
|
<code>N8N_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhOTY0NDQ1Ni1hZGUxLTRlZjUtYmE0NC03MjRiZjhhY2JmNGUiLCJpc3MiOiJuOG4iLCJhdWQiOiJwdWJsaWMtYXBpIiwianRpIjoiZTExMTY3YjUtMGU1Yy00MTNhLWI0YzAtNGU5MGYyODFiMzk2IiwiaWF0IjoxNzgxNzcyNzE3LCJleHAiOjE3ODIzNTY0MDB9.g-SG9u7g9sD0lhD6fr6PZKcBs38Eq3p14Yf8yiPXO-U</code><br /><br />
|
||||||
|
|
||||||
|
<strong>## Skill library</strong><br />
|
||||||
|
You have access to n8n's official skill library at <code>https://github.com/n8n-io/skills</code><br /><br />
|
||||||
|
At the start of every task, clone or pull the latest version of this repo to discover available skills.<br /><br />
|
||||||
|
<code>if [ ! -d /tmp/n8n-skills ]; then<br />
|
||||||
|
git clone --depth 1 https://github.com/n8n-io/skills /tmp/n8n-skills<br />
|
||||||
|
else<br />
|
||||||
|
cd /tmp/n8n-skills && git pull --ff-only<br />
|
||||||
|
fi</code><br /><br />
|
||||||
|
Read the README.md and INDEX.md files in that repo to understand what skills are available. Each skill has a dedicated directory with a README.md describing its purpose and usage. Choose the most relevant skill(s) for the user's request.<br /><br />
|
||||||
|
|
||||||
|
<strong>## API basics</strong><br />
|
||||||
|
All calls go to <code>{N8N_URL}/rest/...</code> with the header:<br />
|
||||||
|
<code>X-N8N-API-KEY: {N8N_API_KEY}</code><br /><br />
|
||||||
|
The n8n REST API documentation is available at <code>{N8N_URL}/api/v1/openapi.json</code> — fetch it if you need to discover available endpoints.<br /><br />
|
||||||
|
|
||||||
|
<strong>### Common operations</strong><br /><br />
|
||||||
|
<strong>List workflows:</strong><br />
|
||||||
|
<code>curl -s -H 'X-N8N-API-KEY: {key}' '{N8N_URL}/rest/workflows'</code><br /><br />
|
||||||
|
<strong>Get a workflow by ID:</strong><br />
|
||||||
|
<code>curl -s -H 'X-N8N-API-KEY: {key}' '{N8N_URL}/rest/workflows/<id>'</code><br /><br />
|
||||||
|
<strong>List executions:</strong><br />
|
||||||
|
<code>curl -s -H 'X-N8N-API-KEY: {key}' '{N8N_URL}/rest/executions'</code><br /><br />
|
||||||
|
<strong>List credentials:</strong><br />
|
||||||
|
<code>curl -s -H 'X-N8N-API-KEY: {key}' '{N8N_URL}/rest/credentials'</code><br /><br />
|
||||||
|
<strong>List tags:</strong><br />
|
||||||
|
<code>curl -s -H 'X-N8N-API-KEY: {key}' '{N8N_URL}/rest/tags'</code><br /><br />
|
||||||
|
|
||||||
|
<strong>## Workflow skill execution pattern</strong><br /><br />
|
||||||
|
When a skill from the library maps to a workflow to run:<br /><br />
|
||||||
|
1. Read the skill's README.md to understand the inputs, outputs, and workflow structure.<br />
|
||||||
|
2. Check if a matching workflow already exists in n8n (use the list endpoint).<br />
|
||||||
|
3. If it does, create an execution:<br /><br />
|
||||||
|
<code>curl -s -X POST '{N8N_URL}/rest/workflows/<id>/run' \<br />
|
||||||
|
-H 'X-N8N-API-KEY: {key}' \<br />
|
||||||
|
-H 'Content-Type: application/json' \<br />
|
||||||
|
-d '{"data": <input_data>}'</code><br /><br />
|
||||||
|
4. If it doesn't, create a new workflow using the skill's specification:<br /><br />
|
||||||
|
<code>curl -s -X POST '{N8N_URL}/rest/workflows' \<br />
|
||||||
|
-H 'X-N8N-API-KEY: {key}' \<br />
|
||||||
|
-H 'Content-Type: application/json' \<br />
|
||||||
|
-d '{"name": "<skill-name>", "nodes": [...], "connections": {...}}'</code><br /><br />
|
||||||
|
5. Poll execution status:<br /><br />
|
||||||
|
<code>curl -s -H 'X-N8N-API-KEY: {key}' '{N8N_URL}/rest/executions/<id>' | jq '.data'</code><br /><br />
|
||||||
|
|
||||||
|
<strong>## Solved cases log</strong><br />
|
||||||
|
After every successful n8n task, append to ~/n8n_solutions.md:<br /><br />
|
||||||
|
<code>## <short title> (<date>)<br />
|
||||||
|
Goal: <one sentence><br />
|
||||||
|
Skill used: <skill path in the library><br />
|
||||||
|
Key commands: <the curl | jq pipelines that worked><br />
|
||||||
|
Gotchas: <anything non-obvious></code><br /><br />
|
||||||
|
Read ~/n8n_solutions.md at task start — if a matching case exists, reuse it directly.
|
||||||
|
</div>
|
||||||
|
|
||||||
<p style="margin-top:48px;padding-top:24px;border-top:1px solid #1a1a24;font-size:0.85rem;color:#666;">
|
<p style="margin-top:48px;padding-top:24px;border-top:1px solid #1a1a24;font-size:0.85rem;color:#666;">
|
||||||
<a href="https://derez.ai" style="color:#00f5ff">derez.ai</a> — Deploy your AI agent in 10 Minutes.
|
<a href="https://derez.ai" style="color:#00f5ff">derez.ai</a> — Deploy your AI agent in 10 Minutes.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user