Scenario to copy:
{
"dataType": "nodes",
"nodes": [
{
"id": "64cf4d512677da624b0b7ec4",
"title": "",
"description": "",
"localId": "1",
"typeId": "62cc22317ae28c026d25692d",
"params": [
{
"key": "path",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "createYourOwnUrl",
"text": "createYourOwnUrl",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"coords": {
"x": 142,
"y": 10
},
"calculatedNodeType": {
"id": "",
"name": "",
"alias": "",
"description": "",
"params": [
{
"key": "path",
"title": "Адрес",
"type": "string",
"required": true,
"description": "Webhook can hold a connection for no more than 100 seconds.",
"options": {
"string": {
"maxLength": 128,
"minLength": 1,
"copiable": true,
"prefix": "<https://webhook.latenode.com/18/>",
"prefixes": [
"<https://webhook.latenode.com/18/dev/>",
"<https://webhook.latenode.com/18/prod/>"
],
"fetchOn": []
},
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "35c5632c-821f-42cf-aec6-11f761a88473",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"systemInfo": null,
"icon": null,
"purposes": [],
"isPublic": false
},
"alias": "webhook"
},
{
"id": "64cf4d512677da624b0b7ec5",
"title": "Google NLP",
"description": "",
"localId": "2",
"typeId": "62cc22317ae28c026d25692f",
"params": [
{
"key": "body",
"type": "text",
"value": {
"stringToString": [],
"int": "0",
"string": "{\\"document\\": {\\"content\\": {{4.result}},\\"type\\": \\"PLAIN_TEXT\\",\\"language\\": \\"en\\"},\\"classificationModelOptions\\": {\\"v2Model\\": {\\"contentCategoriesVersion\\": \\"V2\\"}}}",
"text": "{\\"document\\": {\\"content\\": {{4.result}},\\"type\\": \\"PLAIN_TEXT\\",\\"language\\": \\"en\\"},\\"classificationModelOptions\\": {\\"v2Model\\": {\\"contentCategoriesVersion\\": \\"V2\\"}}}",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "url",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "<https://language.googleapis.com/v1/documents:classifyText?key=Insert_Your_Key_Here>",
"text": "<https://language.googleapis.com/v1/documents:classifyText?key=Insert_Your_Key_Here>",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "method",
"type": "select",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [
"POST"
],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "post_params",
"type": "string_to_string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "headers",
"type": "string_to_string",
"value": {
"stringToString": [
{
"key": "Accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "post_params_urlencoded",
"type": "string_to_string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "basic_auth_username",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "basic_auth_password",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "digest_auth_username",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "digest_auth_password",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "ntlm_auth_username",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "ntlm_auth_password",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "ntlm_auth_domain",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "hide_all",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "http_proxy_address",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "http_proxy_login",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "http_proxy_password",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"coords": {
"x": 508,
"y": 10
},
"calculatedNodeType": {
"id": "",
"name": "",
"alias": "",
"description": "",
"params": [
{
"key": "body",
"title": "Body",
"type": "text",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "url",
"title": "Url",
"type": "string",
"required": true,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "method",
"title": "Http method",
"type": "select",
"required": true,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": {
"options": [
{
"key": "POST",
"value": "POST"
}
],
"multiple": false,
"fetchOn": [],
"withLabel": false
},
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [
"GET"
],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "post_params",
"title": "POST params",
"type": "string_to_string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "headers",
"title": "Http headers",
"type": "string_to_string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "post_params_urlencoded",
"title": "x-www-form-urlencoded",
"type": "string_to_string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "basic_auth_username",
"title": "Basic Auth Username",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "basic_auth_password",
"title": "Basic Auth Password",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "digest_auth_username",
"title": "Digest Auth Username",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "digest_auth_password",
"title": "Digest Auth Password",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "ntlm_auth_username",
"title": "NTLM Auth Username",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "ntlm_auth_password",
"title": "NTLM Auth Password",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "ntlm_auth_domain",
"title": "NTLM Auth Domain",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "hide_all",
"title": "Hide All",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "http_proxy_address",
"title": "Proxy Address",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "http_proxy_login",
"title": "Proxy Login",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "http_proxy_password",
"title": "Proxy Password",
"type": "string",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": null,
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"systemInfo": null,
"icon": null,
"purposes": [],
"isPublic": false
},
"alias": "http_request"
},
{
"id": "64cf4d512677da624b0b7ec6",
"title": "",
"description": "",
"localId": "3",
"typeId": "62cc22317ae28c026d25692e",
"params": [
{
"key": "status",
"type": "int",
"value": {
"stringToString": [],
"int": "200",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "headers",
"type": "string_to_string",
"value": {
"stringToString": [
{
"key": "content-type",
"value": "text/html"
}
],
"int": "0",
"string": "",
"text": "",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "body",
"type": "text",
"value": {
"stringToString": [],
"int": "0",
"string": "<!DOCTYPE html>\\n<html>\\n<head>\\n <title>Keywords NLP for URL</title>\\n<style>\\n </style>\\n</head>\\n<body>\\n<h2>Made with <a target=\\"_blank\\" href=\\"<https://latenode.com/?utm_source=wh_google_classify_url\\>">low-code platform Latenode.com</a></h2>\\n{{6.table}}\\n\\n</body>\\n</html>",
"text": "<!DOCTYPE html>\\n<html>\\n<head>\\n <title>Keywords NLP for URL</title>\\n<style>\\n </style>\\n</head>\\n<body>\\n<h2>Made with <a target=\\"_blank\\" href=\\"<https://latenode.com/?utm_source=wh_google_classify_url\\>">low-code platform Latenode.com</a></h2>\\n{{6.table}}\\n\\n</body>\\n</html>",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"coords": {
"x": 764,
"y": 11
},
"calculatedNodeType": {
"id": "",
"name": "",
"alias": "",
"description": "",
"params": [],
"systemInfo": null,
"icon": null,
"purposes": [],
"isPublic": false
},
"alias": "respond_to_webhook"
},
{
"id": "64cf4d512677da624b0b7ec7",
"title": "Prepare Data",
"description": "",
"localId": "4",
"typeId": "62cc22317ae28c026d256930",
"params": [
{
"key": "code",
"type": "text",
"value": {
"stringToString": [],
"int": "0",
"string": "// Exporting the main asynchronous function, which accepts an object containing execution_id, input, and data.\\nexport default async function run({ execution_id, input, data }) {\\n\\n\\t// A function that takes HTML as input and converts it to a single line string.\\n\\t// This involves replacing newline characters with spaces, removing carriage returns, and trimming whitespace.\\n\\t// It also removes special characters and limits the string length to 10000 characters.\\n\\tfunction convertToSingleLine(html) {\\n\\t\\t// Replacing newline characters with spaces and carriage returns with spaces.\\n\\t\\tvar singleLineHtml = html.replace(/\\\\n/g, ' ').replace(/\\\\r/g, ' ').trim();\\n\\t\\t\\n\\t\\t// Removing any character that is not an alphanumeric or a space.\\n\\t\\tsingleLineHtml = removeSpecialChars(singleLineHtml);\\n\\n\\t\\t// Limiting the single-line HTML string to 10000 characters.\\n\\t\\tsingleLineHtml = limitToXChars(singleLineHtml, 10000);\\n\\n\\t\\t// Converting the HTML string to JSON format.\\n\\t\\treturn JSON.stringify(singleLineHtml);\\n\\t}\\n\\n\\t// A function to limit a given input string to a specific number of characters (limit).\\n\\tfunction limitToXChars(input, limit) {\\n\\t\\t// If the input string length is greater than the limit, it's truncated to the limit.\\n\\t\\t// Otherwise, the original string is returned.\\n\\t\\tif (input.length > limit) {\\n\\t\\t\\treturn input.substring(0, limit);\\n\\t\\t} else {\\n\\t\\t\\treturn input;\\n\\t\\t}\\n\\t}\\n\\n\\t// A function that removes any character that is not alphanumeric or a space from the input string.\\n\\tfunction removeSpecialChars(str) {\\n\\t\\treturn str.replace(/[^a-zA-Z0-9 ]/g, \\"\\");\\n\\t}\\n\\n\\t// Calling the convertToSingleLine function and passing data from a specific result key.\\n\\t// The key is not clear from the code; ensure it's correctly defined elsewhere in your code.\\n\\tlet result = convertToSingleLine(data[\\"{{5.result}}\\"]);\\n\\n\\t// Returning an object containing the result.\\n\\treturn {\\n\\t\\tresult\\n\\t}\\n}\\n",
"text": "// Exporting the main asynchronous function, which accepts an object containing execution_id, input, and data.\\nexport default async function run({ execution_id, input, data }) {\\n\\n\\t// A function that takes HTML as input and converts it to a single line string.\\n\\t// This involves replacing newline characters with spaces, removing carriage returns, and trimming whitespace.\\n\\t// It also removes special characters and limits the string length to 10000 characters.\\n\\tfunction convertToSingleLine(html) {\\n\\t\\t// Replacing newline characters with spaces and carriage returns with spaces.\\n\\t\\tvar singleLineHtml = html.replace(/\\\\n/g, ' ').replace(/\\\\r/g, ' ').trim();\\n\\t\\t\\n\\t\\t// Removing any character that is not an alphanumeric or a space.\\n\\t\\tsingleLineHtml = removeSpecialChars(singleLineHtml);\\n\\n\\t\\t// Limiting the single-line HTML string to 10000 characters.\\n\\t\\tsingleLineHtml = limitToXChars(singleLineHtml, 10000);\\n\\n\\t\\t// Converting the HTML string to JSON format.\\n\\t\\treturn JSON.stringify(singleLineHtml);\\n\\t}\\n\\n\\t// A function to limit a given input string to a specific number of characters (limit).\\n\\tfunction limitToXChars(input, limit) {\\n\\t\\t// If the input string length is greater than the limit, it's truncated to the limit.\\n\\t\\t// Otherwise, the original string is returned.\\n\\t\\tif (input.length > limit) {\\n\\t\\t\\treturn input.substring(0, limit);\\n\\t\\t} else {\\n\\t\\t\\treturn input;\\n\\t\\t}\\n\\t}\\n\\n\\t// A function that removes any character that is not alphanumeric or a space from the input string.\\n\\tfunction removeSpecialChars(str) {\\n\\t\\treturn str.replace(/[^a-zA-Z0-9 ]/g, \\"\\");\\n\\t}\\n\\n\\t// Calling the convertToSingleLine function and passing data from a specific result key.\\n\\t// The key is not clear from the code; ensure it's correctly defined elsewhere in your code.\\n\\tlet result = convertToSingleLine(data[\\"{{5.result}}\\"]);\\n\\n\\t// Returning an object containing the result.\\n\\treturn {\\n\\t\\tresult\\n\\t}\\n}\\n",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"coords": {
"x": 386,
"y": 9
},
"calculatedNodeType": {
"id": "",
"name": "",
"alias": "",
"description": "",
"params": [
{
"key": "code",
"title": "",
"type": "text",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": {
"lang": "js",
"prefix": "",
"suffix": "",
"fetchOn": []
},
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "export default async function run({execution_id, input, data}) {\\n\\treturn {\\n\\t\\t\\n\\t}\\n}\\n",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"systemInfo": null,
"icon": null,
"purposes": [],
"isPublic": false
},
"alias": "js_code"
},
{
"id": "64cf4d512677da624b0b7ec8",
"title": "Convert HTML to Text",
"description": "",
"localId": "5",
"typeId": "646f2584f0f512203b36b27b",
"params": [
{
"key": "website_url",
"type": "text",
"value": {
"stringToString": [],
"int": "0",
"string": "{{1.query.url}}",
"text": "{{1.query.url}}",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
},
{
"key": "selectors",
"type": "string",
"value": {
"stringToString": [],
"int": "0",
"string": "false",
"text": "false",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"coords": {
"x": 268,
"y": 9
},
"calculatedNodeType": {
"id": "",
"name": "",
"alias": "",
"description": "",
"params": [],
"systemInfo": null,
"icon": null,
"purposes": [],
"isPublic": false
},
"alias": "__nodul_646f250b36e3df9a2b08a60e_prod"
},
{
"id": "64cf4d512677da624b0b7ec9",
"title": "Prepare Result",
"description": "",
"localId": "6",
"typeId": "62cc22317ae28c026d256930",
"params": [
{
"key": "code",
"type": "text",
"value": {
"stringToString": [],
"int": "0",
"string": "// Exporting an asynchronous function that takes an object containing execution_id, input, and data.\\nexport default async function run({ execution_id, input, data }) {\\n\\n\\t// A function to convert a JSON string into an HTML table.\\n\\t// The JSON should represent an array of objects, each with properties \\"confidence\\" and \\"name\\".\\n\\tfunction jsonToTable(json) {\\n\\t\\t// Parsing the input JSON string into a JavaScript object.\\n\\t\\tjson = JSON.parse(json);\\n\\n\\t\\t// Starting the HTML table with a specific style and column headers.\\n\\t\\tlet table = '<table border=\\"0\\" style=\\"border-collapse: collapse; border: none;\\"><tr><th>Confidence</th><th>Name</th></tr>';\\n\\n\\t\\t// Iterating through the array of objects contained in the JSON.\\n\\t\\tfor (let i = 0; i < json.length; i++) {\\n\\t\\t\\t// Adding a row for each object, with cells for the \\"confidence\\" and \\"name\\" properties.\\n\\t\\t\\t// The \\"confidence\\" value is formatted to two decimal places.\\n\\t\\t\\ttable += '<tr><td style=\\"padding:5px; border: 1px solid silver\\">' + parseFloat(json[i].confidence).toFixed(2) + '</td><td style=\\"padding:5px; border: 1px solid silver\\">' + json[i].name + '</td></tr>';\\n\\t\\t}\\n\\n\\t\\t// Closing the HTML table tag.\\n\\t\\ttable += '</table>';\\n\\n\\t\\t// Returning the complete HTML table string.\\n\\t\\treturn table;\\n\\t}\\n\\n\\t// Calling the jsonToTable function and passing data from the key \\"{{2.body.`categories`}}\\".\\n\\t// Ensure that this key corresponds to a JSON string representing an array of objects.\\n\\tlet table = jsonToTable(data[\\"{{2.body.`categories`}}\\"]);\\n\\n\\t// Returning an object containing the HTML table.\\n\\treturn {\\n\\t\\ttable\\n\\t}\\n}\\n",
"text": "// Exporting an asynchronous function that takes an object containing execution_id, input, and data.\\nexport default async function run({ execution_id, input, data }) {\\n\\n\\t// A function to convert a JSON string into an HTML table.\\n\\t// The JSON should represent an array of objects, each with properties \\"confidence\\" and \\"name\\".\\n\\tfunction jsonToTable(json) {\\n\\t\\t// Parsing the input JSON string into a JavaScript object.\\n\\t\\tjson = JSON.parse(json);\\n\\n\\t\\t// Starting the HTML table with a specific style and column headers.\\n\\t\\tlet table = '<table border=\\"0\\" style=\\"border-collapse: collapse; border: none;\\"><tr><th>Confidence</th><th>Name</th></tr>';\\n\\n\\t\\t// Iterating through the array of objects contained in the JSON.\\n\\t\\tfor (let i = 0; i < json.length; i++) {\\n\\t\\t\\t// Adding a row for each object, with cells for the \\"confidence\\" and \\"name\\" properties.\\n\\t\\t\\t// The \\"confidence\\" value is formatted to two decimal places.\\n\\t\\t\\ttable += '<tr><td style=\\"padding:5px; border: 1px solid silver\\">' + parseFloat(json[i].confidence).toFixed(2) + '</td><td style=\\"padding:5px; border: 1px solid silver\\">' + json[i].name + '</td></tr>';\\n\\t\\t}\\n\\n\\t\\t// Closing the HTML table tag.\\n\\t\\ttable += '</table>';\\n\\n\\t\\t// Returning the complete HTML table string.\\n\\t\\treturn table;\\n\\t}\\n\\n\\t// Calling the jsonToTable function and passing data from the key \\"{{2.body.`categories`}}\\".\\n\\t// Ensure that this key corresponds to a JSON string representing an array of objects.\\n\\tlet table = jsonToTable(data[\\"{{2.body.`categories`}}\\"]);\\n\\n\\t// Returning an object containing the HTML table.\\n\\treturn {\\n\\t\\ttable\\n\\t}\\n}\\n",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"coords": {
"x": 633,
"y": 10
},
"calculatedNodeType": {
"id": "",
"name": "",
"alias": "",
"description": "",
"params": [
{
"key": "code",
"title": "",
"type": "text",
"required": false,
"description": "",
"options": {
"string": null,
"int": null,
"text": {
"lang": "js",
"prefix": "",
"suffix": "",
"fetchOn": []
},
"stringToString": null,
"select": null,
"stringArray": null,
"bool": null
},
"default": {
"stringToString": [],
"int": "0",
"string": "",
"text": "export default async function run({execution_id, input, data}) {\\n\\treturn {\\n\\t\\t\\n\\t}\\n}\\n",
"select": [],
"constructorParams": [],
"custom": "",
"stringArray": [],
"bool": false,
"multiselect": []
}
}
],
"systemInfo": null,
"icon": null,
"purposes": [],
"isPublic": false
},
"alias": "js_code"
}
],
"edges": [
{
"id": "64cf4d512677da624b0b7ec9-64cf4d512677da624b0b7ec6-output",
"source": "64cf4d512677da624b0b7ec9",
"target": "64cf4d512677da624b0b7ec6",
"type": "scenarioRoute",
"sourceHandle": "output",
"targetHandler": "input",
"data": {
"route": {
"condition": {
"type": "",
"expression": {
"value": ""
}
},
"label": "",
"nodeId": "64cf4d512677da624b0b7ec6",
"localNodeId": ""
},
"sourceNode": {
"typeId": "62cc22317ae28c026d256930",
"localId": "6"
},
"targetNode": {
"typeId": "62cc22317ae28c026d25692e",
"localId": "3"
}
},
"selected": true
},
{
"id": "64cf4d512677da624b0b7ec8-64cf4d512677da624b0b7ec7-output",
"source": "64cf4d512677da624b0b7ec8",
"target": "64cf4d512677da624b0b7ec7",
"type": "scenarioRoute",
"sourceHandle": "output",
"targetHandler": "input",
"data": {
"route": {
"condition": {
"type": "",
"expression": {
"value": ""
}
},
"label": "",
"nodeId": "64cf4d512677da624b0b7ec7",
"localNodeId": ""
},
"sourceNode": {
"typeId": "646f2584f0f512203b36b27b",
"localId": "5"
},
"targetNode": {
"typeId": "62cc22317ae28c026d256930",
"localId": "4"
}
},
"selected": true
},
{
"id": "64cf4d512677da624b0b7ec7-64cf4d512677da624b0b7ec5-output",
"source": "64cf4d512677da624b0b7ec7",
"target": "64cf4d512677da624b0b7ec5",
"type": "scenarioRoute",
"sourceHandle": "output",
"targetHandler": "input",
"data": {
"route": {
"condition": {
"type": "",
"expression": {
"value": ""
}
},
"label": "",
"nodeId": "64cf4d512677da624b0b7ec5",
"localNodeId": ""
},
"sourceNode": {
"typeId": "62cc22317ae28c026d256930",
"localId": "4"
},
"targetNode": {
"typeId": "62cc22317ae28c026d25692f",
"localId": "2"
}
},
"selected": true
},
{
"id": "64cf4d512677da624b0b7ec4-64cf4d512677da624b0b7ec8-output",
"source": "64cf4d512677da624b0b7ec4",
"target": "64cf4d512677da624b0b7ec8",
"type": "scenarioRoute",
"sourceHandle": "output",
"targetHandler": "input",
"data": {
"route": {
"condition": {
"type": "",
"expression": {
"value": ""
}
},
"label": "",
"nodeId": "64cf4d512677da624b0b7ec8",
"localNodeId": ""
},
"sourceNode": {
"typeId": "62cc22317ae28c026d25692d",
"localId": "1"
},
"targetNode": {
"typeId": "646f2584f0f512203b36b27b",
"localId": "5"
}
},
"selected": true
},
{
"id": "64cf4d512677da624b0b7ec5-64cf4d512677da624b0b7ec9-output",
"source": "64cf4d512677da624b0b7ec5",
"target": "64cf4d512677da624b0b7ec9",
"type": "scenarioRoute",
"sourceHandle": "output",
"targetHandler": "input",
"data": {
"route": {
"condition": {
"type": "",
"expression": {
"value": ""
}
},
"label": "",
"nodeId": "64cf4d512677da624b0b7ec9",
"localNodeId": ""
},
"sourceNode": {
"typeId": "62cc22317ae28c026d25692f",
"localId": "2"
},
"targetNode": {
"typeId": "62cc22317ae28c026d256930",
"localId": "6"
}
},
"selected": true
}
]
}