Skip to content

Commit 42554c3

Browse files
authored
IQ: Add subflow Convert SVG image to HTML
1 parent 1c2b353 commit 42554c3

File tree

2 files changed

+162
-0
lines changed

2 files changed

+162
-0
lines changed
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
{
2+
"runbook": {
3+
"id": "8bcc8de0-c902-4a06-b9e7-df4186e4ba40",
4+
"createdTime": "1763480562.175808100",
5+
"lastUpdatedTime": "1763480819.966090500",
6+
"factoryResourceName": null,
7+
"isFactory": false,
8+
"name": "Convert SVG image to HTML Image",
9+
"description": "Skill that converts an image in SVG format into an HTML Image tag (img)",
10+
"isReady": false,
11+
"triggerType": "subflow_input",
12+
"runtimeVariables": null,
13+
"subflowVariables": {
14+
"primitiveVariables": [
15+
{
16+
"type": "string",
17+
"defaultValue": null,
18+
"name": "subflow.SVG",
19+
"isReadonly": false
20+
},
21+
{
22+
"type": "string",
23+
"defaultValue": null,
24+
"name": "subflow.Image_HTML",
25+
"isReadonly": false
26+
}
27+
],
28+
"structuredVariables": []
29+
},
30+
"nodes": [
31+
{
32+
"id": "ae93dcc6-dcd5-47cf-8ebd-51303d3a1a3a",
33+
"isIntegrationSubflowNode": false,
34+
"type": "subflow_input",
35+
"label": "Subflow Input",
36+
"description": "",
37+
"properties": {
38+
"x": 321,
39+
"y": 160,
40+
"triggerType": "subflow_input",
41+
"debug": false,
42+
"outputDataFormat": "summary",
43+
"synthKeys": [],
44+
"inputVariables": [
45+
"subflow.SVG"
46+
],
47+
"outputVariables": [
48+
"subflow.Image_HTML"
49+
],
50+
"integrationIds": {},
51+
"tagIds": {},
52+
"staticInputValuesLists": {
53+
"subflow.SVG": []
54+
},
55+
"inputOrOutputValuesDescriptions": []
56+
},
57+
"wires": [
58+
[
59+
"6efb3d4e-033f-40d4-9dc1-89739465f32a"
60+
]
61+
]
62+
},
63+
{
64+
"id": "9dd06d09-f534-4685-a141-0150cd1cacb3",
65+
"isIntegrationSubflowNode": false,
66+
"type": "comment",
67+
"label": "Comment",
68+
"description": "",
69+
"properties": {
70+
"x": 50,
71+
"y": 105,
72+
"comment": "<p dir=\"ltr\" class=\"editor-paragraph\"><b><strong style=\"white-space: pre-wrap;\" class=\"editor-text-bold\">Input</strong></b></p><p dir=\"ltr\" class=\"editor-paragraph\"><span style=\"white-space: pre-wrap;\">SVG: an image in SVG format</span></p><p class=\"editor-paragraph\"><br></p><p dir=\"ltr\" class=\"editor-paragraph\"><b><strong style=\"white-space: pre-wrap;\" class=\"editor-text-bold\">Output</strong></b></p><p dir=\"ltr\" class=\"editor-paragraph\"><span style=\"white-space: pre-wrap;\">Image_HTML: img tag for HTML document</span></p>",
73+
"debug": false
74+
},
75+
"wires": []
76+
},
77+
{
78+
"id": "60008192-19a4-49ac-997d-04f90d37594f",
79+
"isIntegrationSubflowNode": false,
80+
"type": "comment",
81+
"label": "Comment 1",
82+
"description": "",
83+
"properties": {
84+
"x": 333,
85+
"y": 300,
86+
"comment": "<p dir=\"ltr\" class=\"editor-paragraph\"><span style=\"white-space: pre-wrap;\">SVG sample for testing:</span></p><p class=\"editor-paragraph\"><br></p><p dir=\"ltr\" class=\"editor-paragraph\"><span style=\"white-space: pre-wrap;\">&lt;svg width=\"100\" height=\"100\"&gt;</span></p><p dir=\"ltr\" class=\"editor-paragraph\"><span style=\"white-space: pre-wrap;\">&nbsp; &lt;circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"red\"/&gt;</span></p><p dir=\"ltr\" class=\"editor-paragraph\"><span style=\"white-space: pre-wrap;\">&lt;/svg&gt;</span></p>",
87+
"debug": false
88+
},
89+
"wires": []
90+
},
91+
{
92+
"id": "6efb3d4e-033f-40d4-9dc1-89739465f32a",
93+
"isIntegrationSubflowNode": false,
94+
"type": "set_primitive_variables",
95+
"label": "Convert",
96+
"description": "",
97+
"properties": {
98+
"x": 529,
99+
"y": 160,
100+
"variables": [
101+
{
102+
"name": "subflow.Image_HTML"
103+
}
104+
],
105+
"transformTemplate": "{% comment %}\nConvert the SVG to an HTML img tag \n{% endcomment %}\n{\n \"subflow.Image_HTML\": \"<img src='data:image/svg+xml;base64,{{variables[\"subflow.SVG\"] | base64_encode}}' >\"\n}",
106+
"debug": false
107+
},
108+
"wires": [
109+
[
110+
"1f456947-2f64-4e67-a66c-3e86be2fbf5e"
111+
]
112+
]
113+
},
114+
{
115+
"id": "1f456947-2f64-4e67-a66c-3e86be2fbf5e",
116+
"isIntegrationSubflowNode": false,
117+
"type": "subflow_output",
118+
"label": "Subflow Output",
119+
"description": "",
120+
"properties": {
121+
"x": 755,
122+
"y": 160,
123+
"index": 0
124+
},
125+
"wires": []
126+
}
127+
],
128+
"lastUpdatedUser": "Runbook Export",
129+
"createdByUser": "Runbook Export",
130+
"eTag": "W/\"datetime'2025-11-18T15%3A46%3A59.971042Z'\"",
131+
"variant": "subflow",
132+
"seriesId": "8bcc8de0-c902-4a06-b9e7-df4186e4ba40",
133+
"version": "1.0",
134+
"otherVersions": null,
135+
"isScheduled": false,
136+
"isValidated": true,
137+
"isProprietary": false
138+
},
139+
"dependencies": [],
140+
"token": "hHiU5mO9PCmcIZBdtCXvABhUr6lsfIdDtS+pIyYkz1g="
141+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Convert SVG image to HTML
2+
3+
Skill that converts an image in SVG format into an HTML image tag (img)
4+
5+
## Setup
6+
7+
1. Download the [subflow file](Convert%20SVG%20image%20to%20HTML.json)
8+
9+
2. Go to *Automation*, *Subflows*, and hit **Import**.
10+
11+
## How to use
12+
13+
Use this subflow inside a runbook and configure the node.
14+
15+
Set the SVG image you want to convert in the node input `SVG`, and assign the output `Image_HTML` to a runbook variable that you can then use in other nodes (e.g. visualization node or send message node).
16+
17+
### License
18+
19+
Copyright (c) 2025 Riverbed Technology, Inc.
20+
21+
The contents provided here are licensed under the terms and conditions of the MIT License accompanying the software ("License"). The scripts are distributed "AS IS" as set forth in the License. The script also include certain third party code. All such third party code is also distributed "AS IS" and is licensed by the respective copyright holders under the applicable terms and conditions (including, without limitation, warranty and liability disclaimers) identified in the license notices accompanying the software.

0 commit comments

Comments
 (0)