diff --git a/Specialized Areas/Flow Actions/Get KB Article Permalink/README.md b/Specialized Areas/Flow Actions/Get KB Article Permalink/README.md new file mode 100644 index 0000000000..03b30f754d --- /dev/null +++ b/Specialized Areas/Flow Actions/Get KB Article Permalink/README.md @@ -0,0 +1,10 @@ +# Get KB Article Permalink +Flow Action which will take KB Article Number as input and returns the latest version of Permalink. This URL will stay constant always even if the KB Article is updated with new version. + +**Input** : KB Article Number (Type : String) + +**Script Step** : Generates the Permalink URL for KB Article (see the script.js file in this folder) + +**Output** : Permalink (Type : URL) + +**Usage** : This can be used in multiple scenarios where the KB Article Link/URL is required. It can either be in notifications, scripts, Integrations, etc. Since this Permalink is always fixed and works even if the KB Article is updated to new version, there is no maintainance required. diff --git a/Specialized Areas/Flow Actions/Get KB Article Permalink/script.js b/Specialized Areas/Flow Actions/Get KB Article Permalink/script.js new file mode 100644 index 0000000000..ebf1504395 --- /dev/null +++ b/Specialized Areas/Flow Actions/Get KB Article Permalink/script.js @@ -0,0 +1,7 @@ +(function execute(inputs, outputs) { + + var instanceURL = gs.getProperty('glide.servlet.uri').toString(); + var permalink = instanceURL + 'kb?id=kb_article_view&sysparm_article=' + inputs.kb_number; + outputs.kb_article_permalink = permalink; + +})(inputs, outputs);