Öffentliche IP-Adresse der n8n-Instanz abrufen
Dies ist ein Engineering-Bereich Automatisierungsworkflow mit 6 Nodes. Hauptsächlich werden Set, Webhook, Aggregate, HttpRequest, RespondToWebhook und andere Nodes verwendet. Öffentliche IP-Adresse eines n8n-Instances abrufen
- •HTTP Webhook-Endpunkt (wird von n8n automatisch generiert)
- •Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
Verwendete Nodes (6)
Kategorie
{
"id": "OU7CNqiRY4Kbvq1a",
"meta": {
"instanceId": "135b9ed6d0f8a3f531d9011b0173000ad0dac1ffc90258e867f38c270f30c9dc",
"templateCredsSetupCompleted": true
},
"name": "fetch-public-IP-address-for-n8n-instance",
"tags": [],
"nodes": [
{
"id": "1f1aa04c-fde0-4166-a714-451964e45fe5",
"name": "HTTP-Anfrage",
"type": "n8n-nodes-base.httpRequest",
"notes": "request public IP address information as json",
"position": [
300,
-160
],
"parameters": {
"url": "https://api.ipify.org",
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "format",
"value": "json"
}
]
}
},
"executeOnce": false,
"notesInFlow": true,
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "ddb35464-535f-4ce4-a14d-682673690ca0",
"name": "Webhook-Trigger",
"type": "n8n-nodes-base.webhook",
"notes": "simple webhook with header-auth",
"position": [
-140,
-160
],
"webhookId": "4879bc79-d6f8-48df-bfe4-613366c7f399",
"parameters": {
"path": "4879bc79-d6f8-48df-bfe4-613366c7f399",
"options": {},
"responseMode": "responseNode",
"authentication": "headerAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "0K7Eny0GNMoVhKel",
"name": "Header Auth account"
}
},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "a6ac927d-404d-44a7-8268-4609094c1346",
"name": "Auf Webhook-Trigger antworten",
"type": "n8n-nodes-base.respondToWebhook",
"notes": "return an array from the workflow and end the webhook invocation.",
"position": [
740,
-160
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.data.pluck('ip').unique().toJsonString() }}"
},
"executeOnce": true,
"notesInFlow": true,
"typeVersion": 1.2,
"alwaysOutputData": true
},
{
"id": "20a55cc9-fba5-4392-a807-2783db6261bb",
"name": "Haftnotiz",
"type": "n8n-nodes-base.stickyNote",
"position": [
-200,
-300
],
"parameters": {
"width": 1160,
"height": 380,
"content": "## to fetch the public IP address(es) for the hosting n8n instance\n\n* prerequisite: a header-auth credential with a uuid or an arbitrary random string.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n* example invocation\n$ curl -H \"api-key: super-long-api-token\" http://localhost:5678/webhook-test/4879bc79-d6f8-48df-bfe4-613366c7f399\n[\"88.88.88.66\", \"88.88.88.88\"]"
},
"typeVersion": 1
},
{
"id": "908003cf-f012-4bd6-8128-b3238de2507d",
"name": "Aggregieren",
"type": "n8n-nodes-base.aggregate",
"position": [
520,
-160
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "115d0f12-7ee0-4d0d-8086-f462e8bee197",
"name": "Wiederholen",
"type": "n8n-nodes-base.set",
"notes": "Repeat 10 times",
"position": [
80,
-160
],
"parameters": {
"options": {},
"duplicateItem": true,
"duplicateCount": 10
},
"executeOnce": true,
"notesInFlow": true,
"typeVersion": 3.4,
"alwaysOutputData": true
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "ea9c9b26-5362-4ee9-84b0-fae0bf02305c",
"connections": {
"115d0f12-7ee0-4d0d-8086-f462e8bee197": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "115d0f12-7ee0-4d0d-8086-f462e8bee197",
"type": "main",
"index": 0
}
]
]
},
"908003cf-f012-4bd6-8128-b3238de2507d": {
"main": [
[
{
"node": "Auf Webhook antworten",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "908003cf-f012-4bd6-8128-b3238de2507d",
"type": "main",
"index": 0
}
]
]
}
}
}Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Fortgeschritten - Engineering
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
Ger Longstacks
@dims3bodyDevOps expert passionate with automation, be it infrastructure provisioning, cloud operation, or workflow.
Diesen Workflow teilen