AutomationFlowsGeneral › Snmp Trap Trigger Example

Snmp Trap Trigger Example

SNMP Trap Trigger Example. Uses snmpTrapTrigger. Event-driven trigger; 3 nodes.

Event trigger★★★★☆ complexity3 nodesSnmp Trap Trigger
General Trigger: Event Nodes: 3 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "SNMP Trap Trigger Example",
  "nodes": [
    {
      "parameters": {
        "port": 162,
        "bindAddress": "0.0.0.0",
        "options": {
          "allowedSources": "",
          "filterOid": "",
          "filterCommunity": "",
          "includeRawPdu": false,
          "validateSource": true
        }
      },
      "id": "b4a1c5f0-1234-4567-8901-123456789abc",
      "name": "SNMP Trap Trigger",
      "type": "snmpTrapTrigger",
      "typeVersion": 1,
      "position": [
        280,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Process received SNMP trap\nconst trapData = $input.first().json;\n\n// Extract key information\nconst sourceIP = trapData.source.address;\nconst trapType = trapData.pdu.type;\nconst timestamp = trapData.timestamp;\nconst community = trapData.trap.community;\nconst varbindCount = trapData.summary.varbindCount;\n\n// Create formatted output\nreturn {\n  json: {\n    alert: {\n      severity: \"INFO\",\n      title: `SNMP Trap Received from ${sourceIP}`,\n      description: `Received ${trapType} trap with ${varbindCount} varbinds`,\n      timestamp: timestamp,\n      source: sourceIP,\n      community: community,\n      trapDetails: trapData\n    }\n  }\n};"
      },
      "id": "c5b2d6f1-2345-5678-9012-234567890bcd",
      "name": "Process Trap Data",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        500,
        300
      ]
    },
    {
      "parameters": {
        "content": "\ud83d\udea8 **SNMP Trap Alert**\\n\\n**Source:** {{$json.alert.source}}\\n**Type:** {{$json.alert.title}}\\n**Description:** {{$json.alert.description}}\\n**Community:** {{$json.alert.community}}\\n**Time:** {{$json.alert.timestamp}}\\n\\n**Raw Trap Data:**\\n```json\\n{{JSON.stringify($json.alert.trapDetails, null, 2)}}\\n```",
        "options": {}
      },
      "id": "d6c3e7f2-3456-6789-0123-345678901cde",
      "name": "Log Trap Alert",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        720,
        300
      ]
    }
  ],
  "connections": {
    "SNMP Trap Trigger": {
      "main": [
        [
          {
            "node": "Process Trap Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Trap Data": {
      "main": [
        [
          {
            "node": "Log Trap Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "1",
  "tags": []
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

SNMP Trap Trigger Example. Uses snmpTrapTrigger. Event-driven trigger; 3 nodes.

Source: https://github.com/magnetarz/oidyssey/blob/e3e9f6b4264fb245ce5c9ddeef0965606c0f89a3/examples/trap-trigger-workflow.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Product - Google Search Console API Examples. Uses httpRequest. Event-driven trigger; 36 nodes.

HTTP Request
General

Metavoir Creative Intake To Review Brief. Event-driven trigger; 21 nodes.

General

Retry on fail except for known error Template. Uses stopAndError, noOp, stickyNote, manualTrigger. Event-driven trigger; 19 nodes.

Stop And Error
General

Retry on fail except for known error Template. Uses stopAndError. Event-driven trigger; 19 nodes.

Stop And Error
General

02 - Flow Control Demo (IF & Switch). Event-driven trigger; 16 nodes.