Workflow for Domain Expiry notification

I came across a workflow automation for SSL expiry notifier. Can we add a whois query for Domain Expiry?

`

1 Like

Hi @rajasekhar,

I don’t see why not, As a starting point try the below.

{
  "name": "Domain Expiration",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "command": "whois google.com"
      },
      "name": "Execute Command",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "expirationDate",
              "value": "={{$json[\"stdout\"].substring($json[\"stdout\"].indexOf(\"Registry Expiry Date:\") + 22, $json[\"stdout\"].lastIndexOf(\"Registrar:\") -4)}}"
            }
          ]
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Execute Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Command": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "id": 15
}
1 Like

Hey @rajasekhar!

Welcome to the community :sparkling_heart:

Not sure if there is an API, but if there is, you can use the HTTP Request node to query the API as well! Else, the solution provided by @jon works too :slight_smile:

1 Like

I did think about the HTTP option but I couldn’t find one that didn’t involve a painful sign up process… Maybe I should make my own with n8n and webhooks :thinking:

2 Likes

Would you be using the Execute Command node (similar to the above workflow)? :eyes:

If I was going to do it I would as it would be the easiest way to get the answer.

1 Like