<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Sending alarms to N8N?]]></title><description><![CDATA[<p dir="auto">Has anyone been able to come up with a way to send alarms to an N8N instance? I have tried Hook::AlarmStateChange, and a notification channel and nothing works. I was on 5.2.4 but upgraded to 5.2.6 to see if that opens anything up.</p>
<p dir="auto">I have been hitting up Google and all the LLM's, to no avail.</p>
<p dir="auto">I am attempting to sedn JSON from netxms to N8N.</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.netxms.org/topic/8277/sending-alarms-to-n8n</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 11:13:06 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/8277.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Oct 2025 14:58:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sending alarms to N8N? on Tue, 21 Oct 2025 20:16:19 GMT]]></title><description><![CDATA[<p dir="auto">also you don't need "function main()", just write code.</p>
<p dir="auto">something like this:</p>
<pre><code>source = FindObject($alarm.sourceObject());

j = JsonObject();
j.set("id", $alarm.id);
j.set("state", $alarm.state);
j.set("severity", $alarm.severity);
j.set("message", $alarm.message);
j.set("source", source ? source.name : "");
j.set("eventCode", $alarm.eventCode);
j.set("eventName", $alarm.eventName);

trace(0, j.serialize());
</code></pre>
<p dir="auto">I highly recommend you to read <a href="https://www.netxms.org/documentation/nxsl-latest/" rel="nofollow ugc">https://www.netxms.org/documentation/nxsl-latest/</a>.</p>
]]></description><link>https://forum.netxms.org/post/34920</link><guid isPermaLink="true">https://forum.netxms.org/post/34920</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Tue, 21 Oct 2025 20:16:19 GMT</pubDate></item><item><title><![CDATA[Reply to Sending alarms to N8N? on Tue, 21 Oct 2025 19:22:34 GMT]]></title><description><![CDATA[<p dir="auto">There are no "Execute()" function in the NXSL, and you can't execute external commands in any way - that's by design.</p>
<p dir="auto">What I'd do:</p>
<ul>
<li>create Action which runs external shell script to form  json and send query using curl. Pass required event fields as arguments to the script.</li>
<li>add this Action to EPP (I'd create separate rule just for this integration - this way you can control what exactly being sent)</li>
</ul>
<p dir="auto">Or, you setup web service (Settings -&gt; Web service definition), and call it from NXSL. But again, I'd use action for that, not hook.</p>
<p dir="auto">Note on the json string escaping: instead of manual processing, you can use construct <a href="https://netxms.org/documentation/nxsl-latest/#class-jsonobject" rel="nofollow ugc">https://netxms.org/documentation/nxsl-latest/#class-jsonobject</a> and produce perfectly valid json.</p>
]]></description><link>https://forum.netxms.org/post/34919</link><guid isPermaLink="true">https://forum.netxms.org/post/34919</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Tue, 21 Oct 2025 19:22:34 GMT</pubDate></item><item><title><![CDATA[Reply to Sending alarms to N8N? on Tue, 21 Oct 2025 19:03:11 GMT]]></title><description><![CDATA[<p dir="auto">I tried doing something like this, but kept hitting various walls, when using hook::alarmstatechange</p>
<p dir="auto">function main()<br />
{<br />
   webhook = "<a href="https://my.host.hstgr.cloud/webhook-test/netxms-alarm" rel="nofollow ugc">https://my.host.hstgr.cloud/webhook-test/netxms-alarm</a>";</p>
<p dir="auto">   payload = "{"<br />
      + "\"id\":\""        + ToString($alarm-&gt;id) + "\","<br />
      + "\"state\":\""     + ToString($alarm-&gt;state) + "\","<br />
      + "\"severity\":\""  + ToString($alarm-&gt;severity) + "\","<br />
      + "\"message\":\""   + EscapeString(($alarm-&gt;message != null) ? $alarm-&gt;message : "") + "\","<br />
      + "\"source\":\""    + (($alarm-&gt;sourceObject != null) ? EscapeString($alarm-&gt;sourceObject-&gt;name) : "") + "\","<br />
      + "\"eventCode\":\"" + ToString($alarm-&gt;eventCode) + "\","<br />
      + "\"eventName\":\"" + EscapeString(($alarm-&gt;eventName != null) ? $alarm-&gt;eventName : "") + "\""<br />
      + "}";</p>
<p dir="auto">   WriteLog(0, "Alarm JSON: " + payload);</p>
<p dir="auto">   cmd = "curl -s -X POST -H 'Content-Type: application/json' -d '" + payload + "' " + webhook;<br />
   Execute(cmd);<br />
}</p>
<p dir="auto">function EscapeString(s)<br />
{<br />
   if (s == null)<br />
      return "";<br />
   s = Replace(s, "\\", "\\\\"); <br />
   s = Replace(s, "\"", "\\\""); <br />
   return s;<br />
}</p>
]]></description><link>https://forum.netxms.org/post/34918</link><guid isPermaLink="true">https://forum.netxms.org/post/34918</guid><dc:creator><![CDATA[Sorikan]]></dc:creator><pubDate>Tue, 21 Oct 2025 19:03:11 GMT</pubDate></item><item><title><![CDATA[Reply to Sending alarms to N8N? on Mon, 20 Oct 2025 18:23:44 GMT]]></title><description><![CDATA[<p dir="auto">Thats not really a thing? I am trying to get all of the alarm information I can into N8N. You can see the documentation in the link below. I had attempted to build the JSON in hook::AlarmStateChange, but that appears to be a dead end at this point? I am now trying to just dump the data to a script with a shell notification channel - but I am not getting any actual alarm data in the fields yet.</p>
<p dir="auto"><div class="card col-md-9 col-lg-6 position-relative link-preview p-0">



