Beautiful Open-Source Form Builder
feat: add Pabbly integration support (#1222)
Chirag Chhatralac750914a0556
diff --git a/api/app/Integrations/Handlers/PabblyIntegration.php b/api/app/Integrations/Handlers/PabblyIntegration.phpnew file mode 100644index 000000000..1b0a7c28c--- /dev/null+++ b/api/app/Integrations/Handlers/PabblyIntegration.php@@ -0,0 +1,37 @@+<?php++namespace App\Integrations\Handlers;++use App\Models\Forms\Form;+use App\Rules\PublicWebhookUrlRule;++class PabblyIntegration extends AbstractIntegrationHandler+{+ public static function getValidationRules(?Form $form): array+ {+ return [+ 'webhook_url' => ['required', 'url', new PublicWebhookUrlRule()],+ 'provider_url' => 'nullable|url',+ ];+ }++ protected function getWebhookUrl(): ?string+ {+ return $this->integrationData->webhook_url ?? null;+ }++ protected function shouldRun(): bool+ {+ return !is_null($this->getWebhookUrl()) && parent::shouldRun();+ }++ protected function getWebhookData(): array+ {+ $data = parent::getWebhookData();++ // Remove deprecated fields if they exist+ unset($data['submission'], $data['message']);++ return $data;+ }+}diff --git a/api/resources/data/forms/integrations.json b/api/resources/data/forms/integrations.jsonindex 140419cdc..15b162e33 100644--- a/api/resources/data/forms/integrations.json+++ b/api/resources/data/forms/integrations.json@@ -77,6 +77,17 @@"is_editable": false,"url": "https://www.activepieces.com/pieces/opnform"},+ "pabbly": {+ "name": "Pabbly",+ "icon": "opnform:pabbly",+ "section_name": "Automation",+ "file_name": "PabblyIntegration",+ "actions_file_name": "PabblyIntegrationActions",+ "required_tier": "free",+ "is_external": true,+ "is_editable": false,+ "url": "https://connect.pabbly.com/integrations/opnform"+ },"google_sheets": {"name": "Google Sheets","icon": "mdi:google-spreadsheet",diff --git a/client/components/open/integrations/components/PabblyIntegrationActions.vue b/client/components/open/integrations/components/PabblyIntegrationActions.vuenew file mode 100644index 000000000..7448df759--- /dev/null+++ b/client/components/open/integrations/components/PabblyIntegrationActions.vue@@ -0,0 +1,36 @@+<template>+ <div class="flex flex-1 items-center">+ <div+ v-if="integration && providerUrl"+ class="hidden md:block space-y-2"+ >+ <UButton+ color="neutral"+ variant="ghost"+ size="sm"+ :href="`${providerUrl}?utm_source=opnform-edit`"+ target="_blank"+ external+ >+ Edit Workflow+ </UButton>+ </div>+ </div>+</template>++<script setup>+const props = defineProps({+ integration: {+ type: Object,+ required: true,+ },+ form: {+ type: Object,+ required: true,+ }+})++const providerUrl = computed(() => {+ return props.integration?.data?.provider_url || null+})+</script>diff --git a/client/composables/components/useComponentRegistry.js b/client/composables/components/useComponentRegistry.jsindex 69bcf0d21..42bf0cf0b 100644--- a/client/composables/components/useComponentRegistry.js+++ b/client/composables/components/useComponentRegistry.js@@ -27,6 +27,7 @@ const actionRegistry = new Map([['EmailIntegrationActions', () => import('~/components/open/integrations/components/EmailIntegrationActions.vue')],['N8nIntegrationActions', () => import('~/components/open/integrations/components/N8nIntegrationActions.vue')],['ActivepiecesIntegrationActions', () => import('~/components/open/integrations/components/ActivepiecesIntegrationActions.vue')],+ ['PabblyIntegrationActions', () => import('~/components/open/integrations/components/PabblyIntegrationActions.vue')],])const providerRegistry = new Map([diff --git a/client/data/forms/integrations.json b/client/data/forms/integrations.jsonindex 140419cdc..15b162e33 100644--- a/client/data/forms/integrations.json+++ b/client/data/forms/integrations.json@@ -77,6 +77,17 @@"is_editable": false,"url": "https://www.activepieces.com/pieces/opnform"},+ "pabbly": {+ "name": "Pabbly",+ "icon": "opnform:pabbly",+ "section_name": "Automation",+ "file_name": "PabblyIntegration",+ "actions_file_name": "PabblyIntegrationActions",+ "required_tier": "free",+ "is_external": true,+ "is_editable": false,+ "url": "https://connect.pabbly.com/integrations/opnform"+ },"google_sheets": {"name": "Google Sheets","icon": "mdi:google-spreadsheet",diff --git a/client/public/icons/pabbly.svg b/client/public/icons/pabbly.svgnew file mode 100644index 000000000..256eed1ce--- /dev/null+++ b/client/public/icons/pabbly.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2014 2009" fill="none">+ <path d="M2014 1004.5C2014 1559.1 1563.14 2008.68 1007 2008.68C832.627 2008.68 668.607 1964.5 525.593 1886.72C212.457 1716.43 0 1385.22 0 1004.5C0 449.914 450.849 0.324219 1006.99 0.324219C1563.14 0.324219 2014 449.914 2014 1004.5Z" fill="#20B276"/>+ <path d="M1408.74 1290.25C1302.17 1399.74 1172.83 1454.53 1020.76 1454.53C927.944 1454.53 841.711 1438.87 760.872 1393.37L759.899 1976.4L752.239 1974.34L747.497 1973.13L741.9 1970.09L739.261 1965.33L736.832 1959.96L739.526 1956.59L472.838 1639.59L472.916 890.235C472.916 734.095 526.196 601.485 632.779 492.382C739.339 383.272 868.67 328.729 1020.76 328.729C1172.83 328.729 1302.16 383.466 1408.74 492.98C1515.3 602.478 1568.6 735.367 1568.6 891.625C1568.6 1047.9 1515.3 1180.76 1408.74 1290.25ZM1205.31 701.833C1154.71 649.796 1093.19 623.789 1020.76 623.789C948.302 623.789 886.785 649.796 836.199 701.833C785.597 753.869 760.296 817.12 760.296 891.64C760.296 966.137 785.589 1029.39 836.199 1081.42C886.785 1133.47 948.302 1159.49 1020.76 1159.49C1093.19 1159.49 1154.71 1133.47 1205.31 1081.42C1255.91 1029.39 1281.21 966.137 1281.21 891.64C1281.21 817.12 1255.91 753.861 1205.31 701.833Z" fill="#147F52"/>+ <path d="M1387.73 1269.55C1281.15 1379.09 1151.81 1433.88 999.726 1433.88C906.909 1433.88 820.093 1411.12 739.257 1365.61L739.172 1973.17C739.172 1973.17 719.498 1967.77 693.892 1959.52C687.578 1957.49 681.202 1955.31 674.522 1952.96C671.345 1951.83 669.796 1951.17 666.526 1950.23C658.149 1947.83 647.53 1943.18 639.347 1940.01C611.849 1929.33 589.567 1919.16 589.03 1918.91C588.493 1918.65 509.782 1881.21 500.907 1875.68C492.958 1870.73 485.881 1866.85 479.816 1862.51C477.878 1861.13 476.414 1860.14 474.577 1858.88C460.158 1849 452.1 1843.32 452.1 1843.32L451.859 869.427C451.859 713.231 505.142 580.581 611.732 471.453C718.307 362.302 847.638 307.75 999.734 307.75C1151.82 307.75 1281.15 362.504 1387.74 472.051C1494.31 581.582 1547.62 714.512 1547.62 870.809C1547.6 1027.11 1494.3 1160.02 1387.73 1269.55ZM1184.29 680.952C1133.68 628.899 1072.17 602.884 999.718 602.884C927.26 602.884 865.739 628.899 815.15 680.952C764.544 733.004 739.25 796.274 739.25 870.809C739.25 945.336 764.544 1008.61 815.15 1060.65C865.739 1112.73 927.26 1138.75 999.718 1138.75C1072.16 1138.75 1133.68 1112.73 1184.29 1060.65C1234.88 1008.61 1260.2 945.336 1260.2 870.809C1260.2 796.274 1234.88 733.004 1184.29 680.952Z" fill="white"/>+</svg>