82 lines
3.1 KiB
JSON
82 lines
3.1 KiB
JSON
{
|
||
"updatedAt": "2025-11-23T09:05:43.000Z",
|
||
"createdAt": "2025-11-21T10:47:00.974Z",
|
||
"id": "gfx8s7OTuVkoPgLf",
|
||
"name": "My workflow 5",
|
||
"active": false,
|
||
"isArchived": false,
|
||
"nodes": [
|
||
{
|
||
"parameters": {},
|
||
"type": "n8n-nodes-base.manualTrigger",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
0,
|
||
0
|
||
],
|
||
"id": "d03e6c29-dd54-4c2f-adac-5c26d9083197",
|
||
"name": "When clicking ‘Execute workflow’"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"operation": "runCustomScript",
|
||
"scriptCode": "// 1. Wir erstellen eine leere Liste (\"Array\"), um die Logs zu sammeln\nconst collectedLogs = [];\n\n// 2. Wir sagen Puppeteer: \"Jedes Mal, wenn die Seite was loggt, pack es in unsere Liste\"\n$page.on('console', message => {\n // message.type() ist z.B. 'log', 'warning', 'error'\n // message.text() ist der eigentliche Text\n collectedLogs.push(`[${message.type()}] ${message.text()}`);\n});\n\n// Navigate to an IP lookup service\nawait $page.goto('https://httpbin.org/ip');\n\n// Extract the IP address from the page content\nconst ipData = await $page.evaluate(() => {\n const response = document.body.innerText;\n const parsed = JSON.parse(response);\n console.log(\"test\")\n return parsed.origin; // Extract the 'origin' field, which typically contains the IP address\n});\n\nconsole.log(\"Hello, world!\");\n\nconsole.log(\"IP Address\", ipData);\n\n// Return the result in the required format\nreturn [{ ip: ipData, ...$json }, ];",
|
||
"options": {
|
||
"launchArguments": {
|
||
"args": [
|
||
{
|
||
"arg": "--no-sandbox"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"type": "CUSTOM.puppeteer",
|
||
"typeVersion": 1,
|
||
"position": [
|
||
400,
|
||
-64
|
||
],
|
||
"id": "3cab4381-dd2c-44ec-b8da-8781539aa847",
|
||
"name": "Puppeteer"
|
||
},
|
||
{
|
||
"parameters": {
|
||
"options": {}
|
||
},
|
||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||
"typeVersion": 3,
|
||
"position": [
|
||
144,
|
||
144
|
||
],
|
||
"id": "5145064c-f4b3-495a-996e-82dbc9aae1b4",
|
||
"name": "AI Agent"
|
||
}
|
||
],
|
||
"connections": {
|
||
"When clicking ‘Execute workflow’": {
|
||
"main": [
|
||
[]
|
||
]
|
||
}
|
||
},
|
||
"settings": {
|
||
"executionOrder": "v1"
|
||
},
|
||
"staticData": null,
|
||
"meta": null,
|
||
"pinData": {},
|
||
"versionId": "23b58b4b-bcf7-44ea-a03c-74045d5ad73f",
|
||
"triggerCount": 0,
|
||
"shared": [
|
||
{
|
||
"updatedAt": "2025-11-21T10:47:00.977Z",
|
||
"createdAt": "2025-11-21T10:47:00.977Z",
|
||
"role": "workflow:owner",
|
||
"workflowId": "gfx8s7OTuVkoPgLf",
|
||
"projectId": "S4tmpzSj6JlGFOze"
|
||
}
|
||
],
|
||
"tags": []
|
||
} |