Skip to content

Beautiful Open-Source Form Builder

feat: add Make integration functionality (#1214)

Chirag Chhatrala34ade4a27f7f
diff --git a/api/app/Integrations/Handlers/MakeIntegration.php b/api/app/Integrations/Handlers/MakeIntegration.php
new file mode 100644
index 000000000..88d69a674
--- /dev/null
+++ b/api/app/Integrations/Handlers/MakeIntegration.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace App\Integrations\Handlers;
+
+use App\Models\Forms\Form;
+use App\Rules\PublicWebhookUrlRule;
+
+class MakeIntegration 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();
+
+ unset($data['submission'], $data['message']);
+
+ return $data;
+ }
+}
diff --git a/api/resources/data/forms/integrations.json b/api/resources/data/forms/integrations.json
index 15b162e33..61c1cb6d8 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"
},
+ "make": {
+ "name": "Make",
+ "icon": "simple-icons:make",
+ "section_name": "Automation",
+ "file_name": "MakeIntegration",
+ "actions_file_name": "MakeIntegrationActions",
+ "required_tier": "free",
+ "is_external": true,
+ "is_editable": false,
+ "url": "https://www.make.com/en/integrations/opnform"
+ },
"pabbly": {
"name": "Pabbly",
"icon": "opnform:pabbly",
diff --git a/api/tests/Feature/Integrations/MakeIntegrationTest.php b/api/tests/Feature/Integrations/MakeIntegrationTest.php
new file mode 100644
index 000000000..9d5232cf3
--- /dev/null
+++ b/api/tests/Feature/Integrations/MakeIntegrationTest.php
@@ -0,0 +1,153 @@
+<?php
+
+use App\Models\Integration\FormIntegration;
+use Illuminate\Support\Facades\Http;
+
+test('make integration fires webhook on form submission with correct payload', function () {
+ Http::fake([
+ 'https://example.com/*' => Http::response(['ok' => true], 200),
+ ]);
+
+ $user = $this->actingAsProUser();
+ $workspace = $this->createUserWorkspace($user);
+ $form = $this->createForm($user, $workspace, [
+ 'properties' => [
+ [
+ 'id' => 'name',
+ 'name' => 'Name',
+ 'type' => 'text',
+ 'hidden' => false,
+ 'required' => true,
+ ],
+ ],
+ ]);
+
+ $this->postJson(route('open.forms.integrations.create', $form), [
+ 'status' => 'active',
+ 'integration_id' => 'make',
+ 'logic' => null,
+ 'data' => [
+ 'webhook_url' => 'https://example.com/make-hook/test123',
+ ],
+ ])->assertSuccessful();
+
+ $submissionData = $this->generateFormSubmissionData($form);
+
+ $this->postJson(route('forms.answer', $form->slug), $submissionData)
+ ->assertSuccessful();
+
+ Http::assertSent(function ($request) use ($form) {
+ $payload = json_decode($request->body(), true);
+
+ return $request->url() === 'https://example.com/make-hook/test123'
+ && $payload['form_id'] === $form->id
+ && isset($payload['data'])
+ && isset($payload['form_title'])
+ && !isset($payload['submission'])
+ && !isset($payload['message']);
+ });
+});
+
+test('make integration rejects private webhook urls', function () {
+ $user = $this->actingAsProUser();
+ $workspace = $this->createUserWorkspace($user);
+ $form = $this->createForm($user, $workspace);
+
+ foreach ([
+ 'http://169.254.169.254/latest/meta-data/',
+ 'https://127.0.0.1/webhook',
+ 'https://localhost/webhook',
+ 'https://10.0.0.5/webhook',
+ ] as $url) {
+ $this->postJson(route('open.forms.integrations.create', $form), [
+ 'status' => 'active',
+ 'integration_id' => 'make',
+ 'logic' => null,
+ 'data' => [
+ 'webhook_url' => $url,
+ ],
+ ])
+ ->assertStatus(422)
+ ->assertJsonValidationErrors(['data.webhook_url']);
+ }
+});
+
+test('make integration stores and returns provider_url', function () {
+ $user = $this->actingAsProUser();
+ $workspace = $this->createUserWorkspace($user);
+ $form = $this->createForm($user, $workspace);
+
+ $response = $this->postJson(route('open.forms.integrations.create', $form), [
+ 'status' => 'active',
+ 'integration_id' => 'make',
+ 'logic' => null,
+ 'data' => [
+ 'webhook_url' => 'https://example.com/make-hook/test123',
+ 'provider_url' => 'https://www.make.com/scenario/12345/edit',
+ ],
+ ])->assertSuccessful();
+
+ expect($response->json('form_integration.data.webhook_url'))
+ ->toBe('https://example.com/make-hook/test123');
+ expect($response->json('form_integration.data.provider_url'))
+ ->toBe('https://www.make.com/scenario/12345/edit');
+});
+
+test('make integration provider_url is optional', function () {
+ $user = $this->actingAsProUser();
+ $workspace = $this->createUserWorkspace($user);
+ $form = $this->createForm($user, $workspace);
+
+ $response = $this->postJson(route('open.forms.integrations.create', $form), [
+ 'status' => 'active',
+ 'integration_id' => 'make',
+ 'logic' => null,
+ 'data' => [
+ 'webhook_url' => 'https://example.com/make-hook/test123',
+ ],
+ ])->assertSuccessful();
+
+ expect($response->json('form_integration.data.webhook_url'))
+ ->toBe('https://example.com/make-hook/test123');
+});
+
+test('make integration logs success event after webhook fires', function () {
+ Http::fake([
+ 'https://example.com/*' => Http::response(['ok' => true], 200),
+ ]);
+
+ $user = $this->actingAsProUser();
+ $workspace = $this->createUserWorkspace($user);
+ $form = $this->createForm($user, $workspace, [
+ 'properties' => [
+ [
+ 'id' => 'name',
+ 'name' => 'Name',
+ 'type' => 'text',
+ 'hidden' => false,
+ 'required' => true,
+ ],
+ ],
+ ]);
+
+ $this->postJson(route('open.forms.integrations.create', $form), [
+ 'status' => 'active',
+ 'integration_id' => 'make',
+ 'logic' => null,
+ 'data' => [
+ 'webhook_url' => 'https://example.com/make-hook/test123',
+ ],
+ ])->assertSuccessful();
+
+ $submissionData = $this->generateFormSubmissionData($form);
+
+ $this->postJson(route('forms.answer', $form->slug), $submissionData)
+ ->assertSuccessful();
+
+ $integration = FormIntegration::where('integration_id', 'make')->first();
+
+ $this->assertDatabaseHas('form_integrations_events', [
+ 'integration_id' => $integration->id,
+ 'status' => 'success',
+ ]);
+});
diff --git a/client/components/open/integrations/components/MakeIntegrationActions.vue b/client/components/open/integrations/components/MakeIntegrationActions.vue
new file mode 100644
index 000000000..7448df759
--- /dev/null
+++ b/client/components/open/integrations/components/MakeIntegrationActions.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.js
index 42bf0cf0b..d7975d7ad 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')],
+ ['MakeIntegrationActions', () => import('~/components/open/integrations/components/MakeIntegrationActions.vue')],
['PabblyIntegrationActions', () => import('~/components/open/integrations/components/PabblyIntegrationActions.vue')],
])
diff --git a/client/data/forms/integrations.json b/client/data/forms/integrations.json
index 15b162e33..61c1cb6d8 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"
},
+ "make": {
+ "name": "Make",
+ "icon": "simple-icons:make",
+ "section_name": "Automation",
+ "file_name": "MakeIntegration",
+ "actions_file_name": "MakeIntegrationActions",
+ "required_tier": "free",
+ "is_external": true,
+ "is_editable": false,
+ "url": "https://www.make.com/en/integrations/opnform"
+ },
"pabbly": {
"name": "Pabbly",
"icon": "opnform:pabbly",