fetch the public IP addresses of your n8n instance

Węzły

3b9f1b78-6b80-4575-aa6c-9669870003899dd572aa-e531-4ffe-a66c-58ac7003ac5d2cf69bf8-d025-41db-983e-898d5f3acf5a1c04dd23-ae91-4772-b6db-e7ce81fc2f71

Kategorie

Tagi

Stworzone przez

GeGer Longstacks

Ostatnio edytowane 8 dni temu

Why

If you need to use n8n to connect to service providers of yours, some of which happen to rely on firewall white-listing as part of their access control, you'll need to determine or verify the public IP addresses of your n8n instance(s).

How does it work

  • The webhook, upon invocation, will use Http Request node to request public IP address information from ++api.ipify.org++ in json format, for 10 times, then aggregate results to an array.
    • The reason to repeat, is to get all the potential public IP addresses of your n8n instance.
    • Often than not, enterprises or network providers deploy at least a pair of gateway devices at the border for redundancy.
  • built-in array functions in a javascript expression are used to pluck all the values under 'ip' key, and to dedup to an array as response body.

How to set it up

  • import the workflow
  • set up your own header-auth credential
  • update the workflow to use the new credential
  • test or activate workflow as usual.

example invocation

$ curl -H "api-key: super-long-api-token" http://localhost:5678/webhook-test/4879bc79-d6f8-48df-bfe4-613366c7f399
["88.88.88.66", "88.88.88.88"]

Nowy w Świecie n8n?

Potrzebujesz pomocy przy budowie nowych schematów n8n? Automatyzajce procesów dla Ciebie lub Twojej firmy pozwolą oszczędzić ci czas i pieniądze, a do tego bez żadnych kosztów!