Beautiful Open-Source Form Builder
Implement retry functionality for failed integration events (#1208)
Chirag Chhatrala407e552ea2b3
diff --git a/api/app/Http/Controllers/Forms/Integration/FormIntegrationsEventController.php b/api/app/Http/Controllers/Forms/Integration/FormIntegrationsEventController.phpindex 765da767e..902bf01cb 100644--- a/api/app/Http/Controllers/Forms/Integration/FormIntegrationsEventController.php+++ b/api/app/Http/Controllers/Forms/Integration/FormIntegrationsEventController.php@@ -5,6 +5,8 @@ namespace App\Http\Controllers\Forms\Integration;use App\Http\Controllers\Controller;use App\Http\Resources\FormIntegrationsEventResource;use App\Models\Forms\Form;+use App\Service\Integrations\RetryIntegrationEvent;+use Illuminate\Http\JsonResponse;class FormIntegrationsEventController extends Controller{@@ -16,10 +18,40 @@ class FormIntegrationsEventController extends Controllerpublic function index(Form $form, string $integrationid){$this->authorize('manageIntegrations', $form);- $formIntegration = $form->integrations()->findOrFail((int) $integrationid);+ $integration = $form->integrations()->findOrFail((int) $integrationid);+ $integration->setRelation('form', $form);- return FormIntegrationsEventResource::collection(- $formIntegration->events()->with('integration')->orderByDesc('created_at')->get()+ return FormIntegrationsEventResource::forIntegration(+ $integration,+ $integration->events()->orderByDesc('created_at')->orderByDesc('id')->get());}++ public function retry(Form $form, string $integrationid, string $event, RetryIntegrationEvent $retry): JsonResponse+ {+ $this->authorize('manageIntegrations', $form);+ $eventId = filter_var($event, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);+ abort_if($eventId === false, 404);+ $integration = $form->integrations()->findOrFail((int) $integrationid);+ $result = $retry->handle($integration, $eventId);+ $message = match ($result->status) {+ 'success' => 'Event retried successfully.',+ 'accepted' => 'Retry accepted by the mail transport. Delivery is not yet confirmed.',+ 'delivered' => 'Retry delivered to the receiving mail server.',+ 'skipped' => 'No request was sent because the integration conditions were not met.',+ 'processing' => 'The retry is still processing. Refresh the history to review its outcome.',+ 'unknown' => 'Delivery is uncertain. Review the event before sending again.',+ default => 'Retry failed. Review the latest event for details.',+ };++ return response()->json([+ 'type' => match ($result->status) {+ 'success', 'accepted', 'delivered' => 'success',+ 'error' => 'error',+ default => 'warning',+ },+ 'message' => $message,+ 'event' => FormIntegrationsEventResource::make($result),+ ]);+ }}diff --git a/api/app/Http/Middleware/ImpersonationMiddleware.php b/api/app/Http/Middleware/ImpersonationMiddleware.phpindex 271afe770..4e0e3d3f6 100644--- a/api/app/Http/Middleware/ImpersonationMiddleware.php+++ b/api/app/Http/Middleware/ImpersonationMiddleware.php@@ -13,6 +13,7 @@ class ImpersonationMiddlewarepublic const ADMIN_LOG_PREFIX = '[admin_action] ';public const LOG_ROUTES = [+ 'open.forms.integrations.events.retry','open.forms.store','open.forms.update','open.forms.duplicate',@@ -43,6 +44,7 @@ class ImpersonationMiddleware'open.providers','open.forms.integrations.index','open.forms.integrations.events',+ 'open.forms.integrations.events.retry','open.forms.pdf-templates.index','open.forms.pdf-templates.show','open.forms.pdf-templates.download',diff --git a/api/app/Http/Resources/FormIntegrationsEventResource.php b/api/app/Http/Resources/FormIntegrationsEventResource.phpindex d65d06048..f1f040a9b 100644--- a/api/app/Http/Resources/FormIntegrationsEventResource.php+++ b/api/app/Http/Resources/FormIntegrationsEventResource.php@@ -2,26 +2,61 @@namespace App\Http\Resources;+use App\Models\Forms\FormSubmission;+use App\Models\Integration\FormIntegration;use Illuminate\Http\Resources\Json\JsonResource;+use Illuminate\Support\Collection;class FormIntegrationsEventResource extends JsonResource{- /**- * Transform the resource into an array.- *- * @param \Illuminate\Http\Request $request- * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable- */+ private bool $retryEligibilityResolved = false;+ private ?string $retryUnavailableReason = null;++ public function withRetryEligibility(?string $reason): self+ {+ $this->retryEligibilityResolved = true;+ $this->retryUnavailableReason = $reason;++ return $this;+ }++ public static function forIntegration(FormIntegration $integration, Collection $events)+ {+ $latestEvents = [];+ foreach ($events as $event) {+ $event->setRelation('integration', $integration);+ $submissionId = $event->getSubmissionId();+ if ($submissionId && (!isset($latestEvents[$submissionId]) || $event->id > $latestEvents[$submissionId]->id)) {+ $latestEvents[$submissionId] = $event;+ }+ }+ $availableSubmissions = $integration->form->submissions()+ ->whereIn('id', array_keys($latestEvents))->where('status', FormSubmission::STATUS_COMPLETED)+ ->pluck('id')->flip();++ return self::collection($events->map(fn ($event) => self::make($event)->withRetryEligibility(+ $event->retryUnavailableReason(+ $latestEvents[$event->getSubmissionId()] ?? null,+ $availableSubmissions->has($event->getSubmissionId())+ )+ )));+ }+public function toArray($request){+ $reason = $this->retryEligibilityResolved ? $this->retryUnavailableReason : $this->resource->retryUnavailableReason();+return [+ 'id' => $this->id,'date' => date('Y-m-d H:i', strtotime($this->created_at)),'status' => ucfirst($this->status),'tracking_id' => $this->tracking_id,'email_tracking' => $this->tracking_id !== null,'legacy_email' => !$this->tracking_id && $this->integration?->integration_id === 'email','updated_at' => $this->updated_at?->toIso8601String(),- 'data' => $this->data+ 'data' => $this->data,+ 'can_retry' => $reason === null,+ 'retry_unavailable_reason' => $reason,];}}diff --git a/api/app/Integrations/Handlers/AbstractIntegrationHandler.php b/api/app/Integrations/Handlers/AbstractIntegrationHandler.phpindex 30b7154a1..0652ca4eb 100644--- a/api/app/Integrations/Handlers/AbstractIntegrationHandler.php+++ b/api/app/Integrations/Handlers/AbstractIntegrationHandler.php@@ -85,23 +85,71 @@ abstract class AbstractIntegrationHandlerreturn self::formatWebhookData($this->form, $this->submissionData, $this->submissionMeta);}- public function run(): void+ public function run(?FormIntegrationsEvent $attempt = null): FormIntegrationsEvent{+ $eventMetadata = $this->getEventMetadata();+try {- $this->handle();- $this->formIntegration->events()->create([- 'status' => FormIntegrationsEvent::STATUS_SUCCESS,- ]);+ if (!$this->shouldRun()) {+ $attributes = [+ 'status' => 'skipped',+ 'data' => array_merge($eventMetadata, ['message' => 'Integration conditions were not met. No request was sent.']),+ ];+ } else {+ $this->handle();+ $attributes = [+ 'status' => FormIntegrationsEvent::STATUS_SUCCESS,+ 'data' => $eventMetadata,+ ];+ }} catch (\Exception $e) {- $this->formIntegration->events()->create([+ $attributes = ['status' => FormIntegrationsEvent::STATUS_ERROR,- 'data' => $this->extractEventDataFromException($e),- ]);+ 'data' => array_merge($eventMetadata, $this->extractEventDataFromException($e)),+ ];Log::error('Integration failed', array_merge(['form_id' => $this->form->id,'integration_id' => $this->formIntegration->id,], $this->extractEventDataFromException($e)));}++ try {+ return $this->recordEvent($attributes, $attempt);+ } catch (\Exception $exception) {+ if ($attempt) {+ // Keep the durable retry reservation and never classify storage errors as delivery failures.+ throw $exception;+ }++ Log::error('Could not record integration outcome', [+ 'form_id' => $this->form->id,+ 'integration_id' => $this->formIntegration->id,+ 'exception_type' => get_class($exception),+ ]);++ // A recoverable history write failure must not prevent the other integrations from running.+ return $this->recordEvent([+ 'status' => 'unknown',+ 'data' => array_merge($attributes['data'] ?? [], [+ 'message' => 'The integration outcome could not be recorded. Check the destination before sending again.',+ ]),+ ]);+ }+ }++ protected function recordEvent(array $attributes, ?FormIntegrationsEvent $attempt = null): FormIntegrationsEvent+ {+ if (!$attempt) {+ return $this->formIntegration->events()->create($attributes);+ }++ $attributes['data'] = array_merge((array) $attempt->data, $attributes['data'] ?? []);+ $attempt->update($attributes);+ if ($attempt->status === FormIntegrationsEvent::STATUS_ERROR) {+ \App\Events\Models\FormIntegrationsEventCreated::dispatch($attempt);+ }++ return $attempt;}public function created(): void@@ -181,6 +229,17 @@ abstract class AbstractIntegrationHandlerreturn $data;}+ protected function getEventMetadata(): array+ {+ if (!isset($this->submissionData['submission_id'])) {+ return [];+ }++ return [+ 'submission_id' => $this->submissionData['submission_id'],+ ];+ }+public function extractEventDataFromException(\Exception $e): array{if ($e instanceof RequestException) {diff --git a/api/app/Integrations/Handlers/TracksEmailIntegration.php b/api/app/Integrations/Handlers/TracksEmailIntegration.phpindex 653aaa9ba..6be7dcfe8 100644--- a/api/app/Integrations/Handlers/TracksEmailIntegration.php+++ b/api/app/Integrations/Handlers/TracksEmailIntegration.php@@ -3,6 +3,7 @@namespace App\Integrations\Handlers;use App\Service\Integrations\EmailDeliveryTracker;+use App\Models\Integration\FormIntegrationsEvent;use Illuminate\Support\Facades\Notification;use Illuminate\Support\Str;use App\Notifications\Forms\FormEmailNotification;@@ -12,10 +13,10 @@ trait TracksEmailIntegrationprivate ?string $emailTrackingId = null;private bool $emailSendAttempted = false;- public function run(): void+ public function run(?FormIntegrationsEvent $attempt = null): FormIntegrationsEvent{$this->emailTrackingId = (string) Str::uuid();- $this->formIntegration->events()->createQuietly([+ $attributes = ['tracking_id' => $this->emailTrackingId,'status' => 'processing','data' => [@@ -23,7 +24,14 @@ trait TracksEmailIntegration'notion_page_id' => $this->submissionData['notion_page_id'] ?? null,'email' => ['version' => 1, 'recipients' => []],],- ]);+ ];+ if ($attempt) {+ $attributes['data'] = array_merge((array) $attempt->data, $attributes['data']);+ $attempt->fill($attributes)->saveQuietly();+ $integrationEvent = $attempt;+ } else {+ $integrationEvent = $this->formIntegration->events()->createQuietly($attributes);+ }try {$this->handle();} catch (\Throwable $e) {@@ -45,6 +53,21 @@ trait TracksEmailIntegration'tracking_id' => $this->emailTrackingId, 'exception_type' => get_class($e),]);}+ try {+ return $integrationEvent->refresh();+ } catch (\Throwable $exception) {+ if ($attempt) {+ throw $exception;+ }++ // Reading delivery history must not replay an ordinary notification or stop other integrations.+ \Illuminate\Support\Facades\Log::error('Could not read final email outcome', [+ 'tracking_id' => $this->emailTrackingId,+ 'exception_type' => get_class($exception),+ ]);++ return $integrationEvent;+ }}private function emailSkipped(string $reason): voiddiff --git a/api/app/Models/Integration/FormIntegrationsEvent.php b/api/app/Models/Integration/FormIntegrationsEvent.phpindex 68569c725..0ddaccde2 100644--- a/api/app/Models/Integration/FormIntegrationsEvent.php+++ b/api/app/Models/Integration/FormIntegrationsEvent.php@@ -40,4 +40,67 @@ class FormIntegrationsEvent extends Model{return $this->belongsTo(FormIntegration::class, 'integration_id');}++ public function getSubmissionId(): ?int+ {+ $id = filter_var(data_get($this->data, 'submission_id'), FILTER_VALIDATE_INT);++ return $id !== false && $id > 0 ? $id : null;+ }++ public function canRetry(): bool+ {+ return $this->retryUnavailableReason() === null;+ }++ public function retryUnavailableReason(?self $latestEvent = null, ?bool $submissionAvailable = null): ?string+ {+ if ($this->status !== self::STATUS_ERROR) {+ return 'Only failed events can be retried.';+ }++ $submissionId = $this->getSubmissionId();+ if (!$submissionId) {+ return 'This event cannot be retried because submission data is unavailable.';+ }++ $integration = $this->integration;+ if (!$integration || $integration->status !== FormIntegration::STATUS_ACTIVE) {+ return 'Activate this integration before retrying an event.';+ }++ $latestEvent ??= $integration->events()->where('data->submission_id', $submissionId)->orderByDesc('id')->first();+ if ($latestEvent && $latestEvent->id !== $this->id) {+ return in_array($latestEvent->status, [self::STATUS_SUCCESS, 'accepted', 'delivered'], true)+ ? 'This event has already been successfully retried.'+ : 'A more recent attempt exists for this submission. Refresh the history to review it.';+ }++ $submissionAvailable ??= $integration->form->submissions()+ ->whereKey($submissionId)->where('status', \App\Models\Forms\FormSubmission::STATUS_COMPLETED)->exists();+ if (!$submissionAvailable) {+ return 'This event cannot be retried because the completed submission is no longer available.';+ }++ if ($integration->integration_id === 'email') {+ if (!$this->tracking_id || data_get($this->data, 'email.version') !== 1) {+ return 'Delivery details are unavailable for this email. Review its delivery before sending again.';+ }++ $recipients = data_get($this->data, 'email.recipients');+ if (!is_array($recipients) && !is_object($recipients)) {+ return 'Email recipient outcomes are unavailable. Review delivery before sending again.';+ }+ if (data_get($this->data, 'email.outcome') === 'unknown') {+ return 'Email delivery is uncertain. Review recipient outcomes before sending again.';+ }+ foreach ($recipients as $recipient) {+ if (!in_array(data_get($recipient, 'status'), ['invalid', 'blocked', 'not_sent', 'rejected'], true)) {+ return 'Some recipients may already have received this email. Review recipient outcomes before sending again.';+ }+ }+ }++ return null;+ }}diff --git a/api/app/Providers/RouteServiceProvider.php b/api/app/Providers/RouteServiceProvider.phpindex 4dd8638fa..cb14b1a5f 100644--- a/api/app/Providers/RouteServiceProvider.php+++ b/api/app/Providers/RouteServiceProvider.php@@ -52,6 +52,10 @@ class RouteServiceProvider extends ServiceProviderreturn Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());});+ RateLimiter::for('integration-retries', function (Request $request) {+ return Limit::perMinute(10)->by($request->user()?->id ?: $request->ip());+ });+RateLimiter::for('password-reset', function (Request $request) {$ip = $request->ip();$requestedEmail = $request->input('email');diff --git a/api/app/Service/Integrations/RetryIntegrationEvent.php b/api/app/Service/Integrations/RetryIntegrationEvent.phpnew file mode 100644index 000000000..809ddd38c--- /dev/null+++ b/api/app/Service/Integrations/RetryIntegrationEvent.php@@ -0,0 +1,53 @@+<?php++namespace App\Service\Integrations;++use App\Events\Forms\FormSubmitted;+use App\Listeners\Forms\NotifyFormSubmission;+use App\Models\Forms\FormSubmission;+use App\Models\Integration\FormIntegration;+use App\Models\Integration\FormIntegrationsEvent;+use Illuminate\Support\Facades\DB;+use Illuminate\Validation\ValidationException;++class RetryIntegrationEvent+{+ public function handle(FormIntegration $integration, int $eventId): FormIntegrationsEvent+ {+ // Reserve a durable attempt under a short lock, before any external send.+ [$handler, $attempt] = DB::transaction(function () use ($integration, $eventId) {+ $integration = FormIntegration::whereKey($integration->id)->lockForUpdate()->firstOrFail();+ $event = $integration->events()->findOrFail($eventId);+ $event->setRelation('integration', $integration);++ if ($reason = $event->retryUnavailableReason()) {+ throw ValidationException::withMessages(['event' => [$reason]]);+ }++ $submission = $integration->form->submissions()->whereKey($event->getSubmissionId())+ ->where('status', FormSubmission::STATUS_COMPLETED)->lockForUpdate()->first();+ if (!$submission) {+ throw ValidationException::withMessages(['event' => ['The completed submission is no longer available.']]);+ }++ $handler = NotifyFormSubmission::getIntegrationHandler(+ new FormSubmitted(+ $integration->form,+ array_merge($submission->data ?? [], ['submission_id' => $submission->id]),+ $submission->meta ?? []+ ),+ $integration+ );+ $attempt = $integration->events()->createQuietly([+ 'status' => 'processing',+ 'data' => ['submission_id' => $submission->id, 'retry_of' => $event->id],+ ]);+ $attempt->setRelation('integration', $integration);++ return [$handler, $attempt];+ });++ // A crash or persistence failure leaves the committed attempt visible and blocks replay.+ return $handler->run($attempt);+ }+}diff --git a/api/config/sanctum-routes.php b/api/config/sanctum-routes.phpindex f76fb724c..03b69b3d9 100644--- a/api/config/sanctum-routes.php+++ b/api/config/sanctum-routes.php@@ -22,6 +22,7 @@ return ['open.forms.integrations.update','open.forms.integrations.destroy','open.forms.integrations.events',+ 'open.forms.integrations.events.retry',// Workspace CRUD'open.workspaces.index',diff --git a/api/routes/api.php b/api/routes/api.phpindex a99aa3f64..c6af0883a 100644--- a/api/routes/api.php+++ b/api/routes/api.php@@ -324,6 +324,11 @@ Route::group(['middleware' => 'auth.multi'], function () {'/{form}/integrations/{integrationid}/events',[FormIntegrationsEventController::class, 'index'])->name('integrations.events');+ Route::post(+ '/{form}/integrations/{integrationid}/events/{event}/retry',+ [FormIntegrationsEventController::class, 'retry']+ )->whereNumber(['integrationid', 'event'])+ ->middleware('throttle:integration-retries')->name('integrations.events.retry');// PDF TemplatesRoute::prefix('/{form}/pdf-templates')->name('pdf-templates.')->group(function () {diff --git a/api/tests/Feature/Forms/FormIntegrationEventTest.php b/api/tests/Feature/Forms/FormIntegrationEventTest.phpindex 088d1b39b..dfebac7be 100644--- a/api/tests/Feature/Forms/FormIntegrationEventTest.php+++ b/api/tests/Feature/Forms/FormIntegrationEventTest.php@@ -1,5 +1,9 @@<?php+use App\Models\Forms\FormSubmission;+use App\Models\Integration\FormIntegrationsEvent;+use Illuminate\Support\Facades\Http;+it('can fetch form integration events', function () {$user = $this->actingAsProUser();$workspace = $this->createUserWorkspace($user);@@ -62,3 +66,250 @@ it('prevents fetching another form integration events via mismatched form and in$this->getJson(route('open.forms.integrations.events', [$attackerForm, $victimIntegrationId]))->assertStatus(404);});++it('can retry a failed integration event', function () {+ Http::fake([+ 'https://example.com/*' => Http::sequence()+ ->push(['error' => 'Server error'], 500)+ ->push(['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,+ ],+ ],+ ]);++ $integrationResponse = $this->postJson(route('open.forms.integrations.create', $form), [+ 'status' => 'active',+ 'integration_id' => 'webhook',+ 'logic' => null,+ 'data' => [+ 'webhook_url' => 'https://example.com/webhook',+ ],+ ])->assertSuccessful();++ $integrationId = $integrationResponse->json('form_integration.id');++ $this->postJson(route('forms.answer', $form->slug), $this->generateFormSubmissionData($form))+ ->assertSuccessful();++ $failedEvent = FormIntegrationsEvent::where('integration_id', $integrationId)+ ->where('status', FormIntegrationsEvent::STATUS_ERROR)+ ->first();++ expect($failedEvent)->not->toBeNull();++ $this->postJson(route('open.forms.integrations.events.retry', [$form, $integrationId, $failedEvent->id]))+ ->assertSuccessful()+ ->assertJson([+ 'type' => 'success',+ 'message' => 'Event retried successfully.',+ 'event' => [+ 'status' => 'Success',+ ],+ ]);++ Http::assertSentCount(2);++ $this->getJson(route('open.forms.integrations.events', [$form, $integrationId]))+ ->assertSuccessful()+ ->assertJsonFragment([+ 'id' => $failedEvent->id,+ 'can_retry' => false,+ ]);+});++it('rejects retrying a successful integration event', 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,+ ],+ ],+ ]);++ $integrationResponse = $this->postJson(route('open.forms.integrations.create', $form), [+ 'status' => 'active',+ 'integration_id' => 'webhook',+ 'logic' => null,+ 'data' => [+ 'webhook_url' => 'https://example.com/webhook',+ ],+ ])->assertSuccessful();++ $integrationId = $integrationResponse->json('form_integration.id');++ $this->postJson(route('forms.answer', $form->slug), $this->generateFormSubmissionData($form))+ ->assertSuccessful();++ $successEvent = FormIntegrationsEvent::where('integration_id', $integrationId)+ ->where('status', FormIntegrationsEvent::STATUS_SUCCESS)+ ->first();++ $this->postJson(route('open.forms.integrations.events.retry', [$form, $integrationId, $successEvent->id]))+ ->assertStatus(422)+ ->assertJson([+ 'message' => 'Only failed events can be retried.',+ ]);+});++it('rejects retrying a failed event without submission data', function () {+ $user = $this->actingAsProUser();+ $workspace = $this->createUserWorkspace($user);+ $form = $this->createForm($user, $workspace);++ $integrationResponse = $this->postJson(route('open.forms.integrations.create', $form), [+ 'status' => 'active',+ 'integration_id' => 'webhook',+ 'logic' => null,+ 'data' => [+ 'webhook_url' => 'https://example.com/webhook',+ ],+ ])->assertSuccessful();++ $integrationId = $integrationResponse->json('form_integration.id');++ $failedEvent = FormIntegrationsEvent::create([+ 'integration_id' => $integrationId,+ 'status' => FormIntegrationsEvent::STATUS_ERROR,+ 'data' => ['message' => 'Connection failed'],+ ]);++ $this->postJson(route('open.forms.integrations.events.retry', [$form, $integrationId, $failedEvent->id]))+ ->assertStatus(422)+ ->assertJson([+ 'message' => 'This event cannot be retried because submission data is unavailable.',+ ]);+});++it('includes can_retry in integration event responses', function () {+ $user = $this->actingAsProUser();+ $workspace = $this->createUserWorkspace($user);+ $form = $this->createForm($user, $workspace);++ $integrationResponse = $this->postJson(route('open.forms.integrations.create', $form), [+ 'status' => 'active',+ 'integration_id' => 'webhook',+ 'logic' => null,+ 'data' => [+ 'webhook_url' => 'https://example.com/webhook',+ ],+ ])->assertSuccessful();++ $integrationId = $integrationResponse->json('form_integration.id');+ $submission = new FormSubmission([+ 'data' => ['name' => 'Test'],+ 'status' => FormSubmission::STATUS_COMPLETED,+ ]);+ $submission->form_id = $form->id;+ $submission->save();++ $otherSubmission = new FormSubmission([+ 'data' => ['name' => 'Other'],+ 'status' => FormSubmission::STATUS_COMPLETED,+ ]);+ $otherSubmission->form_id = $form->id;+ $otherSubmission->save();++ $retryableFailedEvent = FormIntegrationsEvent::create([+ 'integration_id' => $integrationId,+ 'status' => FormIntegrationsEvent::STATUS_ERROR,+ 'data' => [+ 'submission_id' => $otherSubmission->id,+ 'message' => 'Connection failed',+ ],+ ]);++ $alreadyRetriedFailedEvent = FormIntegrationsEvent::create([+ 'integration_id' => $integrationId,+ 'status' => FormIntegrationsEvent::STATUS_ERROR,+ 'data' => [+ 'submission_id' => $submission->id,+ 'message' => 'Connection failed',+ ],+ ]);++ FormIntegrationsEvent::create([+ 'integration_id' => $integrationId,+ 'status' => FormIntegrationsEvent::STATUS_SUCCESS,+ 'data' => ['submission_id' => $submission->id],+ ]);++ $this->getJson(route('open.forms.integrations.events', [$form, $integrationId]))+ ->assertSuccessful()+ ->assertJsonFragment([+ 'id' => $retryableFailedEvent->id,+ 'can_retry' => true,+ ])+ ->assertJsonFragment([+ 'id' => $alreadyRetriedFailedEvent->id,+ 'can_retry' => false,+ ]);+});++it('rejects retrying a failed event that was already successfully retried', function () {+ Http::fake([+ 'https://example.com/*' => Http::response(['ok' => true], 200),+ ]);++ $user = $this->actingAsProUser();+ $workspace = $this->createUserWorkspace($user);+ $form = $this->createForm($user, $workspace);++ $integrationResponse = $this->postJson(route('open.forms.integrations.create', $form), [+ 'status' => 'active',+ 'integration_id' => 'webhook',+ 'logic' => null,+ 'data' => [+ 'webhook_url' => 'https://example.com/webhook',+ ],+ ])->assertSuccessful();++ $integrationId = $integrationResponse->json('form_integration.id');+ $submission = new FormSubmission([+ 'data' => ['name' => 'Test'],+ 'status' => FormSubmission::STATUS_COMPLETED,+ ]);+ $submission->form_id = $form->id;+ $submission->save();++ $failedEvent = FormIntegrationsEvent::create([+ 'integration_id' => $integrationId,+ 'status' => FormIntegrationsEvent::STATUS_ERROR,+ 'data' => [+ 'submission_id' => $submission->id,+ 'message' => 'Connection failed',+ ],+ ]);++ FormIntegrationsEvent::create([+ 'integration_id' => $integrationId,+ 'status' => FormIntegrationsEvent::STATUS_SUCCESS,+ 'data' => ['submission_id' => $submission->id],+ ]);++ $this->postJson(route('open.forms.integrations.events.retry', [$form, $integrationId, $failedEvent->id]))+ ->assertStatus(422)+ ->assertJson([+ 'message' => 'This event has already been successfully retried.',+ ]);+});diff --git a/api/tests/Feature/Forms/IntegrationEventRetryTest.php b/api/tests/Feature/Forms/IntegrationEventRetryTest.phpnew file mode 100644index 000000000..642169622--- /dev/null+++ b/api/tests/Feature/Forms/IntegrationEventRetryTest.php@@ -0,0 +1,279 @@+<?php++use App\Events\Models\FormIntegrationsEventCreated;+use App\Http\Resources\FormIntegrationsEventResource;+use App\Models\Forms\FormSubmission;+use App\Models\Integration\FormIntegration;+use Illuminate\Support\Facades\Event;+use Illuminate\Support\Facades\Http;+use Illuminate\Support\Facades\Mail;+use Illuminate\Support\Facades\Auth;++beforeEach(function () {+ Http::fake(fn () => Http::response(['ok' => true], $this->webhookStatus ?? 200));+ Mail::fake();+ $this->user = $this->actingAsProUser();+ $this->workspace = $this->createUserWorkspace($this->user);+ $this->form = $this->createForm($this->user, $this->workspace, [+ 'properties' => [['id' => 'name', 'name' => 'Name', 'type' => 'text']],+ ]);+ $this->integration = FormIntegration::create([+ 'form_id' => $this->form->id, 'status' => 'active', 'integration_id' => 'webhook',+ 'data' => ['webhook_url' => 'https://example.com/webhook'],+ ]);+ $this->submission = $this->form->submissions()->create([+ 'data' => ['name' => 'Latest answer'], 'status' => FormSubmission::STATUS_COMPLETED,+ 'meta' => ['attribution' => ['utm_source' => 'newsletter']],+ ]);+ $this->failedEvent = $this->integration->events()->create([+ 'status' => 'error', 'data' => ['submission_id' => $this->submission->id, 'message' => 'Connection failed'],+ ]);+ $this->retryUrl = route('open.forms.integrations.events.retry', [$this->form, $this->integration->id, $this->failedEvent->id]);+ $this->eventsUrl = route('open.forms.integrations.events', [$this->form, $this->integration->id]);+});++it('rejects inactive integrations and reports why in the history', function () {+ $this->integration->update(['status' => 'inactive']);+ $this->getJson($this->eventsUrl)->assertJsonFragment(['id' => $this->failedEvent->id, 'can_retry' => false]);+ $this->postJson($this->retryUrl)->assertUnprocessable();+ Http::assertNothingSent();+});++it('rejects unavailable or incomplete submissions in both the API and the history', function ($state) {+ if ($state === 'deleted') {+ $this->submission->delete();+ } else {+ $this->submission->update(['status' => FormSubmission::STATUS_PARTIAL]);+ }+ $this->getJson($this->eventsUrl)->assertJsonFragment(['id' => $this->failedEvent->id, 'can_retry' => false]);+ $this->postJson($this->retryUrl)->assertUnprocessable();+ Http::assertNothingSent();+})->with(['deleted', 'partial']);++it('only offers the latest failed attempt for the same submission', function () {+ $latest = $this->integration->events()->create(['status' => 'error', 'data' => ['submission_id' => $this->submission->id]]);+ $this->getJson($this->eventsUrl)+ ->assertJsonFragment(['id' => $this->failedEvent->id, 'can_retry' => false])+ ->assertJsonFragment(['id' => $latest->id, 'can_retry' => true]);+ $this->postJson($this->retryUrl)->assertUnprocessable();+ Http::assertNothingSent();+});++it('returns the actual retry result when another submission creates a newer event', function () {+ \App\Models\Integration\FormIntegrationsEvent::updated(function ($event) {+ if ($event->status === 'success') {+ $this->integration->events()->createQuietly([+ 'status' => 'error', 'data' => ['submission_id' => $this->submission->id + 1000],+ ]);+ }+ });+ Event::listen(FormIntegrationsEventCreated::class, function ($event) {+ if ($event->formIntegrationsEvent->status === 'success') {+ $this->integration->events()->createQuietly([+ 'status' => 'error', 'data' => ['submission_id' => $this->submission->id + 1000],+ ]);+ }+ });+ $response = $this->postJson($this->retryUrl)->assertSuccessful()->assertJsonPath('event.status', 'Success');+ expect($response->json('event.data.submission_id'))->toBe($this->submission->id);+ Http::assertSentCount(1);+});++it('preserves attribution metadata and uses the current stored answers', function () {+ $this->postJson($this->retryUrl)->assertSuccessful();+ Http::assertSent(fn ($request) => $request['submission_id'] === $this->submission->id+ && $request['data']['name']['value'] === 'Latest answer'+ && $request['meta']['attribution']['utm_source'] === 'newsletter');+});++it('reports skipped conditions without claiming a successful send', function () {+ $this->integration->update(['logic' => ['value' => [+ 'property_meta' => ['id' => 'name', 'type' => 'text'], 'operator' => 'equals', 'value' => 'Different answer',+ ]]]);+ $this->postJson($this->retryUrl)->assertSuccessful()->assertJsonPath('event.status', 'Skipped');+ Http::assertNothingSent();+});++it('blocks email retries when any recipient may already have received the message', function ($recipientStatus) {+ $this->integration->update(['integration_id' => 'email']);+ $this->failedEvent->update([+ 'tracking_id' => (string) \Illuminate\Support\Str::uuid(),+ 'data' => ['submission_id' => $this->submission->id, 'email' => ['version' => 1, 'recipients' => [+ 'one' => ['address' => 'bad', 'status' => 'invalid'],+ 'two' => ['address' => '[email protected]', 'status' => $recipientStatus],+ ]]],+ ]);+ $this->getJson($this->eventsUrl)->assertJsonFragment(['id' => $this->failedEvent->id, 'can_retry' => false]);+ $this->postJson($this->retryUrl)->assertUnprocessable();+ Mail::assertNothingSent();+})->with(['accepted', 'delivered', 'unknown', 'sending', 'pending', 'bounced', 'complained']);++it('does not share retry eligibility between resource collections', function () {+ $otherIntegration = FormIntegration::create([+ 'form_id' => $this->form->id, 'status' => 'active', 'integration_id' => 'webhook',+ 'data' => ['webhook_url' => 'https://example.com/other'],+ ]);+ $other = $otherIntegration->events()->create(['status' => 'success', 'data' => ['submission_id' => $this->submission->id]]);+ FormIntegrationsEventResource::collection(collect([$other]))->resolve();+ expect(FormIntegrationsEventResource::make($this->failedEvent)->resolve()['can_retry'])->toBeTrue();+});++it('scopes the event and submission to the requested integration and form', function () {+ $otherIntegration = FormIntegration::create([+ 'form_id' => $this->form->id, 'status' => 'active', 'integration_id' => 'webhook',+ 'data' => ['webhook_url' => 'https://example.com/other'],+ ]);+ $other = $otherIntegration->events()->create(['status' => 'error', 'data' => ['submission_id' => $this->submission->id]]);+ $this->postJson(route('open.forms.integrations.events.retry', [$this->form, $this->integration->id, $other->id]))->assertNotFound();+ $otherForm = $this->createForm($this->user, $this->workspace);+ $otherSubmission = $otherForm->submissions()->create(['status' => 'completed', 'data' => []]);+ $this->failedEvent->update(['data' => ['submission_id' => $otherSubmission->id]]);+ $this->postJson($this->retryUrl)->assertUnprocessable();+ Http::assertNothingSent();+});++it('requires integration management permission for personal access tokens', function ($abilities, $allowed) {+ $this->actingAsGuest();+ $token = $this->user->createToken('integration-retry-test', $abilities)->plainTextToken;+ Auth::forgetGuards();+ $this->withToken($token);+ $response = $this->postJson($this->retryUrl);+ $allowed ? $response->assertSuccessful() : $response->assertForbidden();+ Http::assertSentCount($allowed ? 1 : 0);+})->with([+ 'read token' => [['forms-read'], false],+ 'write token' => [['forms-write'], false],+ 'integration token' => [['manage-integrations'], true],+]);++it('records another failure and refuses replaying the original attempt', function () {+ $this->webhookStatus = 503;+ $result = $this->postJson($this->retryUrl)->assertSuccessful()+ ->assertJsonPath('type', 'error')->assertJsonPath('event.status', 'Error');+ expect($result->json('event.id'))->toBeGreaterThan($this->failedEvent->id);+ $this->postJson($this->retryUrl)->assertUnprocessable();+ $this->getJson($this->eventsUrl)+ ->assertJsonFragment(['id' => $this->failedEvent->id, 'can_retry' => false])+ ->assertJsonFragment(['id' => $result->json('event.id'), 'can_retry' => true]);+ Http::assertSentCount(1);+});++it('rejects legacy email events whose recipient outcomes are unavailable', function () {+ $this->integration->update(['integration_id' => 'email']);+ $this->postJson($this->retryUrl)->assertUnprocessable();+ $this->getJson($this->eventsUrl)->assertJsonFragment(['id' => $this->failedEvent->id, 'can_retry' => false]);+ Mail::assertNothingSent();+});++it('returns the new tracked email event for a safe retry without claiming delivery', function () {+ \Illuminate\Support\Facades\Notification::fake();+ $this->integration->update(['integration_id' => 'email', 'data' => [+ 'send_to' => '[email protected]', 'subject' => 'Submission', 'sender_name' => 'OpnForm',+ 'email_content' => 'New submission', 'include_submission_data' => false,+ ]]);+ $this->failedEvent->update([+ 'tracking_id' => (string) \Illuminate\Support\Str::uuid(),+ 'data' => ['submission_id' => $this->submission->id, 'email' => ['version' => 1, 'recipients' => [+ 'one' => ['address' => 'invalid', 'status' => 'invalid'],+ ]]],+ ]);+ $result = $this->postJson($this->retryUrl)->assertSuccessful()+ ->assertJsonPath('type', 'error')->assertJsonPath('event.status', 'Error')+ ->assertJsonPath('event.email_tracking', true);+ expect($result->json('event.id'))->toBeGreaterThan($this->failedEvent->id);+ expect($result->json('event.tracking_id'))->not->toBe($this->failedEvent->tracking_id);+ \Illuminate\Support\Facades\Notification::assertSentOnDemand(\App\Notifications\Forms\FormEmailNotification::class);+});++it('denies read-only workspace members and users outside the workspace', function ($role) {+ $otherUser = $this->createProUser();+ if ($role === 'readonly') {+ $this->workspace->users()->attach($otherUser, ['role' => 'readonly']);+ }+ $this->actingAs($otherUser, 'api');+ $this->postJson($this->retryUrl)->assertForbidden();+ Http::assertNothingSent();+})->with(['readonly', 'outsider']);++it('limits retry requests without sending extra requests to the destination', function () {+ $this->withMiddleware(\Illuminate\Routing\Middleware\ThrottleRequests::class);+ $this->integration->update(['status' => 'inactive']);+ for ($attempt = 0; $attempt < 10; $attempt++) {+ $this->postJson($this->retryUrl)->assertUnprocessable();+ }+ $this->postJson($this->retryUrl)->assertTooManyRequests()->assertHeader('Retry-After');+ Http::assertNothingSent();+});++it('keeps a committed attempt when execution is interrupted and blocks a second send', function () {+ Http::swap(new \Illuminate\Http\Client\Factory());+ $sendAttempts = 0;+ Http::fake(function () use (&$sendAttempts) {+ $sendAttempts++;+ throw new Error('Simulated interruption after a possible send');+ });+ expect(fn () => app(\App\Service\Integrations\RetryIntegrationEvent::class)->handle($this->integration, $this->failedEvent->id))+ ->toThrow(Error::class);+ $attempt = $this->integration->events()->orderByDesc('id')->first();+ expect($attempt->status)->toBe('processing');+ expect(data_get($attempt->data, 'retry_of'))->toBe($this->failedEvent->id);+ $this->postJson($this->retryUrl)->assertUnprocessable();+ $this->getJson($this->eventsUrl)->assertJsonFragment(['id' => $this->failedEvent->id, 'can_retry' => false]);+ expect($sendAttempts)->toBe(1);+});++it('rejects malformed retry route identifiers', function ($eventId) {+ $this->postJson(route('open.forms.integrations.events.retry', [$this->form, $this->integration->id, $eventId]))->assertNotFound();+ Http::assertNothingSent();+})->with(['invalid', '0', '-1', '9223372036854775808', str_repeat('9', 40)]);++it('keeps the reserved attempt when saving a successful send fails', function () {+ \App\Models\Integration\FormIntegrationsEvent::updating(function ($event) {+ if ($event->status === 'success') {+ throw new RuntimeException('Simulated persistence failure after sending');+ }+ });++ expect(fn () => app(\App\Service\Integrations\RetryIntegrationEvent::class)->handle($this->integration, $this->failedEvent->id))+ ->toThrow(RuntimeException::class);+ $attempt = $this->integration->events()->orderByDesc('id')->first();+ expect($attempt->status)->toBe('processing');+ $this->postJson($this->retryUrl)->assertUnprocessable();+ Http::assertSentCount(1);+});++it('blocks tracked email failures without structured recipient outcomes', function () {+ $this->integration->update(['integration_id' => 'email']);+ $this->failedEvent->update([+ 'tracking_id' => (string) \Illuminate\Support\Str::uuid(),+ 'data' => ['submission_id' => $this->submission->id, 'email' => ['version' => 1]],+ ]);+ $this->postJson($this->retryUrl)->assertUnprocessable();+ Mail::assertNothingSent();+});++it('continues other integrations without making a sent event retryable when its success cannot be recorded', function () {+ $firstIntegrationId = $this->integration->id;+ \App\Models\Integration\FormIntegrationsEvent::creating(function ($event) use ($firstIntegrationId) {+ if ($event->integration_id === $firstIntegrationId && $event->status === 'success') {+ throw new RuntimeException('Simulated persistence failure after sending');+ }+ });+ $other = FormIntegration::create([+ 'form_id' => $this->form->id, 'status' => 'active', 'integration_id' => 'webhook',+ 'data' => ['webhook_url' => 'https://example.com/other'],+ ]);++ (new \App\Listeners\Forms\NotifyFormSubmission())->handle(new \App\Events\Forms\FormSubmitted(+ $this->form,+ ['name' => 'Latest answer', 'submission_id' => $this->submission->id]+ ));++ Http::assertSentCount(2);+ Http::assertSent(fn ($request) => $request->url() === 'https://example.com/other');+ $uncertain = $this->integration->events()->latest('id')->first();+ expect($uncertain->status)->toBe('unknown');+ expect($uncertain->canRetry())->toBeFalse();+ expect($this->failedEvent->canRetry())->toBeFalse();+ expect($other->events()->first()->status)->toBe('success');+});diff --git a/api/tests/Unit/EmailDeliveryTrackingTest.php b/api/tests/Unit/EmailDeliveryTrackingTest.phpindex 67de74d45..08421f049 100644--- a/api/tests/Unit/EmailDeliveryTrackingTest.php+++ b/api/tests/Unit/EmailDeliveryTrackingTest.php@@ -285,6 +285,43 @@ it('does not retry the sending job when tracking persistence fails after a possiexpect(FormIntegrationsEvent::where('integration_id', 7)->sole()->status)->toBe('processing');});+it('does not fail ordinary email delivery when the final outcome read is unavailable', function ($reserved) {+ $integration = new FormIntegration();+ $integration->id = 7;+ $attempt = $reserved ? FormIntegrationsEvent::createQuietly([+ 'integration_id' => 7, 'status' => 'processing', 'data' => [],+ ]) : null;+ $failRefresh = true;+ $failedReads = 0;+ \Illuminate\Support\Facades\DB::connection()->beforeExecuting(function ($query) use (&$failRefresh, &$failedReads) {+ if ($failRefresh && str_starts_with($query, 'select')+ && str_contains($query, 'form_integrations_events') && str_contains($query, '"id" =')) {+ $failedReads++;+ throw new RuntimeException('Outcome read unavailable after email acceptance');+ }+ });+ \Illuminate\Support\Facades\Notification::shouldReceive('send')->twice()->andReturnUsing(function ($notifiable, $notification) {+ $context = $notification->emailTracking;+ $this->tracker->recipient($context['event'], $context['recipient'], ['status' => 'accepted']);+ });++ try {+ $handler = new TrackedEmailHarness($integration);+ if ($reserved) {+ expect(fn () => $handler->run($attempt))->toThrow(RuntimeException::class);+ } else {+ $result = $handler->run();+ expect($result->status)->toBe('processing');+ expect($result->canRetry())->toBeFalse();+ }+ } finally {+ $failRefresh = false;+ }++ expect($failedReads)->toBe(1);+ expect(FormIntegrationsEvent::where('integration_id', 7)->sole()->status)->toBe('accepted');+})->with(['ordinary delivery' => false, 'reserved retry' => true]);+it('does not refresh event timestamps for unmatched or duplicate feedback', function () {$this->tracker->feedback(emailFeedback($this));$before = $this->event->fresh()->getAttributes();diff --git a/client/api/forms.js b/client/api/forms.jsindex b3f7ccbaa..6439a62a6 100644--- a/client/api/forms.js+++ b/client/api/forms.js@@ -75,7 +75,8 @@ export const formsApi = {create: (formId, data) => apiService.post(`/open/forms/${formId}/integrations`, data),update: (formId, integrationId, data) => apiService.put(`/open/forms/${formId}/integrations/${integrationId}`, data),delete: (formId, integrationId) => apiService.delete(`/open/forms/${formId}/integrations/${integrationId}`),- events: (formId, integrationId, options) => apiService.get(`/open/forms/${formId}/integrations/${integrationId}/events`, options)+ events: (formId, integrationId, options) => apiService.get(`/open/forms/${formId}/integrations/${integrationId}/events`, options),+ retryEvent: (formId, integrationId, eventId) => apiService.post(`/open/forms/${formId}/integrations/${integrationId}/events/${eventId}/retry`)},// Zapier webhooksdiff --git a/client/components/open/integrations/components/IntegrationEventsModal.vue b/client/components/open/integrations/components/IntegrationEventsModal.vueindex 7e128cbe1..df8ddacc8 100644--- a/client/components/open/integrations/components/IntegrationEventsModal.vue+++ b/client/components/open/integrations/components/IntegrationEventsModal.vue@@ -2,14 +2,36 @@<UModalv-model:open="isOpen":ui="{ content: 'sm:max-w-4xl' }"- title="Past Events"+ title="Integration events"+ description="Review delivery attempts and retry eligible failures."><template #body>+ <UAlert+ v-if="loadError"+ color="error"+ variant="subtle"+ title="Could not load integration events"+ :description="loadError"+ class="mb-4"+ />+ <p class="mb-3 text-xs text-neutral-500 sm:hidden">+ Swipe horizontally to see event details and actions.+ </p><UTable:loading="integrationEventsLoading":columns="columns":data="integrationEvents"+ :ui="{ base: 'min-w-[44rem]' }"+ aria-label="Integration event history"+ tabindex="0"+ empty="No integration events yet.">+ <template #date-cell="{ row }">+ <span class="whitespace-nowrap">{{ row.original.date }}</span>+ </template>+ <template #submission-cell="{ row }">+ <span>{{ row.original.data?.submission_id ? `#${row.original.data.submission_id}` : '—' }}</span>+ </template><template #status-cell="{ row }"><UBadge variant="subtle" :color="eventColor(row.original)" :label="eventLabel(row.original)" /></template>@@ -24,17 +46,45 @@/><span v-else>-</span></template>+ <template #actions-cell="{ row }">+ <UButton+ v-if="row.original.can_retry"+ color="primary"+ variant="soft"+ size="sm"+ icon="i-heroicons-arrow-path"+ label="Retry"+ :aria-label="`Retry event ${row.original.id} for submission ${row.original.data?.submission_id}`"+ :loading="retryingEventId === row.original.id"+ :disabled="retryingEventId !== null || integrationEventsLoading"+ @click="eventToRetry = row.original"+ />+ <span+ v-else-if="row.original.status === 'Error' && row.original.retry_unavailable_reason"+ class="block max-w-56 whitespace-normal text-xs text-neutral-500"+ >+ {{ row.original.retry_unavailable_reason }}+ </span>+ </template></UTable></template><template #footer>- <UButton color="neutral" variant="outline" label="Refresh" :loading="integrationEventsLoading" @click="fetchEvents" />- <UButton- color="neutral"- variant="outline"- @click="close"- label="Close"- />+ <UButton color="neutral" variant="outline" label="Refresh" :loading="integrationEventsLoading" :disabled="retryingEventId !== null" @click="fetchEvents" />+ <UButton color="neutral" variant="outline" label="Close" @click="close" />+ </template>+ </UModal>++ <UModal+ :open="eventToRetry !== null"+ :title="`Retry submission #${eventToRetry?.data?.submission_id ?? ''}?`"+ description="Only this integration will run, using the latest saved answers and current settings. This may create duplicates."+ :ui="{ footer: 'justify-end' }"+ @update:open="value => { if (!value) eventToRetry = null }"+ >+ <template #footer>+ <UButton color="neutral" variant="outline" label="Cancel" @click="eventToRetry = null" />+ <UButton icon="i-heroicons-arrow-path" label="Retry integration" :disabled="retryingEventId !== null" @click="retryEvent" /></template></UModal></template>@@ -54,50 +104,85 @@ const props = defineProps({const emit = defineEmits(["close"])const alert = useAlert()--// Modal stateconst isOpen = computed({- get() {- return props.show- },- set(value) {- if (!value) {- close()- }- }+ get: () => props.show,+ set: (value) => { if (!value) close() },})const columns = [{ accessorKey: "date", header: "Date" },+ { id: "submission", header: "Submission" },{ accessorKey: "status", header: "Status" },{ accessorKey: "data", header: "Info" },+ { id: "actions", header: "Action" },]const integrationEvents = ref([])const integrationEventsLoading = ref(false)+const loadError = ref(null)+const retryingEventId = ref(null)+const eventToRetry = ref(null)+let fetchRequestId = 0++function fetchEvents() {+ if (!props.show) return Promise.resolve()++ const requestId = ++fetchRequestId+ integrationEventsLoading.value = true+ loadError.value = null+ return formsApi.integrations.events(props.form.id, props.formIntegrationId).then((data) => {+ if (requestId === fetchRequestId) integrationEvents.value = data+ }).catch(() => {+ if (requestId === fetchRequestId) loadError.value = "Please refresh to try again."+ }).finally(() => {+ if (requestId === fetchRequestId) integrationEventsLoading.value = false+ })+}++function retryEvent() {+ if (!eventToRetry.value || retryingEventId.value !== null) return++ const event = eventToRetry.value+ const formId = props.form.id+ const integrationId = props.formIntegrationId+ const isCurrentIntegration = () => props.show && props.form.id === formId && props.formIntegrationId === integrationId+ eventToRetry.value = null+ retryingEventId.value = event.id++ return formsApi.integrations.retryEvent(formId, integrationId, event.id).then((data) => {+ if (data.type === "error") {+ alert.error(data.message || "The retry failed. Review the latest event for details.")+ } else if (data.type === "success") {+ alert.success(data.message)+ } else {+ alert.warning(data.message || "Review the latest event to check the retry outcome.")+ }+ if (isCurrentIntegration()) {+ integrationEvents.value = integrationEvents.value.map((item) => item.data?.submission_id === event.data?.submission_id+ ? { ...item, can_retry: false, retry_unavailable_reason: "A newer attempt exists. Refresh the history to review it." }+ : item)+ return fetchEvents()+ }+ }).catch((error) => {+ alert.error(error.data?.message || "Could not confirm the retry outcome. Refresh the history before trying again.")+ if (isCurrentIntegration()) return fetchEvents()+ }).finally(() => {+ retryingEventId.value = null+ })+}watch(- () => props.show,+ () => [props.show, props.form.id, props.formIntegrationId],() => {+ ++fetchRequestId+ integrationEvents.value = []+ integrationEventsLoading.value = false+ loadError.value = null+ eventToRetry.value = nullfetchEvents()},+ { immediate: true },)-const fetchEvents = () => {- if (props.show) {- nextTick(() => {- integrationEventsLoading.value = true- integrationEvents.value = []- formsApi.integrations.events(props.form.id, props.formIntegrationId).then((data) => {- integrationEvents.value = data- }).catch(() => {- alert.error("Could not load integration events. Please refresh.")- }).finally(() => {- integrationEventsLoading.value = false- })- })- }-}--const close = () => {+function close() {emit("close")}</script>diff --git a/client/test/e2e/opnform-flows.spec.ts b/client/test/e2e/opnform-flows.spec.tsindex ab957ca48..a250a22c6 100644--- a/client/test/e2e/opnform-flows.spec.ts+++ b/client/test/e2e/opnform-flows.spec.ts@@ -1369,3 +1369,58 @@ test("focused public form accepts a complete stepped response flow", async ({ paawait expectSubmissionSuccess(page)})++for (const viewport of [{ name: "desktop", width: 1280 }, { name: "mobile", width: 390 }]) {+ test(`integration retry confirms its submission and refreshes the outcome on ${viewport.name}`, async ({ page, request }) => {+ await page.setViewportSize({ width: viewport.width, height: 844 })+ const form = await apiCreateForm(request, { title: uniqueTitle("Integration Retry") })+ const token = await apiLogin(request)+ const created = await request.post(`${API_BASE_URL}/open/forms/${form.id}/integrations`, {+ headers: { Accept: "application/json", Authorization: `Bearer ${token}` },+ data: { status: "active", integration_id: "webhook", data: { webhook_url: "https://example.com/retry-test" } },+ })+ expect(created.ok()).toBeTruthy()+ const integrationId = (await created.json()).form_integration.id+ const eventsPath = `**/open/forms/${form.id}/integrations/${integrationId}/events`+ const failure = { id: 9001, date: "2026-10-03 14:00", status: "Error", data: { submission_id: 123 }, can_retry: true }+ const reason = "A more recent attempt exists for this submission."+ let retryCount = 0+ await page.route(eventsPath, route => route.fulfill({ json: retryCount+ ? [{ ...failure, can_retry: false, retry_unavailable_reason: reason }, { ...failure, id: 9002, status: "Skipped", can_retry: false }]+ : [failure] }))+ await page.route(`${eventsPath}/9001/retry`, route => {+ expect(route.request().method()).toBe("POST")+ retryCount+++ return route.fulfill({ json: { type: "warning", message: "No request was sent because the integration conditions were not met." } })+ })++ await loginUi(page)+ await page.goto(`/forms/${form.slug}/show/integrations`)+ const card = page.getByText("Webhook Notification", { exact: true }).locator("..").locator("..")+ await card.locator('button[aria-haspopup="menu"]').click()+ await page.getByRole("menuitem", { name: "Past Events" }).click()+ const history = page.getByRole("dialog", { name: "Integration events", exact: true })+ const retryButton = history.getByRole("button", { name: "Retry event 9001 for submission 123" })+ await expect(retryButton).toBeVisible()+ if (viewport.name === "mobile") {+ const table = history.getByLabel("Integration event history")+ expect(await table.evaluate(element => element.scrollWidth > element.clientWidth)).toBe(true)+ }++ await retryButton.click()+ const confirmation = page.getByRole("dialog", { name: "Retry submission #123?", exact: true })+ await expect(confirmation).toContainText("Retry submission #123?")+ await expect(confirmation).toContainText("latest saved answers")+ await expect(confirmation).toContainText("may create duplicates")+ await confirmation.getByRole("button", { name: "Cancel", exact: true }).click()+ await expect(confirmation).not.toBeVisible()+ expect(retryCount).toBe(0)++ await retryButton.click()+ await confirmation.getByRole("button", { name: "Retry integration", exact: true }).click()+ await expect(history.getByText("Skipped", { exact: true })).toBeVisible()+ await expect(history.getByText(reason, { exact: true })).toBeVisible()+ await expect(retryButton).toHaveCount(0)+ expect(retryCount).toBe(1)+ })+}diff --git a/client/test/nuxt/integration-events-modal.spec.ts b/client/test/nuxt/integration-events-modal.spec.tsnew file mode 100644index 000000000..ecf62629d--- /dev/null+++ b/client/test/nuxt/integration-events-modal.spec.ts@@ -0,0 +1,151 @@+import { flushPromises, mount } from '@vue/test-utils'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import IntegrationEventsModal from '~/components/open/integrations/components/IntegrationEventsModal.vue'++const mocks = vi.hoisted(() => ({ events: vi.fn(), retry: vi.fn(), success: vi.fn(), error: vi.fn(), warning: vi.fn() }))+vi.mock('~/api/forms', () => ({ formsApi: { integrations: { events: mocks.events, retryEvent: mocks.retry } } }))+vi.mock('~/composables/useAlert.js', () => ({ useAlert: () => mocks }))+const failure = { id: 10, status: 'Error', data: { submission_id: 123 }, can_retry: true }+const other = { ...failure, id: 11, data: { submission_id: 456 } }++function deferred() {+ let resolve!: (value: any) => void+ const promise = new Promise((done) => { resolve = done })+ return { promise, resolve }+}+function mountModal() {+ return mount(IntegrationEventsModal, {+ props: { show: true, form: { id: 1 }, formIntegrationId: 2 },+ global: { stubs: {+ UModal: { props: ['open', 'title', 'description'], template: '<section v-if="open" :aria-label="title"><h2>{{ title }}</h2><p>{{ description }}</p><slot name="body" /><slot name="footer" /></section>' },+ UTable: { props: ['data', 'loading'], template: '<div><div v-for="item in data" :key="item.id"><slot name="submission-cell" :row="{ original: item }" /><slot name="status-cell" :row="{ original: item }" /><slot name="actions-cell" :row="{ original: item }" /></div></div>' },+ UButton: { props: ['label', 'disabled', 'loading'], emits: ['click'], template: '<button :disabled="disabled || loading" @click="$emit(\'click\')">{{ label }}</button>' },+ UBadge: { props: ['label'], template: '<span>{{ label }}</span>' },+ UAlert: { props: ['title', 'description'], template: '<div role="alert">{{ title }} {{ description }}</div>' },+ IntegrationEmailEvent: true, VueJsonPretty: true,+ } },+ })+}+function button(wrapper: ReturnType<typeof mountModal>, label: string) {+ return wrapper.findAll('button').find((item) => item.text() === label)!+}+async function confirmRetry(wrapper: ReturnType<typeof mountModal>) {+ await button(wrapper, 'Retry').trigger('click')+ await button(wrapper, 'Retry integration').trigger('click')+}++describe('integration event history and retries', () => {+ beforeEach(() => {+ vi.resetAllMocks()+ vi.stubGlobal('useAlert', () => mocks)+ mocks.events.mockResolvedValue([failure, other])+ mocks.retry.mockResolvedValue({ type: 'success', message: 'Retried.' })+ })+ afterEach(() => vi.unstubAllGlobals())++ it('loads an initially open modal and explains unavailable retries', async () => {+ mocks.events.mockResolvedValue([{ ...failure, can_retry: false, retry_unavailable_reason: 'Activate this integration.' }])+ const wrapper = mountModal()+ await flushPromises()+ expect(mocks.events).toHaveBeenCalledWith(1, 2)+ expect(wrapper.text()).toContain('#123')+ expect(wrapper.text()).toContain('Activate this integration.')+ expect(button(wrapper, 'Retry')).toBeUndefined()+ })++ it('identifies the submission and consequences before confirming and supports cancelling', async () => {+ const wrapper = mountModal()+ await flushPromises()+ await button(wrapper, 'Retry').trigger('click')+ expect(wrapper.text()).toContain('Retry submission #123?')+ expect(wrapper.text()).toContain('latest saved answers')+ expect(wrapper.text()).toContain('may create duplicates')+ await button(wrapper, 'Cancel').trigger('click')+ expect(mocks.retry).not.toHaveBeenCalled()+ expect(wrapper.find('[aria-label="Retry submission #123?"]').exists()).toBe(false)+ })++ it('blocks further retries until the refreshed history is loaded', async () => {+ const retry = deferred()+ const refresh = deferred()+ mocks.retry.mockReturnValue(retry.promise)+ mocks.events.mockResolvedValueOnce([failure, other]).mockReturnValueOnce(refresh.promise)+ const wrapper = mountModal()+ await flushPromises()+ await confirmRetry(wrapper)+ expect(mocks.retry).toHaveBeenCalledTimes(1)+ expect(mocks.retry).toHaveBeenCalledWith(1, 2, 10)+ expect(wrapper.findAll('button').filter((item) => item.text() === 'Retry').every((item) => item.attributes('disabled') !== undefined)).toBe(true)+ retry.resolve({ type: 'success', message: 'Retried.' })+ await flushPromises()+ expect(wrapper.text()).toContain('#123')+ expect(button(wrapper, 'Retry').attributes('disabled')).toBeDefined()+ refresh.resolve([{ ...failure, can_retry: false }, other])+ await flushPromises()+ expect(button(wrapper, 'Retry').attributes('disabled')).toBeUndefined()+ expect(mocks.success).toHaveBeenCalledWith('Retried.')+ })++ it.each(['error', 'warning'])('uses the server outcome for %s retries', async (type) => {+ mocks.retry.mockResolvedValue({ type, message: 'Review this event.' })+ const wrapper = mountModal()+ await flushPromises()+ await confirmRetry(wrapper)+ await flushPromises()+ expect(mocks[type]).toHaveBeenCalledWith('Review this event.')+ expect(mocks.success).not.toHaveBeenCalled()+ expect(mocks.events).toHaveBeenCalledTimes(2)+ })++ it('refreshes eligibility after a rejected retry', async () => {+ mocks.retry.mockRejectedValue({ data: { message: 'A newer attempt exists.' } })+ mocks.events.mockResolvedValueOnce([failure]).mockResolvedValueOnce([{ ...failure, can_retry: false }])+ const wrapper = mountModal()+ await flushPromises()+ await confirmRetry(wrapper)+ await flushPromises()+ expect(mocks.error).toHaveBeenCalledWith('A newer attempt exists.')+ expect(mocks.events).toHaveBeenCalledTimes(2)+ expect(button(wrapper, 'Retry')).toBeUndefined()+ })++ it('preserves history on refresh failure and recovers on the next refresh', async () => {+ mocks.events.mockResolvedValueOnce([failure]).mockRejectedValueOnce(new Error('Network')).mockResolvedValueOnce([other])+ const wrapper = mountModal()+ await flushPromises()+ await button(wrapper, 'Refresh').trigger('click')+ await flushPromises()+ expect(wrapper.text()).toContain('#123')+ expect(wrapper.get('[role="alert"]').text()).toContain('Could not load integration events')+ await button(wrapper, 'Refresh').trigger('click')+ await flushPromises()+ expect(wrapper.text()).toContain('#456')+ expect(wrapper.find('[role="alert"]').exists()).toBe(false)+ })++ it('ignores old fetch results after the selected integration changes', async () => {+ const stale = deferred()+ mocks.events.mockReturnValueOnce(stale.promise).mockResolvedValueOnce([other])+ const wrapper = mountModal()+ await wrapper.setProps({ formIntegrationId: 3 })+ await flushPromises()+ stale.resolve([failure])+ await flushPromises()+ expect(wrapper.text()).toContain('#456')+ expect(wrapper.text()).not.toContain('#123')+ })++ it('does not refresh a different integration when an old retry finishes', async () => {+ const retry = deferred()+ mocks.retry.mockReturnValue(retry.promise)+ const wrapper = mountModal()+ await flushPromises()+ await confirmRetry(wrapper)+ await wrapper.setProps({ formIntegrationId: 3 })+ await flushPromises()+ retry.resolve({ type: 'success', message: 'Retried.' })+ await flushPromises()+ expect(mocks.events).toHaveBeenCalledTimes(2)+ expect(mocks.retry).toHaveBeenCalledWith(1, 2, 10)+ })+})diff --git a/docs/api-reference/changelog.mdx b/docs/api-reference/changelog.mdxindex bb94725e0..9fc8c48bf 100644--- a/docs/api-reference/changelog.mdx+++ b/docs/api-reference/changelog.mdx@@ -15,6 +15,12 @@ A job from another form returns `404`.The response documentation now includes the initial `queued` status and matchesthe ten fields returned by the API, including `null` values for fields that do not apply.+## 2026-10-03 – Manual integration retries++`POST /open/forms/{form}/integrations/{integrationid}/events/{event}/retry` retries an eligible failure for one integration. It requires `manage-integrations`, preserves attribution metadata, and uses the latest saved submission and current integration settings. The endpoint allows 10 retry requests per minute per user.++Event responses include `can_retry` and `retry_unavailable_reason`. Only the latest eligible failed attempt can be retried. Email retries are blocked if any recipient may already have received the message. The response describes the actual attempt, including failed or skipped outcomes.+## 2026-10-01 – Removed unused public form users endpoint`GET /forms/{form}/users` has been removed and now returns `404`. The application does not use this endpoint.diff --git a/docs/api-reference/integrations/list-webhook-events.mdx b/docs/api-reference/integrations/list-webhook-events.mdxindex ba168eed2..d32b5cf46 100644--- a/docs/api-reference/integrations/list-webhook-events.mdx+++ b/docs/api-reference/integrations/list-webhook-events.mdx@@ -1,112 +1,51 @@---+title: "List Integration Events"+description: "Review delivery attempts and retry eligibility for a form integration."openapi: get /open/forms/{form}/integrations/{integrationid}/events----# List Webhook Events--Retrieve a paginated list of webhook dispatch events for a specific integration.-## Authentication & Scope-This endpoint requires a **Personal Access Token** with the `manage-integrations` ability.+Use a Personal Access Token with `manage-integrations` and write access to the form's workspace.## Request-<ParamField path="form" type="number" required>-The ID of the form containing the webhook.-</ParamField>--<ParamField path="integrationid" type="number" required>-The ID of the webhook integration for which to list events.-</ParamField>--```http-GET /open/forms/{form}/integrations/{integrationid}/events HTTP/1.1-Host: api.opnform.com-Authorization: Bearer <token>-```-<RequestExample>```bash cURL-curl -X GET 'https://api.opnform.com/open/forms/123/integrations/42/events' \+curl 'https://api.opnform.com/open/forms/123/integrations/42/events' \-H 'Authorization: Bearer YOUR_PAT'```</RequestExample>## Response-`200 OK` – Returns an array of event objects, ordered by creation date (newest first).+`200 OK` returns an array of events, newest first. The endpoint currently returns the complete retained history without pagination.<ResponseExample>```json Success[- {- "id": 1001,- "integration_id": 42,- "event": "submission.created",- "status": "success",- "response_code": 200,- "created_at": "2024-01-15T10:30:00Z"- },{"id": 1000,- "integration_id": 42,- "event": "submission.created",- "status": "failed",- "response_code": 500,- "error_message": "Internal Server Error",- "created_at": "2024-01-15T10:25:00Z"- },- {- "id": 999,- "integration_id": 42,- "event": "submission.created",- "status": "success",- "response_code": 200,- "created_at": "2024-01-15T10:20:00Z"+ "date": "2026-10-03 14:00",+ "status": "Error",+ "tracking_id": null,+ "email_tracking": false,+ "legacy_email": false,+ "updated_at": "2026-10-03T14:00:00Z",+ "data": { "submission_id": 1234, "message": "Connection failed" },+ "can_retry": true,+ "retry_unavailable_reason": null}]```</ResponseExample>-## Event object properties--<ResponseField name="id" type="number">-Unique identifier for the event record.-</ResponseField>+The `data` object contains the submission ID and any failure details. Tracked emails also include recipient outcomes. `Accepted` means that the mail transport accepted the email; delivery is not yet confirmed. `Skipped` means that no request was sent because integration conditions were not met.-<ResponseField name="integration_id" type="number">-The ID of the webhook integration that generated this event.-</ResponseField>--<ResponseField name="event" type="string">-The type of event. Currently: `"submission.created"`.-</ResponseField>--<ResponseField name="status" type="string">-Result of the webhook dispatch. Values: `"success"`, `"failed"`, `"timeout"`.-</ResponseField>--<ResponseField name="response_code" type="number | null">-HTTP status code returned by your webhook endpoint (if applicable).-</ResponseField>--<ResponseField name="error_message" type="string | null">-Error details if the webhook dispatch failed.-</ResponseField>--<ResponseField name="created_at" type="string">-ISO 8601 timestamp of when the webhook was dispatched.-</ResponseField>+Use `can_retry` to determine whether an event is eligible for [manual retry](/api-reference/integrations/retry-integration-event). When retry is unavailable, `retry_unavailable_reason` explains why. Only the latest eligible failed attempt for an available completed submission can be retried. The integration must be active.## Error responses-`403 Forbidden` – The token does not have `manage-integrations` ability or insufficient form permissions.--`404 Not Found` – Form or integration not found.--## Use cases--- **Debugging**: Check recent events to verify your webhook is receiving requests.-- **Monitoring**: Track success/failure rates to identify reliability issues.-- **Audit trail**: Review when submissions were sent to your endpoint.+- `401 Unauthorized`: authentication is missing or invalid.+- `403 Forbidden`: insufficient integration management permissions or workspace write access.+- `404 Not Found`: the form or integration does not exist in the requested scope.diff --git a/docs/api-reference/integrations/retry-integration-event.mdx b/docs/api-reference/integrations/retry-integration-event.mdxnew file mode 100644index 000000000..63730bcde--- /dev/null+++ b/docs/api-reference/integrations/retry-integration-event.mdx@@ -0,0 +1,70 @@+---+title: "Retry an Integration Event"+description: "Retry an eligible failed delivery for one form integration."+openapi: post /open/forms/{form}/integrations/{integrationid}/events/{event}/retry+---++## Authentication & Scope++Use a Personal Access Token with `manage-integrations` and write access to the form's workspace.++## Before you retry++In the form's **Integrations** tab, open **Past Events** for the affected integration. You can also [list integration events](/api-reference/integrations/list-webhook-events) through the API. Choose an event with `can_retry: true`.++A retry sends the submission's latest saved answers and attribution metadata using the integration's current settings. Only that integration runs. The original event remains in the history, and the retry creates a new event.++You can retry only the latest failed attempt for a completed submission that still exists, and the integration must be active. Older events without a submission ID cannot be retried.++For emails, retry is available only when tracking confirms that no recipient received or may have received the message. Emails with partial delivery, uncertain delivery, bounces, complaints, or unavailable tracking details require you to review the recipient outcomes first.++<Warning>+A failed webhook response does not prove that the destination did nothing. Check the destination before retrying. Use `submission_id` in your receiver to identify repeat deliveries where appropriate for your workflow.+</Warning>++## Request++Send an empty POST request. All three identifiers must refer to the same form and integration.++<RequestExample>+```bash cURL+curl -X POST 'https://api.opnform.com/open/forms/123/integrations/42/events/1000/retry' \+ -H 'Authorization: Bearer YOUR_PAT' \+ -H 'Accept: application/json'+```+</RequestExample>++## Response++`200 OK` returns the event produced by this attempt. Inspect `type` and `event.status`: `200` means that the attempt completed, and its delivery may still have failed or been skipped.++<ResponseExample>+```json Success+{+ "type": "success",+ "message": "Event retried successfully.",+ "event": {+ "id": 1001,+ "date": "2026-10-03 14:00",+ "status": "Success",+ "tracking_id": null,+ "email_tracking": false,+ "legacy_email": false,+ "updated_at": "2026-10-03T14:00:00Z",+ "data": { "submission_id": 1234 },+ "can_retry": false,+ "retry_unavailable_reason": "Only failed events can be retried."+ }+}+```+</ResponseExample>++The `type` is `success`, `error`, or `warning`. An email marked `Accepted` is accepted by the mail transport; delivery is not yet confirmed. `Skipped` means that the current integration conditions prevented a send. `Unknown` means that delivery could not be confirmed.++## Error responses++- `401 Unauthorized`: authentication is missing or invalid.+- `403 Forbidden`: the token lacks `manage-integrations` or the user lacks write access.+- `404 Not Found`: the form, integration, or event is missing or belongs to a different parent.+- `422 Unprocessable Entity`: the event is no longer eligible. The response includes a `message` and `errors.event`. Refresh the history to review the latest attempt.+- `429 Too Many Requests`: you exceeded 10 retry requests per minute. Wait for `Retry-After` before trying again.diff --git a/docs/api-reference/openapi.yaml b/docs/api-reference/openapi.yamlindex f0038fc7e..cd3ddf8c8 100644--- a/docs/api-reference/openapi.yaml+++ b/docs/api-reference/openapi.yaml@@ -1088,6 +1088,69 @@ paths:description: Forbidden – insufficient permissions"404":description: Form or integration not found+ "/open/forms/{form}/integrations/{integrationid}/events/{event}/retry":+ post:+ tags:+ - Integrations+ summary: Retry an Integration Event+ description: "Retry the latest eligible failed event with current settings and saved submission data. Requires manage-integrations and workspace write access. Limited to 10 requests per minute per user."+ security:+ - bearerAuth: []+ parameters:+ - name: form+ in: path+ required: true+ schema:+ type: integer+ - name: integrationid+ in: path+ required: true+ schema:+ type: integer+ - name: event+ in: path+ required: true+ schema:+ type: integer+ responses:+ "200":+ description: Attempt completed. Inspect type and event.status for its delivery outcome.+ content:+ application/json:+ schema:+ type: object+ properties:+ type:+ type: string+ enum: [success, error, warning]+ message:+ type: string+ event:+ $ref: "#/components/schemas/IntegrationEvent"+ "401":+ description: Authentication required+ "403":+ description: Insufficient permissions+ "404":+ description: Form, integration, or event not found in the requested scope+ "422":+ description: Event is no longer eligible for retry+ content:+ application/json:+ schema:+ type: object+ properties:+ message:+ type: string+ errors:+ type: object+ properties:+ event:+ type: array+ items:+ type: string+ "429":+ description: Too many retry requests; wait for Retry-After"/external/zapier/validate":get:tags:@@ -1639,34 +1702,37 @@ components:type: objectproperties:id:- type: number- description: Unique identifier for the event record.- readOnly: true- integration_id:- type: number- description: The ID of the webhook integration that generated this event.+ type: integerreadOnly: true- event:+ date:type: string- description: The type of event.- example: "submission.created"+ description: Event date formatted as YYYY-MM-DD HH:mm.status:type: string- enum: [success, failed, timeout]- description: Result of the webhook dispatch.- response_code:- type: number- nullable: true- description: HTTP status code returned by the webhook endpoint.- error_message:+ enum: [Success, Error, Skipped, Processing, Accepted, Delivered, Unknown]+ tracking_id:type: stringnullable: true- description: Error details if the webhook dispatch failed.- created_at:+ email_tracking:+ type: boolean+ legacy_email:+ type: boolean+ updated_at:type: stringformat: date-time- description: ISO 8601 timestamp of when the webhook was dispatched.- readOnly: true+ nullable: true+ data:+ type: object+ nullable: true+ additionalProperties: true+ description: Submission ID, failure details, or email recipient outcomes.+ can_retry:+ type: boolean+ description: Whether this is the latest eligible failed attempt for an available completed submission.+ retry_unavailable_reason:+ type: string+ nullable: true+ description: Why retry is unavailable; null when eligible.securitySchemes:bearerAuth:type: httpdiff --git a/docs/docs.json b/docs/docs.jsonindex d5ace6199..02a605694 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -127,6 +127,7 @@"api-reference/integrations/update-webhook-integration","api-reference/integrations/delete-webhook-integration","api-reference/integrations/list-webhook-events",+ "api-reference/integrations/retry-integration-event","api-reference/integrations/webhook-security"]},