PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 8.8.1
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v8.8.1
8.8.1 8.8.0 8.7.9 8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 All 537 releases
chatbot / addons / automator / src / constants / templates.js

templates.js in WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services 8.8.1, at addons/automator/src/constants/templates.js

2,018 lines 69.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { appsMetadata as apps } from "./appsMetadata";
2
3 const findApp = (id) => apps.find(app => app.id === id);
4
5 export const templates = [
6 {
7 id: "wpforms-to-sheets",
8 name: "WPForms to Google Sheets",
9 description: "Automatically save WPForms submissions to a Google Spreadsheet.",
10 icon: "F",
11 iconBg: "bg-orange-500",
12 workflow_data: {
13 nodes: [
14 {
15 id: "node-trigger-1",
16 type: "trigger",
17 title: "WPForms",
18 subtitle: "Form submitted",
19 position: { x: 100, y: 200 },
20 icon: "F",
21 iconBg: "bg-orange-500",
22 actionNumber: 1,
23 appData: findApp("wpforms")
24 },
25 {
26 id: "node-action-1",
27 type: "action",
28 title: "Google Sheets",
29 subtitle: "Add Row (Save Form Data)",
30 position: { x: 500, y: 200 },
31 icon: "GS",
32 iconBg: "bg-green-600",
33 actionNumber: 2,
34 appData: findApp("google_sheets")
35 }
36 ],
37 connections: [
38 {
39 id: "conn-1",
40 from: "node-trigger-1",
41 to: "node-action-1",
42 fromHandle: "right",
43 toHandle: "left"
44 }
45 ]
46 }
47 },
48 {
49 id: "cf7-to-sheets",
50 name: "Contact Form 7 to Google Sheets",
51 description: "Automatically save Contact Form 7 submissions to a Google Spreadsheet.",
52 icon: "C7",
53 iconBg: "bg-black",
54 workflow_data: {
55 nodes: [
56 {
57 id: "node-trigger-1",
58 type: "trigger",
59 title: "Contact Form 7",
60 subtitle: "Form submitted",
61 position: { x: 100, y: 200 },
62 icon: "C7",
63 iconBg: "bg-black",
64 actionNumber: 1,
65 appData: findApp("cf7")
66 },
67 {
68 id: "node-action-1",
69 type: "action",
70 title: "Google Sheets",
71 subtitle: "Add Row (Save Form Data)",
72 position: { x: 500, y: 200 },
73 icon: "GS",
74 iconBg: "bg-green-600",
75 actionNumber: 2,
76 appData: findApp("google_sheets")
77 }
78 ],
79 connections: [
80 {
81 id: "conn-1",
82 from: "node-trigger-1",
83 to: "node-action-1",
84 fromHandle: "right",
85 toHandle: "left"
86 }
87 ]
88 }
89 },
90 {
91 id: "woocommerce-to-sheets-whatsapp",
92 name: "WooCommerce Orders to Google Sheet + WhatsApp",
93 description: "Save each WooCommerce order item to Google Sheets and notify the customer on WhatsApp.",
94 isPro: true,
95 icon: "WC",
96 iconBg: "bg-purple-600",
97 workflow_data: {
98 nodes: [
99 {
100 id: "node-trigger-1",
101 type: "trigger",
102 title: "WooCommerce",
103 subtitle: "Order created",
104 position: { x: 100, y: 200 },
105 icon: "WC",
106 iconBg: "bg-purple-600",
107 actionNumber: 1,
108 appData: findApp("woocommerce")
109 },
110 {
111 id: "node-action-1",
112 type: "action",
113 title: "Iterator",
114 subtitle: "Loop through order items",
115 position: { x: 340, y: 200 },
116 icon: "↻",
117 iconBg: "bg-amber-500",
118 actionNumber: 2,
119 appData: findApp("iterator")
120 },
121 {
122 id: "node-action-2",
123 type: "action",
124 title: "Google Sheets",
125 subtitle: "Add Row (Order Item)",
126 position: { x: 580, y: 200 },
127 icon: "GS",
128 iconBg: "bg-green-600",
129 actionNumber: 3,
130 appData: findApp("google_sheets")
131 },
132 {
133 id: "node-action-3",
134 type: "action",
135 title: "Iterator End",
136 subtitle: "End loop",
137 position: { x: 820, y: 200 },
138 icon: "⏹",
139 iconBg: "bg-amber-700",
140 actionNumber: 4,
141 appData: findApp("iterator_end")
142 },
143 {
144 id: "node-action-4",
145 type: "action",
146 title: "WhatsApp",
147 subtitle: "Send Message to Customer",
148 position: { x: 1060, y: 200 },
149 icon: "WA",
150 iconBg: "bg-green-500",
151 actionNumber: 5,
152 appData: findApp("whatsapp")
153 }
154 ],
155 connections: [
156 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
157 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
158 { id: "conn-3", from: "node-action-2", to: "node-action-3", fromHandle: "right", toHandle: "left" },
159 { id: "conn-4", from: "node-action-3", to: "node-action-4", fromHandle: "right", toHandle: "left" }
160 ]
161 }
162 },
163 {
164 id: "facebook-leads-to-sheets",
165 name: "Facebook Lead Ads to Google Sheets",
166 description: "Add a new row to Google Spreadsheets for every new lead from Facebook Lead Ads.",
167 icon: "fb",
168 iconBg: "bg-blue-600",
169 workflow_data: {
170 nodes: [
171 {
172 id: "node-trigger-1",
173 type: "trigger",
174 title: "Facebook",
175 subtitle: "Facebook Lead Ads",
176 position: { x: 100, y: 200 },
177 icon: "fb",
178 iconBg: "bg-blue-600",
179 actionNumber: 1,
180 appData: findApp("facebook")
181 },
182 {
183 id: "node-action-1",
184 type: "action",
185 title: "Google Sheets",
186 subtitle: "Add Row (Lead Data)",
187 position: { x: 500, y: 200 },
188 icon: "GS",
189 iconBg: "bg-green-600",
190 actionNumber: 2,
191 appData: findApp("google_sheets")
192 }
193 ],
194 connections: [
195 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" }
196 ]
197 }
198 },
199 {
200 id: "fluent-forms-mailrefine-sheets",
201 name: "Fluent Forms + MailRefine to Google Sheets",
202 description: "Verify email submitted in Fluent Forms using MailRefine, then add the details to Google Sheets.",
203 icon: "FF",
204 iconBg: "bg-green-600",
205 workflow_data: {
206 nodes: [
207 {
208 id: "node-trigger-1",
209 type: "trigger",
210 title: "Fluent Forms",
211 subtitle: "Form submitted",
212 position: { x: 100, y: 200 },
213 icon: "FF",
214 iconBg: "bg-green-600",
215 actionNumber: 1,
216 appData: findApp("fluent_forms")
217 },
218 {
219 id: "node-action-1",
220 type: "action",
221 title: "MailRefine",
222 subtitle: "Verify Email",
223 position: { x: 400, y: 200 },
224 icon: "MR",
225 iconBg: "bg-violet-600",
226 actionNumber: 2,
227 appData: findApp("mailrefine")
228 },
229 {
230 id: "node-action-2",
231 type: "action",
232 title: "Google Sheets",
233 subtitle: "Add Row (Form Data)",
234 position: { x: 700, y: 200 },
235 icon: "GS",
236 iconBg: "bg-green-600",
237 actionNumber: 3,
238 appData: findApp("google_sheets")
239 }
240 ],
241 connections: [
242 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
243 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" }
244 ]
245 }
246 },
247 {
248 id: "cf7-to-fluentcrm-sheets",
249 name: "Contact Form 7 to FluentCRM + Google Sheets",
250 description: "Create a new contact in FluentCRM and add a row in Google Sheets on every Contact Form 7 submission.",
251 icon: "C7",
252 iconBg: "bg-black",
253 workflow_data: {
254 nodes: [
255 {
256 id: "node-trigger-1",
257 type: "trigger",
258 title: "Contact Form 7",
259 subtitle: "Form submitted",
260 position: { x: 100, y: 200 },
261 icon: "C7",
262 iconBg: "bg-black",
263 actionNumber: 1,
264 appData: findApp("cf7")
265 },
266 {
267 id: "node-action-1",
268 type: "action",
269 title: "FluentCRM",
270 subtitle: "Create/Update Contact",
271 position: { x: 400, y: 200 },
272 icon: "FC",
273 iconBg: "bg-blue-700",
274 actionNumber: 2,
275 appData: findApp("fluentcrm")
276 },
277 {
278 id: "node-action-2",
279 type: "action",
280 title: "Google Sheets",
281 subtitle: "Add Row (Form Data)",
282 position: { x: 700, y: 200 },
283 icon: "GS",
284 iconBg: "bg-green-600",
285 actionNumber: 3,
286 appData: findApp("google_sheets")
287 }
288 ],
289 connections: [
290 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
291 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" }
292 ]
293 }
294 },
295 {
296 id: "wpforms-mailrefine-filters-sheets",
297 name: "WPForms + MailRefine + Filters to Google Sheets",
298 description: "Validate the email from a WPForms submission with MailRefine, filter on the result, then add a row to Google Sheets.",
299 icon: "F",
300 iconBg: "bg-orange-500",
301 workflow_data: {
302 nodes: [
303 {
304 id: "node-trigger-1",
305 type: "trigger",
306 title: "WPForms",
307 subtitle: "Form submitted",
308 position: { x: 100, y: 200 },
309 icon: "F",
310 iconBg: "bg-orange-500",
311 actionNumber: 1,
312 appData: findApp("wpforms")
313 },
314 {
315 id: "node-action-1",
316 type: "action",
317 title: "MailRefine",
318 subtitle: "Verify Email",
319 position: { x: 380, y: 200 },
320 icon: "MR",
321 iconBg: "bg-violet-600",
322 actionNumber: 2,
323 appData: findApp("mailrefine")
324 },
325 {
326 id: "node-action-2",
327 type: "action",
328 title: "Filters",
329 subtitle: "Filter / Condition",
330 position: { x: 660, y: 200 },
331 icon: "FT",
332 iconBg: "bg-yellow-500",
333 actionNumber: 3,
334 appData: findApp("filters")
335 },
336 {
337 id: "node-action-3",
338 type: "action",
339 title: "Google Sheets",
340 subtitle: "Add Row (Form Data)",
341 position: { x: 940, y: 200 },
342 icon: "GS",
343 iconBg: "bg-green-600",
344 actionNumber: 4,
345 appData: findApp("google_sheets")
346 }
347 ],
348 connections: [
349 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
350 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
351 { id: "conn-3", from: "node-action-2", to: "node-action-3", fromHandle: "right", toHandle: "left" }
352 ]
353 }
354 },
355 {
356 id: "wp-post-to-social-media",
357 name: "WP Post to FB, Insta, LinkedIn + Google Sheets + Telegram",
358 description: "On WordPress post publish: generate AI-optimised posts for each platform, publish to Facebook, Instagram, LinkedIn and Telegram, then save post info to Google Sheets.",
359 isPro: true,
360 icon: "W",
361 iconBg: "bg-blue-600",
362 workflow_data: {
363 nodes: [
364 {
365 id: "node-trigger-1",
366 type: "trigger",
367 title: "WordPress",
368 subtitle: "Post / Page published",
369 position: { x: 100, y: 320 },
370 icon: "W",
371 iconBg: "bg-blue-600",
372 actionNumber: 1,
373 appData: findApp("wordpress")
374 },
375 {
376 id: "node-action-1",
377 type: "action",
378 title: "WordPress",
379 subtitle: "Generate Social Posts (FB & Telegram)",
380 position: { x: 380, y: 320 },
381 icon: "W",
382 iconBg: "bg-blue-600",
383 actionNumber: 2,
384 appData: findApp("wordpress")
385 },
386 {
387 id: "node-action-2",
388 type: "action",
389 title: "Facebook",
390 subtitle: "Create Page Post",
391 position: { x: 680, y: 80 },
392 icon: "fb",
393 iconBg: "bg-blue-600",
394 actionNumber: 3,
395 appData: findApp("facebook")
396 },
397 {
398 id: "node-action-3",
399 type: "action",
400 title: "Telegram",
401 subtitle: "Send Message",
402 position: { x: 680, y: 240 },
403 icon: "Tg",
404 iconBg: "bg-blue-500",
405 actionNumber: 4,
406 appData: findApp("telegram")
407 },
408 {
409 id: "node-action-4",
410 type: "action",
411 title: "WordPress",
412 subtitle: "Generate Social Posts (Insta, WhatsApp, LinkedIn)",
413 position: { x: 680, y: 400 },
414 icon: "W",
415 iconBg: "bg-blue-600",
416 actionNumber: 5,
417 appData: findApp("wordpress")
418 },
419 {
420 id: "node-action-5",
421 type: "action",
422 title: "Instagram",
423 subtitle: "Publish Photo",
424 position: { x: 980, y: 240 },
425 icon: "Ig",
426 iconBg: "bg-pink-500",
427 actionNumber: 6,
428 appData: findApp("instagram")
429 },
430 {
431 id: "node-action-6",
432 type: "action",
433 title: "LinkedIn",
434 subtitle: "Create Text Post",
435 position: { x: 980, y: 400 },
436 icon: "In",
437 iconBg: "bg-sky-600",
438 actionNumber: 7,
439 appData: findApp("linkedin")
440 },
441 {
442 id: "node-action-7",
443 type: "action",
444 title: "Google Sheets",
445 subtitle: "Add Row (Post Info)",
446 position: { x: 980, y: 560 },
447 icon: "GS",
448 iconBg: "bg-green-600",
449 actionNumber: 8,
450 appData: findApp("google_sheets")
451 }
452 ],
453 connections: [
454 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
455 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
456 { id: "conn-3", from: "node-action-1", to: "node-action-3", fromHandle: "right", toHandle: "left" },
457 { id: "conn-4", from: "node-action-1", to: "node-action-4", fromHandle: "right", toHandle: "left" },
458 { id: "conn-5", from: "node-action-4", to: "node-action-5", fromHandle: "right", toHandle: "left" },
459 { id: "conn-6", from: "node-action-4", to: "node-action-6", fromHandle: "right", toHandle: "left" },
460 { id: "conn-7", from: "node-action-4", to: "node-action-7", fromHandle: "right", toHandle: "left" }
461 ]
462 }
463 },
464 {
465 id: "sub-workflow-email-validation",
466 name: "Sub-Workflow: Extract Email",
467 description: "A reusable sub-workflow that extracts an email address from text using regex and returns it.",
468 icon: "WF",
469 iconBg: "bg-teal-600",
470 workflow_data: {
471 nodes: [
472 {
473 id: "node-trigger-1",
474 type: "trigger",
475 title: "Workflows",
476 subtitle: "Sub-Workflow Trigger",
477 position: { x: 100, y: 200 },
478 icon: "WF",
479 iconBg: "bg-teal-600",
480 actionNumber: 1,
481 appData: findApp("workflow")
482 },
483 {
484 id: "node-action-1",
485 type: "action",
486 title: "Text Formatter",
487 subtitle: "Extract Email",
488 position: { x: 400, y: 200 },
489 icon: "T",
490 iconBg: "bg-teal-600",
491 actionNumber: 2,
492 appData: findApp("text_formatter"),
493 data: {
494 actionId: "extract_pattern",
495 config: {
496 text: "{raw_text}",
497 pattern: "/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/i"
498 }
499 }
500 },
501 {
502 id: "node-action-2",
503 type: "action",
504 title: "Workflows",
505 subtitle: "Return Values",
506 position: { x: 700, y: 200 },
507 icon: "WF",
508 iconBg: "bg-teal-600",
509 actionNumber: 3,
510 appData: findApp("workflow"),
511 data: {
512 actionId: "return_values",
513 config: {
514 values: [
515 { key: "email", value: "{node-action-1.output}" },
516 { key: "is_valid", value: "true" }
517 ]
518 }
519 }
520 }
521 ],
522 connections: [
523 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
524 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" }
525 ]
526 }
527 },
528 {
529 id: "parent-workflow-google-forms",
530 name: "Google Forms to MailChimp via Sub-Workflow",
531 description: "Calls a sub-workflow to extract email from form data, then adds the subscriber to MailChimp.",
532 icon: "WF",
533 iconBg: "bg-teal-600",
534 workflow_data: {
535 nodes: [
536 {
537 id: "node-trigger-1",
538 type: "trigger",
539 title: "Webhook",
540 subtitle: "Incoming Webhook",
541 position: { x: 100, y: 200 },
542 icon: "W",
543 iconBg: "bg-violet-600",
544 actionNumber: 1,
545 appData: findApp("webhook")
546 },
547 {
548 id: "node-action-1",
549 type: "action",
550 title: "Workflows",
551 subtitle: "Call Sub-Workflow",
552 position: { x: 400, y: 200 },
553 icon: "WF",
554 iconBg: "bg-teal-600",
555 actionNumber: 2,
556 appData: findApp("workflow"),
557 data: {
558 actionId: "call_sub_workflow",
559 config: {
560 inputs: [
561 { key: "raw_text", value: "{contact_field}" }
562 ]
563 }
564 }
565 },
566 {
567 id: "node-action-2",
568 type: "action",
569 title: "Filters",
570 subtitle: "Only if Valid",
571 position: { x: 700, y: 200 },
572 icon: "FT",
573 iconBg: "bg-yellow-500",
574 actionNumber: 3,
575 appData: findApp("filters"),
576 data: {
577 actionId: "filter_condition",
578 config: {
579 field: "{node-action-1.is_valid}",
580 operator: "equals",
581 value: "true"
582 }
583 }
584 },
585 {
586 id: "node-action-3",
587 type: "action",
588 title: "MailChimp",
589 subtitle: "Add Subscriber",
590 position: { x: 1000, y: 200 },
591 icon: "MC",
592 iconBg: "bg-yellow-400",
593 actionNumber: 4,
594 appData: findApp("mailchimp"),
595 data: {
596 actionId: "add_subscriber",
597 config: {
598 email: "{node-action-1.email}"
599 }
600 }
601 }
602 ],
603 connections: [
604 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
605 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
606 { id: "conn-3", from: "node-action-2", to: "node-action-3", fromHandle: "right", toHandle: "left" }
607 ]
608 }
609 },
610 {
611 id: "wc-review-followup-whatsapp",
612 name: "Post-Purchase Review Follow-up (WhatsApp)",
613 description: "5 days after an order is marked Completed, automatically send a WhatsApp template message asking the customer for a product review.",
614 isPro: true,
615 icon: "WA",
616 iconBg: "bg-green-500",
617 workflow_data: {
618 nodes: [
619 {
620 id: "node-trigger-1",
621 type: "trigger",
622 title: "WooCommerce",
623 subtitle: "Order Status → Completed",
624 position: { x: 100, y: 200 },
625 icon: "WC",
626 iconBg: "bg-purple-600",
627 actionNumber: 1,
628 appData: findApp("woocommerce"),
629 data: {
630 actionId: "wc_order_status_change",
631 config: {
632 new_status: "completed"
633 }
634 }
635 },
636 {
637 id: "node-action-1",
638 type: "action",
639 title: "Delay",
640 subtitle: "Wait 5 Days",
641 position: { x: 380, y: 200 },
642 icon: "⏱",
643 iconBg: "bg-slate-500",
644 actionNumber: 2,
645 appData: findApp("delay"),
646 data: {
647 actionId: "delay_execution",
648 config: {
649 delay_amount: "5",
650 delay_unit: "days"
651 }
652 }
653 },
654 {
655 id: "node-action-2",
656 type: "action",
657 title: "WhatsApp",
658 subtitle: "Send Template Message",
659 position: { x: 660, y: 200 },
660 icon: "WA",
661 iconBg: "bg-green-500",
662 actionNumber: 3,
663 appData: findApp("whatsapp"),
664 data: {
665 actionId: "wa_send_template",
666 config: {
667 phone_number_id: "",
668 to: "{billing_phone}",
669 template_name: "order_review_request",
670 language_code: "en_US",
671 body_parameters: "{billing_name}\n{order_id}"
672 }
673 }
674 }
675 ],
676 connections: [
677 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
678 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" }
679 ]
680 }
681 },
682 {
683 id: "wc-order-completed-whatsapp-message",
684 name: "Order Completed – WhatsApp Thank You + Tracking",
685 description: "Instantly send a personalised WhatsApp message with order details and a thank-you note when an order is marked Completed.",
686 isPro: true,
687 icon: "WA",
688 iconBg: "bg-green-500",
689 workflow_data: {
690 nodes: [
691 {
692 id: "node-trigger-1",
693 type: "trigger",
694 title: "WooCommerce",
695 subtitle: "Order Status → Completed",
696 position: { x: 100, y: 200 },
697 icon: "WC",
698 iconBg: "bg-purple-600",
699 actionNumber: 1,
700 appData: findApp("woocommerce"),
701 data: {
702 actionId: "wc_order_status_change",
703 config: {
704 new_status: "completed"
705 }
706 }
707 },
708 {
709 id: "node-action-1",
710 type: "action",
711 title: "WhatsApp",
712 subtitle: "Send Thank You + Tracking Message",
713 position: { x: 420, y: 200 },
714 icon: "WA",
715 iconBg: "bg-green-500",
716 actionNumber: 2,
717 appData: findApp("whatsapp"),
718 data: {
719 actionId: "wa_send_message",
720 config: {
721 phone_number_id: "",
722 to: "{billing_phone}",
723 message: "Hi {billing_name} 👋\n\nThank you for your order! 🎉\n\nYour order *#{order_id}* has been completed and is on its way.\n\n📦 *Order Summary:*\n{items}\n\n💰 *Total:* {total} {currency}\n\nIf you have any questions, just reply to this message. We appreciate your business! 🙏\n\n— Your Store Team"
724 }
725 }
726 }
727 ],
728 connections: [
729 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" }
730 ]
731 }
732 },
733 {
734 id: "wc-order-completed-whatsapp-template",
735 name: "Order Completed – WhatsApp Template Message (Tracking)",
736 description: "Send a pre-approved WhatsApp template message with tracking info and a thank-you note the moment an order is completed. Best for high-volume stores requiring Meta compliance.",
737 isPro: true,
738 icon: "WA",
739 iconBg: "bg-green-500",
740 workflow_data: {
741 nodes: [
742 {
743 id: "node-trigger-1",
744 type: "trigger",
745 title: "WooCommerce",
746 subtitle: "Order Status → Completed",
747 position: { x: 100, y: 200 },
748 icon: "WC",
749 iconBg: "bg-purple-600",
750 actionNumber: 1,
751 appData: findApp("woocommerce"),
752 data: {
753 actionId: "wc_order_status_change",
754 config: {
755 new_status: "completed"
756 }
757 }
758 },
759 {
760 id: "node-action-1",
761 type: "action",
762 title: "WhatsApp",
763 subtitle: "Send Template: Order Completed",
764 position: { x: 420, y: 200 },
765 icon: "WA",
766 iconBg: "bg-green-500",
767 actionNumber: 2,
768 appData: findApp("whatsapp"),
769 data: {
770 actionId: "wa_send_template",
771 config: {
772 phone_number_id: "",
773 to: "{billing_phone}",
774 template_name: "order_completed_notification",
775 language_code: "en_US",
776 body_parameters: "{billing_name}\n{order_id}\n{total} {currency}"
777 }
778 }
779 }
780 ],
781 connections: [
782 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" }
783 ]
784 }
785 },
786
787 // ─── Template #1/6: Form-Based Lead to WhatsApp Alert ───────────────────────
788 {
789 id: "wpforms-lead-to-whatsapp-alert",
790 name: "WPForms Lead to WhatsApp Alert + User Creation",
791 description: "When a high-priority lead submits a WPForms form, instantly alert the sales team via WhatsApp and optionally create a new WordPress user.",
792 isPro: true,
793 icon: "F",
794 iconBg: "bg-orange-500",
795 workflow_data: {
796 nodes: [
797 {
798 id: "node-trigger-1",
799 type: "trigger",
800 title: "WPForms",
801 subtitle: "Form submitted",
802 position: { x: 100, y: 200 },
803 icon: "F",
804 iconBg: "bg-orange-500",
805 actionNumber: 1,
806 appData: findApp("wpforms"),
807 data: {
808 actionId: "wpforms_submit",
809 config: { form_id: "" }
810 }
811 },
812 {
813 id: "node-action-1",
814 type: "action",
815 title: "Filters",
816 subtitle: "High-Priority Lead Check",
817 position: { x: 380, y: 200 },
818 icon: "FT",
819 iconBg: "bg-yellow-500",
820 actionNumber: 2,
821 appData: findApp("filters"),
822 data: {
823 actionId: "filter_condition",
824 config: {
825 field: "{service_type}",
826 operator: "contains",
827 value: "enterprise"
828 }
829 }
830 },
831 {
832 id: "node-action-2",
833 type: "action",
834 title: "WhatsApp",
835 subtitle: "Alert Sales Team",
836 position: { x: 660, y: 120 },
837 icon: "WA",
838 iconBg: "bg-green-500",
839 actionNumber: 3,
840 appData: findApp("whatsapp"),
841 data: {
842 actionId: "wa_send_template",
843 config: {
844 phone_number_id: "",
845 to: "{admin_whatsapp_number}",
846 template_name: "new_lead_alert",
847 language_code: "en_US",
848 body_parameters: "{your-name}\n{your-email}\n{service_type}\n{budget}"
849 }
850 }
851 },
852 {
853 id: "node-action-3",
854 type: "action",
855 title: "WordPress",
856 subtitle: "Create New User",
857 position: { x: 660, y: 300 },
858 icon: "W",
859 iconBg: "bg-blue-600",
860 actionNumber: 4,
861 appData: findApp("wordpress"),
862 data: {
863 actionId: "wp_create_user",
864 config: {
865 user_email: "{your-email}",
866 user_login: "{your-email}",
867 first_name: "{your-name}",
868 role: "subscriber"
869 }
870 }
871 }
872 ],
873 connections: [
874 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
875 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
876 { id: "conn-3", from: "node-action-1", to: "node-action-3", fromHandle: "right", toHandle: "left" }
877 ]
878 }
879 },
880
881 // ─── Template #4: External Inventory / Price Sync via JSON ──────────────────
882 {
883 id: "webhook-json-woocommerce-sync",
884 name: "External Inventory & Price Sync via JSON Webhook",
885 description: "Receive a supplier JSON payload via webhook, parse it with JSON Parser, and automatically update the matching WooCommerce product's price or stock.",
886 isPro: true,
887 icon: "{}",
888 iconBg: "bg-yellow-600",
889 workflow_data: {
890 nodes: [
891 {
892 id: "node-trigger-1",
893 type: "trigger",
894 title: "Webhook",
895 subtitle: "Incoming Webhook",
896 position: { x: 100, y: 200 },
897 icon: "W",
898 iconBg: "bg-violet-600",
899 actionNumber: 1,
900 appData: findApp("webhook"),
901 data: {
902 actionId: "incoming_webhook",
903 config: {}
904 }
905 },
906 {
907 id: "node-action-1",
908 type: "action",
909 title: "JSON Parser",
910 subtitle: "Parse Supplier Payload",
911 position: { x: 380, y: 200 },
912 icon: "{}",
913 iconBg: "bg-yellow-600",
914 actionNumber: 2,
915 appData: findApp("json_parser"),
916 data: {
917 actionId: "parse_json_text",
918 config: {
919 json_text: "{body}"
920 }
921 }
922 },
923 {
924 id: "node-action-2",
925 type: "action",
926 title: "WooCommerce",
927 subtitle: "Update Product Price / Stock",
928 position: { x: 660, y: 200 },
929 icon: "WC",
930 iconBg: "bg-purple-600",
931 actionNumber: 3,
932 appData: findApp("woocommerce"),
933 data: {
934 actionId: "wc_update_product",
935 config: {
936 product_id: "{product_id}",
937 regular_price: "{price}",
938 stock_quantity: "{stock}"
939 }
940 }
941 }
942 ],
943 connections: [
944 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
945 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" }
946 ]
947 }
948 },
949
950 // ─── Template #9: Scrape Content to WordPress Post ──────────────────────────
951 {
952 id: "scrape-to-wp-post",
953 name: "Scrape Webpage & Publish AI-Rewritten WordPress Post",
954 description: "Triggered by an incoming webhook with a URL, fetches and parses the webpage, rewrites the content with AI, then saves it as a WordPress draft post.",
955 isPro: true,
956 icon: "🌐",
957 iconBg: "bg-teal-500",
958 workflow_data: {
959 nodes: [
960 {
961 id: "node-trigger-1",
962 type: "trigger",
963 title: "Webhook",
964 subtitle: "Incoming Webhook (with URL)",
965 position: { x: 100, y: 200 },
966 icon: "W",
967 iconBg: "bg-violet-600",
968 actionNumber: 1,
969 appData: findApp("webhook"),
970 data: {
971 actionId: "incoming_webhook",
972 config: {}
973 }
974 },
975 {
976 id: "node-action-1",
977 type: "action",
978 title: "Webpage Parser",
979 subtitle: "Fetch & Parse URL",
980 position: { x: 380, y: 200 },
981 icon: "🌐",
982 iconBg: "bg-teal-500",
983 actionNumber: 2,
984 appData: findApp("webpage_parser"),
985 data: {
986 actionId: "parse_webpage_url",
987 config: {
988 webpage_url: "{url}"
989 }
990 }
991 },
992 {
993 id: "node-action-2",
994 type: "action",
995 title: "OpenAI",
996 subtitle: "Rewrite Content",
997 position: { x: 660, y: 200 },
998 icon: "OA",
999 iconBg: "bg-emerald-600",
1000 actionNumber: 3,
1001 appData: findApp("openai"),
1002 data: {
1003 actionId: "chat_completion",
1004 config: {
1005 model: "gpt-4o-mini",
1006 prompt: "You are a professional content writer. Rewrite the following article in your own words, ensuring it is original, SEO-friendly, and engaging. Return a JSON object with two keys: \"title\" (a compelling post title) and \"content\" (the full HTML body of the rewritten article).\n\nOriginal Title: {node-action-1.title}\n\nOriginal Content:\n{node-action-1.content}",
1007 max_tokens: 2000,
1008 temperature: 0.7
1009 }
1010 }
1011 },
1012 {
1013 id: "node-action-3",
1014 type: "action",
1015 title: "WordPress",
1016 subtitle: "Create Draft Post",
1017 position: { x: 940, y: 200 },
1018 icon: "W",
1019 iconBg: "bg-blue-600",
1020 actionNumber: 4,
1021 appData: findApp("wordpress"),
1022 data: {
1023 actionId: "wp_create_post",
1024 config: {
1025 post_title: "{node-action-2.title}",
1026 post_content: "{node-action-2.content}",
1027 post_status: "draft"
1028 }
1029 }
1030 }
1031 ],
1032 connections: [
1033 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
1034 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
1035 { id: "conn-3", from: "node-action-2", to: "node-action-3", fromHandle: "right", toHandle: "left" }
1036 ]
1037 }
1038 },
1039
1040 // ─── Template #10: Smart Lead Qualifier & CRM Router ────────────────────────
1041 {
1042 id: "smart-lead-qualifier-crm-router",
1043 name: "Smart Lead Qualifier & CRM Router (AI)",
1044 description: "WPForms lead submission is analysed by AI to determine lead value. High-value leads get a VIP tag in FluentCRM and an instant WhatsApp alert; low-value leads are added to a nurture sequence.",
1045 isPro: true,
1046 icon: "OA",
1047 iconBg: "bg-emerald-600",
1048 workflow_data: {
1049 nodes: [
1050 {
1051 id: "node-trigger-1",
1052 type: "trigger",
1053 title: "WPForms",
1054 subtitle: "Form submitted",
1055 position: { x: 100, y: 260 },
1056 icon: "F",
1057 iconBg: "bg-orange-500",
1058 actionNumber: 1,
1059 appData: findApp("wpforms"),
1060 data: {
1061 actionId: "wpforms_submit",
1062 config: { form_id: "" }
1063 }
1064 },
1065 {
1066 id: "node-action-1",
1067 type: "action",
1068 title: "OpenAI",
1069 subtitle: "Qualify Lead Intent & Value",
1070 position: { x: 380, y: 260 },
1071 icon: "OA",
1072 iconBg: "bg-emerald-600",
1073 actionNumber: 2,
1074 appData: findApp("openai"),
1075 data: {
1076 actionId: "chat_completion",
1077 config: {
1078 model: "gpt-4o-mini",
1079 prompt: "Analyse this lead submission and respond with ONLY a JSON object (no markdown) containing two keys:\n- \"tier\": either \"high\" or \"low\"\n- \"budget\": the numeric budget mentioned (0 if not stated)\n\nLead Message: {message}\nBudget Field: {budget}\nService: {service_type}",
1080 max_tokens: 100,
1081 temperature: 0.2
1082 }
1083 }
1084 },
1085 {
1086 id: "node-action-2",
1087 type: "action",
1088 title: "Filters",
1089 subtitle: "High-Value Lead?",
1090 position: { x: 660, y: 140 },
1091 icon: "FT",
1092 iconBg: "bg-yellow-500",
1093 actionNumber: 3,
1094 appData: findApp("filters"),
1095 data: {
1096 actionId: "filter_condition",
1097 config: {
1098 field: "{node-action-1.tier}",
1099 operator: "equals",
1100 value: "high"
1101 }
1102 }
1103 },
1104 {
1105 id: "node-action-3",
1106 type: "action",
1107 title: "FluentCRM",
1108 subtitle: "Add VIP Tag & Create Contact",
1109 position: { x: 940, y: 80 },
1110 icon: "FC",
1111 iconBg: "bg-blue-700",
1112 actionNumber: 4,
1113 appData: findApp("fluentcrm"),
1114 data: {
1115 actionId: "create_contact",
1116 config: {
1117 email: "{your-email}",
1118 first_name: "{your-name}",
1119 status: "subscribed",
1120 tags: "VIP, high-value"
1121 }
1122 }
1123 },
1124 {
1125 id: "node-action-4",
1126 type: "action",
1127 title: "WhatsApp",
1128 subtitle: "Alert Sales Team (VIP Lead)",
1129 position: { x: 940, y: 220 },
1130 icon: "WA",
1131 iconBg: "bg-green-500",
1132 actionNumber: 5,
1133 appData: findApp("whatsapp"),
1134 data: {
1135 actionId: "wa_send_message",
1136 config: {
1137 phone_number_id: "",
1138 to: "{admin_whatsapp_number}",
1139 message: "🔥 *VIP Lead Alert!*\n\nName: {your-name}\nEmail: {your-email}\nService: {service_type}\nBudget: {node-action-1.budget}\n\nRespond within 1 hour for best conversion!"
1140 }
1141 }
1142 },
1143 {
1144 id: "node-action-5",
1145 type: "action",
1146 title: "Filters",
1147 subtitle: "Low-Value Lead?",
1148 position: { x: 660, y: 380 },
1149 icon: "FT",
1150 iconBg: "bg-yellow-500",
1151 actionNumber: 6,
1152 appData: findApp("filters"),
1153 data: {
1154 actionId: "filter_condition",
1155 config: {
1156 field: "{node-action-1.tier}",
1157 operator: "equals",
1158 value: "low"
1159 }
1160 }
1161 },
1162 {
1163 id: "node-action-6",
1164 type: "action",
1165 title: "FluentCRM",
1166 subtitle: "Add to Nurture Sequence",
1167 position: { x: 940, y: 380 },
1168 icon: "FC",
1169 iconBg: "bg-blue-700",
1170 actionNumber: 7,
1171 appData: findApp("fluentcrm"),
1172 data: {
1173 actionId: "create_contact",
1174 config: {
1175 email: "{your-email}",
1176 first_name: "{your-name}",
1177 status: "subscribed",
1178 tags: "nurture, follow-up"
1179 }
1180 }
1181 }
1182 ],
1183 connections: [
1184 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
1185 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
1186 { id: "conn-3", from: "node-action-2", to: "node-action-3", fromHandle: "right", toHandle: "left" },
1187 { id: "conn-4", from: "node-action-2", to: "node-action-4", fromHandle: "right", toHandle: "left" },
1188 { id: "conn-5", from: "node-action-1", to: "node-action-5", fromHandle: "right", toHandle: "left" },
1189 { id: "conn-6", from: "node-action-5", to: "node-action-6", fromHandle: "right", toHandle: "left" }
1190 ]
1191 }
1192 },
1193
1194 // ─── Template #11: Multilingual Customer Support Auto-Responder ──────────────
1195 {
1196 id: "multilingual-support-auto-responder",
1197 name: "Multilingual Support Auto-Responder (AI)",
1198 description: "Contact Form 7 submission is analysed by AI which detects the language, translates it to English for the admin, and drafts a contextual reply in the customer's original language — sent via email and WhatsApp.",
1199 isPro: true,
1200 icon: "OA",
1201 iconBg: "bg-emerald-600",
1202 workflow_data: {
1203 nodes: [
1204 {
1205 id: "node-trigger-1",
1206 type: "trigger",
1207 title: "Contact Form 7",
1208 subtitle: "Form submitted",
1209 position: { x: 100, y: 260 },
1210 icon: "C7",
1211 iconBg: "bg-black",
1212 actionNumber: 1,
1213 appData: findApp("cf7"),
1214 data: {
1215 actionId: "cf7_submit",
1216 config: { form_id: "" }
1217 }
1218 },
1219 {
1220 id: "node-action-1",
1221 type: "action",
1222 title: "OpenAI",
1223 subtitle: "Detect Language & Translate",
1224 position: { x: 380, y: 260 },
1225 icon: "OA",
1226 iconBg: "bg-emerald-600",
1227 actionNumber: 2,
1228 appData: findApp("openai"),
1229 data: {
1230 actionId: "chat_completion",
1231 config: {
1232 model: "gpt-4o-mini",
1233 prompt: "You are a multilingual support assistant. Given the customer message below, respond with ONLY a JSON object (no markdown) with these keys:\n- \"detected_language\": the full language name (e.g. \"Spanish\")\n- \"english_translation\": the full message translated to English\n- \"customer_reply\": a friendly, helpful support reply written in the SAME language as the original message\n\nCustomer Name: {your-name}\nCustomer Message: {your-message}",
1234 max_tokens: 800,
1235 temperature: 0.5
1236 }
1237 }
1238 },
1239 {
1240 id: "node-action-2",
1241 type: "action",
1242 title: "Mail",
1243 subtitle: "Notify Admin (English Translation)",
1244 position: { x: 660, y: 140 },
1245 icon: "M",
1246 iconBg: "bg-gray-700",
1247 actionNumber: 3,
1248 appData: findApp("mail"),
1249 data: {
1250 actionId: "send_email",
1251 config: {
1252 to_email: "{admin_email}",
1253 subject: "New Support Request ({node-action-1.detected_language}) from {your-name}",
1254 body: "<h3>New Multilingual Support Request</h3><p><strong>Customer:</strong> {your-name} ({your-email})</p><p><strong>Language:</strong> {node-action-1.detected_language}</p><p><strong>Original Message:</strong><br>{your-message}</p><p><strong>English Translation:</strong><br>{node-action-1.english_translation}</p>",
1255 is_html: true
1256 }
1257 }
1258 },
1259 {
1260 id: "node-action-3",
1261 type: "action",
1262 title: "WhatsApp",
1263 subtitle: "Send Reply to Customer",
1264 position: { x: 660, y: 320 },
1265 icon: "WA",
1266 iconBg: "bg-green-500",
1267 actionNumber: 4,
1268 appData: findApp("whatsapp"),
1269 data: {
1270 actionId: "wa_send_message",
1271 config: {
1272 phone_number_id: "",
1273 to: "{your-phone}",
1274 message: "{node-action-1.customer_reply}"
1275 }
1276 }
1277 }
1278 ],
1279 connections: [
1280 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
1281 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
1282 { id: "conn-3", from: "node-action-1", to: "node-action-3", fromHandle: "right", toHandle: "left" }
1283 ]
1284 }
1285 },
1286
1287 // ─── Template #12: Automated Support-to-Knowledge Base ──────────────────────
1288 {
1289 id: "support-to-knowledge-base",
1290 name: "Automated Support → Knowledge Base Post (AI)",
1291 description: "When a FluentCRM contact note is updated, AI anonymises the data, extracts the core problem and solution, and creates a clean FAQ draft as a WordPress post.",
1292 isPro: true,
1293 icon: "OA",
1294 iconBg: "bg-emerald-600",
1295 workflow_data: {
1296 nodes: [
1297 {
1298 id: "node-trigger-1",
1299 type: "trigger",
1300 title: "Webhook",
1301 subtitle: "FluentCRM Note Updated (Webhook)",
1302 position: { x: 100, y: 200 },
1303 icon: "W",
1304 iconBg: "bg-violet-600",
1305 actionNumber: 1,
1306 appData: findApp("webhook"),
1307 data: {
1308 actionId: "incoming_webhook",
1309 config: {}
1310 }
1311 },
1312 {
1313 id: "node-action-1",
1314 type: "action",
1315 title: "OpenAI",
1316 subtitle: "Anonymise & Extract FAQ",
1317 position: { x: 380, y: 200 },
1318 icon: "OA",
1319 iconBg: "bg-emerald-600",
1320 actionNumber: 2,
1321 appData: findApp("openai"),
1322 data: {
1323 actionId: "chat_completion",
1324 config: {
1325 model: "gpt-4o-mini",
1326 prompt: "You are a technical writer. Given the support interaction below, respond with ONLY a JSON object (no markdown) with these keys:\n- \"faq_title\": a concise FAQ-style question (the core problem)\n- \"faq_content\": a clean HTML answer (the solution), fully anonymised with no personal data\n- \"should_publish\": true if the resolution quality is good enough to publish, false otherwise\n\nSupport Note:\n{note_content}",
1327 max_tokens: 1000,
1328 temperature: 0.4
1329 }
1330 }
1331 },
1332 {
1333 id: "node-action-2",
1334 type: "action",
1335 title: "Filters",
1336 subtitle: "Only if Quality is Good",
1337 position: { x: 660, y: 200 },
1338 icon: "FT",
1339 iconBg: "bg-yellow-500",
1340 actionNumber: 3,
1341 appData: findApp("filters"),
1342 data: {
1343 actionId: "filter_condition",
1344 config: {
1345 field: "{node-action-1.should_publish}",
1346 operator: "is_true",
1347 value: ""
1348 }
1349 }
1350 },
1351 {
1352 id: "node-action-3",
1353 type: "action",
1354 title: "WordPress",
1355 subtitle: "Create FAQ Draft Post",
1356 position: { x: 940, y: 200 },
1357 icon: "W",
1358 iconBg: "bg-blue-600",
1359 actionNumber: 4,
1360 appData: findApp("wordpress"),
1361 data: {
1362 actionId: "wp_create_post",
1363 config: {
1364 post_title: "{node-action-1.faq_title}",
1365 post_content: "{node-action-1.faq_content}",
1366 post_status: "draft",
1367 categories: "FAQ, Knowledge Base"
1368 }
1369 }
1370 }
1371 ],
1372 connections: [
1373 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
1374 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
1375 { id: "conn-3", from: "node-action-2", to: "node-action-3", fromHandle: "right", toHandle: "left" }
1376 ]
1377 }
1378 },
1379
1380 // ─── Template #13: Dynamic Review Sentiment Shield ───────────────────────────
1381 {
1382 id: "wc-review-sentiment-shield",
1383 name: "WooCommerce Review Sentiment Shield (AI)",
1384 description: "When a WooCommerce product review is created, AI analyses the sentiment. Negative reviews trigger a personalised apology via WhatsApp and a discount coupon email; positive reviews are approved automatically.",
1385 isPro: true,
1386 icon: "OA",
1387 iconBg: "bg-emerald-600",
1388 workflow_data: {
1389 nodes: [
1390 {
1391 id: "node-trigger-1",
1392 type: "trigger",
1393 title: "Webhook",
1394 subtitle: "WooCommerce Product Review Created",
1395 position: { x: 100, y: 260 },
1396 icon: "W",
1397 iconBg: "bg-violet-600",
1398 actionNumber: 1,
1399 appData: findApp("webhook"),
1400 data: {
1401 actionId: "incoming_webhook",
1402 config: {}
1403 }
1404 },
1405 {
1406 id: "node-action-1",
1407 type: "action",
1408 title: "OpenAI",
1409 subtitle: "Analyse Review Sentiment",
1410 position: { x: 380, y: 260 },
1411 icon: "OA",
1412 iconBg: "bg-emerald-600",
1413 actionNumber: 2,
1414 appData: findApp("openai"),
1415 data: {
1416 actionId: "chat_completion",
1417 config: {
1418 model: "gpt-4o-mini",
1419 prompt: "Analyse this product review and respond with ONLY a JSON object (no markdown) with these keys:\n- \"sentiment\": either \"positive\" or \"negative\"\n- \"complaint_type\": if negative, either \"shipping\" or \"product_quality\" or \"other\"; if positive use \"none\"\n- \"apology_message\": if negative, a personalised, empathetic WhatsApp message (2-3 sentences) addressing the specific complaint and offering a 10% discount code SAVE10\n\nReview Rating: {rating}\nReview Text: {review_content}\nProduct: {product_name}",
1420 max_tokens: 400,
1421 temperature: 0.6
1422 }
1423 }
1424 },
1425 {
1426 id: "node-action-2",
1427 type: "action",
1428 title: "Filters",
1429 subtitle: "Is Negative Review?",
1430 position: { x: 660, y: 160 },
1431 icon: "FT",
1432 iconBg: "bg-yellow-500",
1433 actionNumber: 3,
1434 appData: findApp("filters"),
1435 data: {
1436 actionId: "filter_condition",
1437 config: {
1438 field: "{node-action-1.sentiment}",
1439 operator: "equals",
1440 value: "negative"
1441 }
1442 }
1443 },
1444 {
1445 id: "node-action-3",
1446 type: "action",
1447 title: "WhatsApp",
1448 subtitle: "Send Apology + Coupon",
1449 position: { x: 940, y: 100 },
1450 icon: "WA",
1451 iconBg: "bg-green-500",
1452 actionNumber: 4,
1453 appData: findApp("whatsapp"),
1454 data: {
1455 actionId: "wa_send_message",
1456 config: {
1457 phone_number_id: "",
1458 to: "{reviewer_phone}",
1459 message: "{node-action-1.apology_message}"
1460 }
1461 }
1462 },
1463 {
1464 id: "node-action-4",
1465 type: "action",
1466 title: "Mail",
1467 subtitle: "Email Discount Coupon",
1468 position: { x: 940, y: 240 },
1469 icon: "M",
1470 iconBg: "bg-gray-700",
1471 actionNumber: 5,
1472 appData: findApp("mail"),
1473 data: {
1474 actionId: "send_email",
1475 config: {
1476 to_email: "{reviewer_email}",
1477 subject: "We're sorry — here's 10% off your next order",
1478 body: "<p>Dear {reviewer_name},</p><p>We sincerely apologise for your experience with <strong>{product_name}</strong>. As a token of our appreciation for your feedback, please use code <strong>SAVE10</strong> for 10% off your next order.</p><p>Thank you for helping us improve!</p>",
1479 is_html: true
1480 }
1481 }
1482 }
1483 ],
1484 connections: [
1485 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
1486 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
1487 { id: "conn-3", from: "node-action-2", to: "node-action-3", fromHandle: "right", toHandle: "left" },
1488 { id: "conn-4", from: "node-action-2", to: "node-action-4", fromHandle: "right", toHandle: "left" }
1489 ]
1490 }
1491 },
1492
1493 // ─── Template #14: Price Monitor & Updater ──────────────────────────────────
1494 {
1495 id: "price-monitor-updater",
1496 name: "AI Price Monitor & WooCommerce Auto-Updater",
1497 description: "Receive supplier pricing data via webhook, let AI compare it against your current margins, and automatically update WooCommerce sale prices or trigger a low-margin alert.",
1498 isPro: true,
1499 icon: "OA",
1500 iconBg: "bg-emerald-600",
1501 workflow_data: {
1502 nodes: [
1503 {
1504 id: "node-trigger-1",
1505 type: "trigger",
1506 title: "Webhook",
1507 subtitle: "Supplier Price Feed (Incoming)",
1508 position: { x: 100, y: 200 },
1509 icon: "W",
1510 iconBg: "bg-violet-600",
1511 actionNumber: 1,
1512 appData: findApp("webhook"),
1513 data: {
1514 actionId: "incoming_webhook",
1515 config: {}
1516 }
1517 },
1518 {
1519 id: "node-action-1",
1520 type: "action",
1521 title: "JSON Parser",
1522 subtitle: "Parse Supplier Feed",
1523 position: { x: 380, y: 200 },
1524 icon: "{}",
1525 iconBg: "bg-yellow-600",
1526 actionNumber: 2,
1527 appData: findApp("json_parser"),
1528 data: {
1529 actionId: "parse_json_text",
1530 config: {
1531 json_text: "{body}"
1532 }
1533 }
1534 },
1535 {
1536 id: "node-action-2",
1537 type: "action",
1538 title: "OpenAI",
1539 subtitle: "Evaluate Pricing Decision",
1540 position: { x: 660, y: 200 },
1541 icon: "OA",
1542 iconBg: "bg-emerald-600",
1543 actionNumber: 3,
1544 appData: findApp("openai"),
1545 data: {
1546 actionId: "chat_completion",
1547 config: {
1548 model: "gpt-4o-mini",
1549 prompt: "You are a pricing strategist. Given the supplier cost and the current store price, respond with ONLY a JSON object (no markdown) with these keys:\n- \"action\": either \"update_price\", \"low_margin_alert\", or \"no_change\"\n- \"new_sale_price\": the recommended sale price (number, 0 if no change)\n- \"margin_percent\": the calculated profit margin percentage\n- \"reason\": a one-sentence explanation\n\nSupplier Cost: {node-action-1.supplier_cost}\nCurrent Store Price: {node-action-1.current_price}\nTarget Margin: 30%",
1550 max_tokens: 200,
1551 temperature: 0.2
1552 }
1553 }
1554 },
1555 {
1556 id: "node-action-3",
1557 type: "action",
1558 title: "Filters",
1559 subtitle: "Should Update Price?",
1560 position: { x: 940, y: 120 },
1561 icon: "FT",
1562 iconBg: "bg-yellow-500",
1563 actionNumber: 4,
1564 appData: findApp("filters"),
1565 data: {
1566 actionId: "filter_condition",
1567 config: {
1568 field: "{node-action-2.action}",
1569 operator: "equals",
1570 value: "update_price"
1571 }
1572 }
1573 },
1574 {
1575 id: "node-action-4",
1576 type: "action",
1577 title: "WooCommerce",
1578 subtitle: "Update Product Sale Price",
1579 position: { x: 1220, y: 80 },
1580 icon: "WC",
1581 iconBg: "bg-purple-600",
1582 actionNumber: 5,
1583 appData: findApp("woocommerce"),
1584 data: {
1585 actionId: "wc_update_product",
1586 config: {
1587 product_id: "{node-action-1.product_id}",
1588 sale_price: "{node-action-2.new_sale_price}"
1589 }
1590 }
1591 },
1592 {
1593 id: "node-action-5",
1594 type: "action",
1595 title: "Filters",
1596 subtitle: "Low Margin Alert?",
1597 position: { x: 940, y: 300 },
1598 icon: "FT",
1599 iconBg: "bg-yellow-500",
1600 actionNumber: 6,
1601 appData: findApp("filters"),
1602 data: {
1603 actionId: "filter_condition",
1604 config: {
1605 field: "{node-action-2.action}",
1606 operator: "equals",
1607 value: "low_margin_alert"
1608 }
1609 }
1610 },
1611 {
1612 id: "node-action-6",
1613 type: "action",
1614 title: "Mail",
1615 subtitle: "Send Margin Warning Email",
1616 position: { x: 1220, y: 300 },
1617 icon: "M",
1618 iconBg: "bg-gray-700",
1619 actionNumber: 7,
1620 appData: findApp("mail"),
1621 data: {
1622 actionId: "send_email",
1623 config: {
1624 to_email: "{admin_email}",
1625 subject: "⚠️ Low Margin Alert: Product #{node-action-1.product_id}",
1626 body: "<h3>Inventory Margin Warning</h3><p>Product <strong>#{node-action-1.product_id}</strong> has dropped below the 30% margin threshold.</p><p><strong>Supplier Cost:</strong> {node-action-1.supplier_cost}<br><strong>Current Price:</strong> {node-action-1.current_price}<br><strong>Margin:</strong> {node-action-2.margin_percent}%</p><p><strong>Recommendation:</strong> {node-action-2.reason}</p>",
1627 is_html: true
1628 }
1629 }
1630 }
1631 ],
1632 connections: [
1633 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
1634 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
1635 { id: "conn-3", from: "node-action-2", to: "node-action-3", fromHandle: "right", toHandle: "left" },
1636 { id: "conn-4", from: "node-action-3", to: "node-action-4", fromHandle: "right", toHandle: "left" },
1637 { id: "conn-5", from: "node-action-2", to: "node-action-5", fromHandle: "right", toHandle: "left" },
1638 { id: "conn-6", from: "node-action-5", to: "node-action-6", fromHandle: "right", toHandle: "left" }
1639 ]
1640 }
1641 },
1642
1643 // ─── Template #15: Automated Press & News Aggregator to Blog ────────────────
1644 {
1645 id: "news-aggregator-to-blog",
1646 name: "Automated News Aggregator → AI Blog Post",
1647 description: "Triggered by an incoming webhook with article URLs, AI fetches and blends multiple news sources into a single original blog post saved as a WordPress draft ready for editorial review.",
1648 isPro: true,
1649 icon: "OA",
1650 iconBg: "bg-emerald-600",
1651 workflow_data: {
1652 nodes: [
1653 {
1654 id: "node-trigger-1",
1655 type: "trigger",
1656 title: "Webhook",
1657 subtitle: "Incoming Webhook (Article URLs)",
1658 position: { x: 100, y: 200 },
1659 icon: "W",
1660 iconBg: "bg-violet-600",
1661 actionNumber: 1,
1662 appData: findApp("webhook"),
1663 data: {
1664 actionId: "incoming_webhook",
1665 config: {}
1666 }
1667 },
1668 {
1669 id: "node-action-1",
1670 type: "action",
1671 title: "Webpage Parser",
1672 subtitle: "Fetch First Article",
1673 position: { x: 380, y: 120 },
1674 icon: "🌐",
1675 iconBg: "bg-teal-500",
1676 actionNumber: 2,
1677 appData: findApp("webpage_parser"),
1678 data: {
1679 actionId: "parse_webpage_url",
1680 config: {
1681 webpage_url: "{url_1}"
1682 }
1683 }
1684 },
1685 {
1686 id: "node-action-2",
1687 type: "action",
1688 title: "Webpage Parser",
1689 subtitle: "Fetch Second Article",
1690 position: { x: 380, y: 280 },
1691 icon: "🌐",
1692 iconBg: "bg-teal-500",
1693 actionNumber: 3,
1694 appData: findApp("webpage_parser"),
1695 data: {
1696 actionId: "parse_webpage_url",
1697 config: {
1698 webpage_url: "{url_2}"
1699 }
1700 }
1701 },
1702 {
1703 id: "node-action-3",
1704 type: "action",
1705 title: "OpenAI",
1706 subtitle: "Blend & Write Original Article",
1707 position: { x: 700, y: 200 },
1708 icon: "OA",
1709 iconBg: "bg-emerald-600",
1710 actionNumber: 4,
1711 appData: findApp("openai"),
1712 data: {
1713 actionId: "chat_completion",
1714 config: {
1715 model: "gpt-4o",
1716 prompt: "You are a professional journalist and content writer. Read the following articles and blend them into a single, original, engaging blog post. Do NOT copy — summarise the key takeaways and present them in a fresh perspective. Respond with ONLY a JSON object (no markdown) with two keys:\n- \"title\": a compelling, SEO-friendly blog post title\n- \"content\": the full HTML body of the article (600-900 words, with proper headings)\n\nArticle 1 Title: {node-action-1.title}\nArticle 1 Content: {node-action-1.content}\n\nArticle 2 Title: {node-action-2.title}\nArticle 2 Content: {node-action-2.content}",
1717 max_tokens: 2500,
1718 temperature: 0.75
1719 }
1720 }
1721 },
1722 {
1723 id: "node-action-4",
1724 type: "action",
1725 title: "WordPress",
1726 subtitle: "Save as Draft Post",
1727 position: { x: 980, y: 200 },
1728 icon: "W",
1729 iconBg: "bg-blue-600",
1730 actionNumber: 5,
1731 appData: findApp("wordpress"),
1732 data: {
1733 actionId: "wp_create_post",
1734 config: {
1735 post_title: "{node-action-3.title}",
1736 post_content: "{node-action-3.content}",
1737 post_status: "draft",
1738 categories: "News, Industry Updates"
1739 }
1740 }
1741 }
1742 ],
1743 connections: [
1744 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
1745 { id: "conn-2", from: "node-trigger-1", to: "node-action-2", fromHandle: "right", toHandle: "left" },
1746 { id: "conn-3", from: "node-action-1", to: "node-action-3", fromHandle: "right", toHandle: "left" },
1747 { id: "conn-4", from: "node-action-2", to: "node-action-3", fromHandle: "right", toHandle: "left" },
1748 { id: "conn-5", from: "node-action-3", to: "node-action-4", fromHandle: "right", toHandle: "left" }
1749 ]
1750 }
1751 },
1752
1753 // ─── Template #16: AI-Driven Product Description Enhancer ───────────────────
1754 {
1755 id: "ai-product-description-enhancer",
1756 name: "AI Product Description Enhancer (WooCommerce)",
1757 description: "When a WooCommerce product is created or updated, AI reads the basic attributes and generates an SEO-optimised meta title, meta description, and a compelling long-form product description.",
1758 isPro: true,
1759 icon: "OA",
1760 iconBg: "bg-emerald-600",
1761 workflow_data: {
1762 nodes: [
1763 {
1764 id: "node-trigger-1",
1765 type: "trigger",
1766 title: "WooCommerce",
1767 subtitle: "Product Added",
1768 position: { x: 100, y: 200 },
1769 icon: "WC",
1770 iconBg: "bg-purple-600",
1771 actionNumber: 1,
1772 appData: findApp("woocommerce"),
1773 data: {
1774 actionId: "wc_product_added",
1775 config: {}
1776 }
1777 },
1778 {
1779 id: "node-action-1",
1780 type: "action",
1781 title: "OpenAI",
1782 subtitle: "Generate SEO Content",
1783 position: { x: 380, y: 200 },
1784 icon: "OA",
1785 iconBg: "bg-emerald-600",
1786 actionNumber: 2,
1787 appData: findApp("openai"),
1788 data: {
1789 actionId: "chat_completion",
1790 config: {
1791 model: "gpt-4o-mini",
1792 prompt: "You are an expert eCommerce copywriter and SEO specialist. Given the product details below, respond with ONLY a JSON object (no markdown) with these keys:\n- \"meta_title\": an SEO-optimised meta title (max 60 characters)\n- \"meta_description\": a compelling meta description (max 160 characters)\n- \"long_description\": a full HTML product description (300-500 words) with bullet points for key features, benefits, and a call-to-action\n\nProduct Name: {product_name}\nProduct Category: {product_category}\nProduct Price: {product_price}\nExisting Short Description: {product_short_description}\nProduct Attributes: {product_attributes}",
1793 max_tokens: 1200,
1794 temperature: 0.65
1795 }
1796 }
1797 },
1798 {
1799 id: "node-action-2",
1800 type: "action",
1801 title: "WooCommerce",
1802 subtitle: "Update Product Description & SEO",
1803 position: { x: 700, y: 200 },
1804 icon: "WC",
1805 iconBg: "bg-purple-600",
1806 actionNumber: 3,
1807 appData: findApp("woocommerce"),
1808 data: {
1809 actionId: "wc_update_product",
1810 config: {
1811 product_id: "{product_id}",
1812 description: "{node-action-1.long_description}",
1813 meta_title: "{node-action-1.meta_title}",
1814 meta_description: "{node-action-1.meta_description}"
1815 }
1816 }
1817 }
1818 ],
1819 connections: [
1820 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
1821 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" }
1822 ]
1823 }
1824 },
1825 {
1826 id: "wpbot-to-sheets",
1827 name: "WPBot Session to Google Sheet",
1828 description: "Automatically save WPBot chat session details (Name, Email, Phone) to a Google Sheet.",
1829 icon: "WB",
1830 iconBg: "bg-blue-500",
1831 workflow_data: {
1832 nodes: [
1833 {
1834 id: "node-trigger-1",
1835 type: "trigger",
1836 title: "WPBot",
1837 subtitle: "Chat Session Saved",
1838 position: { x: 100, y: 200 },
1839 icon: "WB",
1840 iconBg: "bg-blue-500",
1841 actionNumber: 1,
1842 appData: findApp("wpbot")
1843 },
1844 {
1845 id: "node-action-1",
1846 type: "action",
1847 title: "Google Sheets",
1848 subtitle: "Add Row",
1849 position: { x: 500, y: 200 },
1850 icon: "GS",
1851 iconBg: "bg-green-600",
1852 actionNumber: 2,
1853 appData: findApp("google_sheets")
1854 }
1855 ],
1856 connections: [
1857 {
1858 id: "conn-1",
1859 from: "node-trigger-1",
1860 to: "node-action-1",
1861 fromHandle: "right",
1862 toHandle: "left"
1863 }
1864 ]
1865 }
1866 },
1867 {
1868 id: "wpbot-ai-sheets",
1869 name: "WPBot AI Email Extractor to Google Sheets",
1870 description: "Chat sessions are sent to AI for analysis to extract email addresses, which are then saved in a Google Sheet.",
1871 icon: "OA",
1872 iconBg: "bg-emerald-600",
1873 workflow_data: {
1874 nodes: [
1875 {
1876 id: "node-trigger-1",
1877 type: "trigger",
1878 title: "WPBot",
1879 subtitle: "Chat Session Saved",
1880 position: { x: 100, y: 200 },
1881 icon: "WB",
1882 iconBg: "bg-blue-500",
1883 actionNumber: 1,
1884 appData: findApp("wpbot")
1885 },
1886 {
1887 id: "node-action-1",
1888 type: "action",
1889 title: "OpenAI",
1890 subtitle: "Extract Emails",
1891 position: { x: 420, y: 200 },
1892 icon: "OA",
1893 iconBg: "bg-emerald-600",
1894 actionNumber: 2,
1895 appData: findApp("openai"),
1896 data: {
1897 actionId: "chat_completion",
1898 config: {
1899 model: "gpt-4o-mini",
1900 prompt: "Extract any email addresses from the following chat transcript. If none are found, return 'No Email'. Return ONLY the email addresses comma-separated, with no other text.\n\nTranscript: {{wpbot.wpbot_chat_session_saved.conversation}}",
1901 max_tokens: 100,
1902 temperature: 0.1
1903 }
1904 }
1905 },
1906 {
1907 id: "node-action-2",
1908 type: "action",
1909 title: "Google Sheets",
1910 subtitle: "Add Row",
1911 position: { x: 740, y: 200 },
1912 icon: "GS",
1913 iconBg: "bg-green-600",
1914 actionNumber: 3,
1915 appData: findApp("google_sheets")
1916 }
1917 ],
1918 connections: [
1919 { id: "conn-1", from: "node-trigger-1", to: "node-action-1", fromHandle: "right", toHandle: "left" },
1920 { id: "conn-2", from: "node-action-1", to: "node-action-2", fromHandle: "right", toHandle: "left" }
1921 ]
1922 }
1923 },
1924 {
1925 id: "conversational-form-to-sheet-ai-email",
1926 name: "Conversational Form to Sheet, AI & Email",
1927 description: "Saves conversational form data to Google Sheets, generates an AI summary, and emails the response.",
1928 icon: "F",
1929 iconBg: "bg-orange-500",
1930 workflow_data: {
1931 nodes: [
1932 {
1933 id: "trigger-1",
1934 type: "trigger",
1935 title: "Chatbot Form Builder",
1936 subtitle: "Conversational Forms Submitted",
1937 position: { x: 100, y: 100 },
1938 icon: "WB",
1939 iconBg: "bg-blue-500",
1940 actionNumber: 1,
1941 appData: findApp("wpbot"),
1942 data: {
1943 actionId: "conversationalforms_submit",
1944 config: {}
1945 }
1946 },
1947 {
1948 id: "action-1",
1949 type: "action",
1950 title: "Google Sheets",
1951 subtitle: "Add row to Google Sheet",
1952 position: { x: 400, y: 100 },
1953 icon: "GS",
1954 iconBg: "bg-green-600",
1955 actionNumber: 2,
1956 appData: findApp("google_sheets"),
1957 data: {
1958 actionId: "add_row",
1959 config: {
1960 sheet_id: "your_google_sheet_id_here",
1961 worksheet: "Sheet1",
1962 row_data: [
1963 "{{wpbot.conversationalforms_submit.name}}",
1964 "{{wpbot.conversationalforms_submit.email}}"
1965 ]
1966 }
1967 }
1968 },
1969 {
1970 id: "action-2",
1971 type: "action",
1972 title: "OpenAI",
1973 subtitle: "Generate Summary",
1974 position: { x: 700, y: 100 },
1975 icon: "OA",
1976 iconBg: "bg-emerald-600",
1977 actionNumber: 3,
1978 appData: findApp("openai"),
1979 data: {
1980 actionId: "chat_completion",
1981 config: {
1982 model: "gpt-4o-mini",
1983 prompt: "Summarize the following form submission: Name: {{wpbot.conversationalforms_submit.name}}, Email: {{wpbot.conversationalforms_submit.email}}",
1984 max_tokens: "150",
1985 temperature: "0.7"
1986 }
1987 }
1988 },
1989 {
1990 id: "action-3",
1991 type: "action",
1992 title: "Mail",
1993 subtitle: "Send Email Response",
1994 position: { x: 1000, y: 100 },
1995 icon: "M",
1996 iconBg: "bg-gray-700",
1997 actionNumber: 4,
1998 appData: findApp("mail"),
1999 data: {
2000 actionId: "send_email",
2001 config: {
2002 to_email: "{{wpbot.conversationalforms_submit.email}}",
2003 subject: "Thank you for your submission",
2004 body: "Hello {{wpbot.conversationalforms_submit.name}},\n\nHere is a summary of your submission:\n{{openai.chat_completion.response}}",
2005 is_html: false
2006 }
2007 }
2008 }
2009 ],
2010 connections: [
2011 { id: "conn-1", from: "trigger-1", to: "action-1", fromHandle: "right", toHandle: "left" },
2012 { id: "conn-2", from: "action-1", to: "action-2", fromHandle: "right", toHandle: "left" },
2013 { id: "conn-3", from: "action-2", to: "action-3", fromHandle: "right", toHandle: "left" }
2014 ]
2015 }
2016 }
2017 ];
2018