<a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook" title="Webhook | Nodes | n8n Docs">
<img src="https://docs.n8n.io/~gitbook/image?url&#x3D;https%3A%2F%2F2083420238-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252FgkeAaBEvbwHB2NmepVHG%252Fsites%252Fsite_Qp7QM%252Fsocialpreview%252FBJYuJLS829e7wvgPdf5m%252FGitBook%25201280x630.png%3Falt%3Dmedia%26token%3D535a1998-3467-4390-aef9-2f68fdbe688f&amp;width&#x3D;1200&amp;height&#x3D;630&amp;sign&#x3D;66c16ad3aef77b2b228614fe76c6c3a3&amp;sv&#x3D;3" class="card-img-top not-responsive" style="max-height: 15rem;" alt="Link Preview Image" onerror="this.parentElement.remove()" />
</a>



<div class="card-body">
<h5 class="card-title">
<a class="text-decoration-none" href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook">
Webhook | Nodes | n8n Docs
</a>
</h5>
<p class="card-text line-clamp-3">Learn how to use the Webhook node in n8n. Follow technical documentation to integrate Webhook node into your workflows.</p>
</div>
<a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook" class="card-footer text-body-secondary small d-flex gap-2 align-items-center lh-2">



<img src="https://docs.n8n.io/~gitbook/image?url&#x3D;https%3A%2F%2F2083420238-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Forganizations%252FgkeAaBEvbwHB2NmepVHG%252Fsites%252Fsite_Qp7QM%252Ficon%252FxjIGQCM5OtrvOpFoqmVx%252Flogo-icon.svg%3Falt%3Dmedia%26token%3D2f1d0b07-ca72-4f1b-9f7f-fbbd7b0c7797&amp;width&#x3D;48&amp;height&#x3D;48&amp;sign&#x3D;9b8deb480091d87df140f2664f24921f&amp;sv&#x3D;3" alt="favicon" class="not-responsive overflow-hiddden" style="max-width: 21px; max-height: 21px;" onerror="this.remove()"/>









<p class="d-inline-block text-truncate mb-0"> <span class="text-secondary">(docs.n8n.io)</span></p>
</a>
</div></p>
<p dir="auto">Thanks.</p>
]]></description><link>https://forum.netxms.org/post/34914</link><guid isPermaLink="true">https://forum.netxms.org/post/34914</guid><dc:creator><![CDATA[Sorikan]]></dc:creator><pubDate>Mon, 20 Oct 2025 18:23:44 GMT</pubDate></item><item><title><![CDATA[Reply to Sending alarms to N8N? on Mon, 20 Oct 2025 15:40:46 GMT]]></title><description><![CDATA[<p dir="auto">Can you point me to n8n documentation on the api call you are trying to use</p>
]]></description><link>https://forum.netxms.org/post/34913</link><guid isPermaLink="true">https://forum.netxms.org/post/34913</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 20 Oct 2025 15:40:46 GMT</pubDate></item></channel></rss>