n8n-nodes-verifiedworkflows 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.
@@ -0,0 +1,11 @@
1
+ import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class VerifiedWorkflowsApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ preAuthentication(this: any, credentials: any): Promise<any>;
8
+ testApiAuth(this: any, credentials: any): Promise<{
9
+ status: string;
10
+ }>;
11
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VerifiedWorkflowsApi = void 0;
4
+ class VerifiedWorkflowsApi {
5
+ constructor() {
6
+ this.name = 'verifiedWorkflowsApi';
7
+ this.displayName = 'Verified Workflows API';
8
+ this.documentationUrl = 'https://verifiedworkflows.com/api_reference.html';
9
+ this.properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: { password: true },
15
+ required: true,
16
+ default: '',
17
+ description: 'Your Verified Workflows API key (vw_live_xxx). Get one at https://verifiedworkflows.com',
18
+ },
19
+ ];
20
+ }
21
+ async preAuthentication(credentials) {
22
+ return credentials;
23
+ }
24
+ async testApiAuth(credentials) {
25
+ const options = {
26
+ method: 'GET',
27
+ url: 'https://api.verifiedworkflows.com/v1/tasks',
28
+ headers: {
29
+ Authorization: `Bearer ${credentials.apiKey}`,
30
+ },
31
+ json: true,
32
+ };
33
+ const response = await this.helpers.request(options);
34
+ return { status: 'ok' };
35
+ }
36
+ }
37
+ exports.VerifiedWorkflowsApi = VerifiedWorkflowsApi;
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class VerifiedWorkflows implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions, items?: any): Promise<any>;
5
+ }
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VerifiedWorkflows = void 0;
4
+ class VerifiedWorkflows {
5
+ constructor() {
6
+ this.description = {
7
+ displayName: 'Verified Workflows',
8
+ name: 'verifiedWorkflows',
9
+ icon: 'file:verifiedworkflows.svg',
10
+ group: ['transform'],
11
+ version: 1,
12
+ subtitle: '={{$parameter("operation")}}',
13
+ description: 'Human-in-the-loop review for AI outputs',
14
+ defaults: { name: 'Verified Workflows' },
15
+ inputs: ['main'],
16
+ outputs: ['main'],
17
+ credentials: [
18
+ {
19
+ name: 'verifiedWorkflowsApi',
20
+ required: true,
21
+ },
22
+ ],
23
+ properties: [
24
+ {
25
+ displayName: 'Operation',
26
+ name: 'operation',
27
+ type: 'options',
28
+ noDataExpression: true,
29
+ options: [
30
+ {
31
+ name: 'Submit for Review',
32
+ value: 'submit',
33
+ description: 'Submit AI output for certified human review',
34
+ action: 'Submit for review',
35
+ },
36
+ {
37
+ name: 'Get Task Status',
38
+ value: 'getStatus',
39
+ description: 'Check the status of a submitted task',
40
+ action: 'Get task status',
41
+ },
42
+ {
43
+ name: 'Get Review Result',
44
+ value: 'getResult',
45
+ description: 'Get the verified result (corrections, signature)',
46
+ action: 'Get review result',
47
+ },
48
+ ],
49
+ default: 'submit',
50
+ },
51
+ // ── Submit for Review fields ──
52
+ {
53
+ displayName: 'Content',
54
+ name: 'content',
55
+ type: 'string',
56
+ typeOptions: { rows: 4 },
57
+ required: true,
58
+ displayOptions: { show: { operation: ['submit'] } },
59
+ default: '',
60
+ description: 'The AI-generated content to review',
61
+ },
62
+ {
63
+ displayName: 'Review Type',
64
+ name: 'reviewType',
65
+ type: 'options',
66
+ displayOptions: { show: { operation: ['submit'] } },
67
+ options: [
68
+ { name: 'Text QA', value: 'text-qa' },
69
+ { name: 'Medical', value: 'medical' },
70
+ { name: 'Code Review', value: 'code-review' },
71
+ { name: 'Translation', value: 'translation' },
72
+ { name: 'Fact Check', value: 'fact-check' },
73
+ { name: 'Decision Approval', value: 'decision-approval' },
74
+ { name: 'Audio Audit', value: 'audio-audit' },
75
+ { name: 'Data Extraction', value: 'data-extraction' },
76
+ ],
77
+ default: 'text-qa',
78
+ },
79
+ {
80
+ displayName: 'Priority',
81
+ name: 'priority',
82
+ type: 'options',
83
+ displayOptions: { show: { operation: ['submit'] } },
84
+ options: [
85
+ { name: 'Standard (24h)', value: 'standard' },
86
+ { name: 'Express (1-4h)', value: 'express' },
87
+ ],
88
+ default: 'standard',
89
+ },
90
+ {
91
+ displayName: 'Instructions',
92
+ name: 'instructions',
93
+ type: 'string',
94
+ typeOptions: { rows: 2 },
95
+ displayOptions: { show: { operation: ['submit'] } },
96
+ default: '',
97
+ description: 'What the reviewer should check (optional)',
98
+ },
99
+ {
100
+ displayName: 'Callback URL',
101
+ name: 'callbackUrl',
102
+ type: 'string',
103
+ displayOptions: { show: { operation: ['submit'] } },
104
+ default: '',
105
+ description: 'Webhook URL for result delivery (optional)',
106
+ },
107
+ // ── Get Status / Result fields ──
108
+ {
109
+ displayName: 'Task ID',
110
+ name: 'taskId',
111
+ type: 'string',
112
+ required: true,
113
+ displayOptions: { show: { operation: ['getStatus', 'getResult'] } },
114
+ default: '',
115
+ description: 'The task ID (e.g. tsk_live_f8a29)',
116
+ },
117
+ ],
118
+ };
119
+ }
120
+ async execute(items = []) {
121
+ const responseData = [];
122
+ const credentials = await this.getCredentials('verifiedWorkflowsApi');
123
+ const apiKey = credentials.apiKey;
124
+ for (let i = 0; i < items.length; i++) {
125
+ const operation = this.getNodeParameter('operation', i);
126
+ let result;
127
+ if (operation === 'submit') {
128
+ const content = this.getNodeParameter('content', i);
129
+ const reviewType = this.getNodeParameter('reviewType', i);
130
+ const priority = this.getNodeParameter('priority', i);
131
+ const instructions = this.getNodeParameter('instructions', i) || '';
132
+ const callbackUrl = this.getNodeParameter('callbackUrl', i) || '';
133
+ const payload = { content };
134
+ if (callbackUrl)
135
+ payload.callback_url = callbackUrl;
136
+ const body = {
137
+ type: reviewType,
138
+ priority,
139
+ title: content.length > 60 ? content.slice(0, 60) + '...' : content,
140
+ instructions: instructions || `Review this ${reviewType} output for accuracy and safety.`,
141
+ payload,
142
+ };
143
+ result = await this.helpers.httpRequest({
144
+ method: 'POST',
145
+ url: 'https://api.verifiedworkflows.com/v1/tasks',
146
+ headers: {
147
+ Authorization: `Bearer ${apiKey}`,
148
+ 'Content-Type': 'application/json',
149
+ },
150
+ body: body,
151
+ json: true,
152
+ });
153
+ }
154
+ else {
155
+ const taskId = this.getNodeParameter('taskId', i);
156
+ result = await this.helpers.httpRequest({
157
+ method: 'GET',
158
+ url: `https://api.verifiedworkflows.com/v1/tasks/${taskId}`,
159
+ headers: {
160
+ Authorization: `Bearer ${apiKey}`,
161
+ },
162
+ json: true,
163
+ });
164
+ if (operation === 'getResult') {
165
+ if (result.status !== 'completed') {
166
+ result = {
167
+ task_id: taskId,
168
+ status: result.status,
169
+ message: 'Review not completed yet. Check back later.',
170
+ };
171
+ }
172
+ else {
173
+ result = result.result || {};
174
+ }
175
+ }
176
+ }
177
+ responseData.push({ json: result });
178
+ }
179
+ return [responseData];
180
+ }
181
+ }
182
+ exports.VerifiedWorkflows = VerifiedWorkflows;
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "n8n-nodes-verifiedworkflows",
3
+ "version": "0.1.0",
4
+ "description": "Verified Workflows — human-in-the-loop review for AI outputs",
5
+ "keywords": [
6
+ "n8n-community-node-package"
7
+ ],
8
+ "license": "MIT",
9
+ "homepage": "https://verifiedworkflows.com",
10
+ "author": {
11
+ "name": "Verified Workflows",
12
+ "email": "hello@verifiedworkflows.com"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/verifiedworkflows/n8n-nodes.git"
17
+ },
18
+ "main": "dist/index.js",
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "dev": "tsc --watch",
22
+ "lint": "eslint nodes credentials",
23
+ "test": "jest"
24
+ },
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "n8n": {
29
+ "n8nNodesApiVersion": 1,
30
+ "credentials": [
31
+ "dist/credentials/VerifiedWorkflowsApi.credentials.js"
32
+ ],
33
+ "nodes": [
34
+ "dist/nodes/VerifiedWorkflows.node.js"
35
+ ]
36
+ },
37
+ "devDependencies": {
38
+ "typescript": "^5.5.0",
39
+ "@types/node": "^20.0.0",
40
+ "n8n-workflow": "^1.0.0"
41
+ },
42
+ "peerDependencies": {
43
+ "n8n-workflow": "^1.0.0"
44
+ }
45
+ }