From 50ee822e8aad957a799e671f4b5bf8c948d7ef22 Mon Sep 17 00:00:00 2001 From: vermaamit1664 Date: Tue, 1 Oct 2024 09:44:11 +0530 Subject: [PATCH 1/5] Create readme.md --- .../Extract JSON Key without Flow Transformation/readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Flow Actions/Extract JSON Key without Flow Transformation/readme.md diff --git a/Flow Actions/Extract JSON Key without Flow Transformation/readme.md b/Flow Actions/Extract JSON Key without Flow Transformation/readme.md new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/Flow Actions/Extract JSON Key without Flow Transformation/readme.md @@ -0,0 +1 @@ + From 2cea4ea965f482f300b00fafd16d9c438af2f52f Mon Sep 17 00:00:00 2001 From: vermaamit1664 Date: Tue, 1 Oct 2024 09:49:48 +0530 Subject: [PATCH 2/5] Update readme.md --- .../Extract JSON Key without Flow Transformation/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Flow Actions/Extract JSON Key without Flow Transformation/readme.md b/Flow Actions/Extract JSON Key without Flow Transformation/readme.md index 8b13789179..4bd2e4cd0b 100644 --- a/Flow Actions/Extract JSON Key without Flow Transformation/readme.md +++ b/Flow Actions/Extract JSON Key without Flow Transformation/readme.md @@ -1 +1,3 @@ +This code will be helpful to those who are looking out to remove HTML tags and convert it to String variable within the Flow Designer. The Replace String transformation function doesn't works well with the HTML variable so to overcome this challenge, we can make use of a Run Script Flow action along with a regex and JavaScript replace method. +The function expects the input HTML string to be passed into and we get a string free from HTML tags and whitespaces as an output. From 6b4d10be9a30035a0e060dcad45ba85710d6148b Mon Sep 17 00:00:00 2001 From: vermaamit1664 Date: Tue, 1 Oct 2024 09:57:15 +0530 Subject: [PATCH 3/5] Create extract-json-key.js Adding js --- .../extract-json-key.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Flow Actions/Extract JSON Key without Flow Transformation/extract-json-key.js diff --git a/Flow Actions/Extract JSON Key without Flow Transformation/extract-json-key.js b/Flow Actions/Extract JSON Key without Flow Transformation/extract-json-key.js new file mode 100644 index 0000000000..2171dd747f --- /dev/null +++ b/Flow Actions/Extract JSON Key without Flow Transformation/extract-json-key.js @@ -0,0 +1,5 @@ +(function execute(inputs, outputs) { +var htmlString = inputs.htmlValue; // Assuming HTML string is stored in the input variable htmlValue +var plainText = htmlString.replace(/<[^>]+>/g,''); // Regex to replace HTML tags +outputs.plainString = plainText.trim(); // Trimming the whitespaces, if any and pushing the string without HTML to output variable plainString +})(inputs, outputs); From 710360633e28d42aa5b84f2ac6789aa4cb126dc3 Mon Sep 17 00:00:00 2001 From: vermaamit1664 Date: Tue, 1 Oct 2024 10:01:27 +0530 Subject: [PATCH 4/5] Rename extract-json-key.js to remove-html-tags.js --- .../{extract-json-key.js => remove-html-tags.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Flow Actions/Extract JSON Key without Flow Transformation/{extract-json-key.js => remove-html-tags.js} (100%) diff --git a/Flow Actions/Extract JSON Key without Flow Transformation/extract-json-key.js b/Flow Actions/Extract JSON Key without Flow Transformation/remove-html-tags.js similarity index 100% rename from Flow Actions/Extract JSON Key without Flow Transformation/extract-json-key.js rename to Flow Actions/Extract JSON Key without Flow Transformation/remove-html-tags.js From c326e6eb018aa22832182c02804c9355c60b0e96 Mon Sep 17 00:00:00 2001 From: vermaamit1664 Date: Tue, 1 Oct 2024 10:03:12 +0530 Subject: [PATCH 5/5] Create Remove HTML Tags from a String in a Flow --- Flow Actions/Remove HTML Tags from a String in a Flow | 1 + 1 file changed, 1 insertion(+) create mode 100644 Flow Actions/Remove HTML Tags from a String in a Flow diff --git a/Flow Actions/Remove HTML Tags from a String in a Flow b/Flow Actions/Remove HTML Tags from a String in a Flow new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/Flow Actions/Remove HTML Tags from a String in a Flow @@ -0,0 +1 @@ +