n8n-nodes-renderdock 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,29 @@
1
- # Temporary Holding Version
1
+ # n8n-nodes-renderdock
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ RenderDock node for n8n — turn Markdown, HTML, public URLs, or Handlebars templates with JSON data into designed PDF and PNG files, inside any workflow.
4
+
5
+ ## Install
6
+
7
+ In n8n: **Settings → Community Nodes → Install** and enter:
8
+
9
+ ```
10
+ n8n-nodes-renderdock
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ 1. Add a **RenderDock** node to a workflow (search "RenderDock" in the node panel)
16
+ 2. Create credentials: **API Key** (starts with `rd_`) and optional **API URL**
17
+ 3. Pick an input type — Markdown, HTML, URL, or Template + Data — and a format (PDF/PNG)
18
+ 4. The node outputs the file as binary data, ready for Email, Google Drive, or any downstream node
19
+
20
+ Typical workflow: data source → RenderDock (template + data) → Send Email.
21
+
22
+ ## Credentials
23
+
24
+ | Field | Description |
25
+ | --- | --- |
26
+ | API URL | Render endpoint, default `https://api.renderdock.dev/v1/render` |
27
+ | API Key | Your RenderDock API key |
28
+
29
+ Get an API key: https://renderdock.dev · Docs: https://renderdock.dev/docs
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ class RenderDockApi {
4
+ constructor() {
5
+ this.name = "renderdockApi";
6
+ this.displayName = "RenderDock API";
7
+ this.documentationUrl = "https://renderdock.dev/docs/";
8
+ this.properties = [
9
+ {
10
+ displayName: "API URL",
11
+ name: "apiUrl",
12
+ type: "string",
13
+ default: "https://api.renderdock.dev/v1/render",
14
+ description: "The RenderDock render endpoint",
15
+ },
16
+ {
17
+ displayName: "API Key",
18
+ name: "apiKey",
19
+ type: "string",
20
+ typeOptions: { password: true },
21
+ default: "",
22
+ description: "Your RenderDock API key (starts with rd_)",
23
+ },
24
+ ];
25
+ this.authenticate = {
26
+ type: "generic",
27
+ properties: {
28
+ headers: {
29
+ Authorization: "=Bearer {{$credentials.apiKey}}",
30
+ },
31
+ },
32
+ };
33
+ this.test = {
34
+ request: {
35
+ method: "POST",
36
+ url: "={{$credentials.apiUrl}}",
37
+ body: { format: "pdf", markdown: "# RenderDock credential test" },
38
+ },
39
+ };
40
+ }
41
+ }
42
+
43
+ module.exports = { RenderDockApi };
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+
3
+ class RenderDock {
4
+ constructor() {
5
+ this.description = {
6
+ displayName: "RenderDock",
7
+ name: "renderdock",
8
+ icon: "file:renderdock.svg",
9
+ group: ["transform"],
10
+ version: 1,
11
+ subtitle: '={{$parameter["format"]}}',
12
+ description:
13
+ "Render Markdown, HTML, a public URL, or a Handlebars template with data into a PDF or PNG file",
14
+ defaults: { name: "RenderDock" },
15
+ inputs: ["main"],
16
+ outputs: ["main"],
17
+ credentials: [{ name: "renderdockApi", required: true }],
18
+ properties: [
19
+ {
20
+ displayName: "Input Type",
21
+ name: "inputType",
22
+ type: "options",
23
+ options: [
24
+ { name: "Markdown", value: "markdown" },
25
+ { name: "HTML", value: "html" },
26
+ { name: "URL", value: "url" },
27
+ { name: "Template + Data", value: "template" },
28
+ ],
29
+ default: "markdown",
30
+ description: "What to render",
31
+ },
32
+ {
33
+ displayName: "Markdown",
34
+ name: "markdown",
35
+ type: "string",
36
+ typeOptions: { rows: 8 },
37
+ default: "",
38
+ displayOptions: { show: { inputType: ["markdown"] } },
39
+ description: "Markdown source text",
40
+ },
41
+ {
42
+ displayName: "HTML",
43
+ name: "html",
44
+ type: "string",
45
+ typeOptions: { rows: 8 },
46
+ default: "",
47
+ displayOptions: { show: { inputType: ["html"] } },
48
+ description: "Raw HTML",
49
+ },
50
+ {
51
+ displayName: "URL",
52
+ name: "url",
53
+ type: "string",
54
+ default: "",
55
+ displayOptions: { show: { inputType: ["url"] } },
56
+ description: "Public http(s) URL to render",
57
+ },
58
+ {
59
+ displayName: "Template",
60
+ name: "template",
61
+ type: "string",
62
+ typeOptions: { rows: 8 },
63
+ default: "",
64
+ displayOptions: { show: { inputType: ["template"] } },
65
+ description: "Handlebars template",
66
+ },
67
+ {
68
+ displayName: "Data (JSON)",
69
+ name: "data",
70
+ type: "json",
71
+ default: "{}",
72
+ displayOptions: { show: { inputType: ["template"] } },
73
+ description: "Data merged into the template",
74
+ },
75
+ {
76
+ displayName: "Format",
77
+ name: "format",
78
+ type: "options",
79
+ options: [
80
+ { name: "PDF", value: "pdf" },
81
+ { name: "PNG", value: "png" },
82
+ ],
83
+ default: "pdf",
84
+ description: "Output format",
85
+ },
86
+ {
87
+ displayName: "Paper Size",
88
+ name: "paper",
89
+ type: "options",
90
+ options: [
91
+ { name: "A4", value: "A4" },
92
+ { name: "Letter", value: "Letter" },
93
+ { name: "Legal", value: "Legal" },
94
+ { name: "A3", value: "A3" },
95
+ ],
96
+ default: "A4",
97
+ displayOptions: { show: { format: ["pdf"] } },
98
+ description: "Page size for PDF output",
99
+ },
100
+ {
101
+ displayName: "Filename",
102
+ name: "filename",
103
+ type: "string",
104
+ default: "",
105
+ placeholder: "weekly-report",
106
+ description: "Base name for the output file, without extension",
107
+ },
108
+ ],
109
+ };
110
+ }
111
+
112
+ async execute() {
113
+ const inputType = this.getNodeParameter("inputType", 0);
114
+ const format = this.getNodeParameter("format", 0);
115
+ const filename = this.getNodeParameter("filename", 0);
116
+ const credentials = await this.getCredentials("renderdockApi");
117
+ const apiUrl = credentials.apiUrl || "https://api.renderdock.dev/v1/render";
118
+
119
+ const body = { format };
120
+ if (inputType === "markdown") body.markdown = this.getNodeParameter("markdown", 0);
121
+ if (inputType === "html") body.html = this.getNodeParameter("html", 0);
122
+ if (inputType === "url") body.url = this.getNodeParameter("url", 0);
123
+ if (inputType === "template") {
124
+ body.template = this.getNodeParameter("template", 0);
125
+ body.data = this.getNodeParameter("data", 0);
126
+ }
127
+ if (filename) body.filename = filename;
128
+ if (format === "pdf") body.paper = this.getNodeParameter("paper", 0);
129
+
130
+ const response = await this.helpers.httpRequestWithAuthentication.call(
131
+ this,
132
+ "renderdockApi",
133
+ {
134
+ method: "POST",
135
+ url: apiUrl,
136
+ body,
137
+ json: true,
138
+ encoding: null,
139
+ }
140
+ );
141
+
142
+ const buffer = Buffer.isBuffer(response) ? response : Buffer.from(response);
143
+ const mime = format === "pdf" ? "application/pdf" : "image/png";
144
+ const name = `${(filename || "renderdock").replace(/[^a-zA-Z0-9._-]/g, "_")}.${format}`;
145
+ const prepared = await Promise.resolve(
146
+ this.helpers.prepareBinaryData.call(this, buffer, name, mime)
147
+ );
148
+
149
+ return [
150
+ [
151
+ {
152
+ json: { format, filename: name, size: buffer.length },
153
+ binary: { data: prepared },
154
+ },
155
+ ],
156
+ ];
157
+ }
158
+ }
159
+
160
+ module.exports = { RenderDock };
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
2
+ <rect x="6" y="3" width="20" height="26" rx="2" fill="none" stroke="#2e46a5" stroke-width="2"/>
3
+ <line x1="11" y1="9" x2="21" y2="9" stroke="#2e46a5" stroke-width="2"/>
4
+ <line x1="11" y1="14" x2="21" y2="14" stroke="#2e46a5" stroke-width="2"/>
5
+ <line x1="11" y1="19" x2="17" y2="19" stroke="#2e46a5" stroke-width="2"/>
6
+ <polygon points="19,22 25,22 22,26" fill="#2e46a5"/>
7
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
2
  "name": "n8n-nodes-renderdock",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "RenderDock node for n8n — turn Markdown, HTML, URLs, or templates into PDF and PNG files",
5
+ "keywords": [
6
+ "n8n-community-node-package",
7
+ "n8n",
8
+ "pdf",
9
+ "screenshot",
10
+ "render",
11
+ "markdown"
12
+ ],
13
+ "license": "MIT",
14
+ "main": "nodes/RenderDock/RenderDock.node.js",
15
+ "n8n": {
16
+ "n8nNodesApiVersion": 1,
17
+ "nodes": [
18
+ "nodes/RenderDock/RenderDock.node.js"
19
+ ],
20
+ "credentials": [
21
+ "credentials/RenderDockApi.credentials.js"
22
+ ]
23
+ }
24
+ }