Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
cc6b80c
refactor(webhooks): extract provider-specific logic into handler regi…
waleedlatif1 Apr 5, 2026
ffa5864
fix(webhooks): address PR review feedback
waleedlatif1 Apr 5, 2026
403e32f
fix(webhooks): fix build error from union type indexing in processTri…
waleedlatif1 Apr 5, 2026
5d9b95a
fix(webhooks): return 401 when requireAuth is true but no token confi…
waleedlatif1 Apr 5, 2026
7b6b50b
refactor(webhooks): move signature validators into provider handler f…
waleedlatif1 Apr 5, 2026
1f92950
refactor(webhooks): move challenge handlers into provider files
waleedlatif1 Apr 5, 2026
46a1ea0
refactor(webhooks): move fetchAndProcessAirtablePayloads into airtabl…
waleedlatif1 Apr 5, 2026
adf13bc
refactor(webhooks): extract polling config functions into polling-con…
waleedlatif1 Apr 5, 2026
ced7d14
refactor(webhooks): decompose formatWebhookInput into per-provider fo…
waleedlatif1 Apr 5, 2026
0d2f78b
refactor(webhooks): decompose provider-subscriptions into handler reg…
waleedlatif1 Apr 5, 2026
3ad355e
fix(webhooks): fix attio build error, restore imap field, remove dema…
waleedlatif1 Apr 5, 2026
8bcf450
fix(webhooks): remove unused imports from utils.server.ts after rebase
waleedlatif1 Apr 5, 2026
60610b7
fix(webhooks): remove duplicate generic file processing from webhook-…
waleedlatif1 Apr 5, 2026
1478de1
fix(webhooks): validate auth token is set when requireAuth is enabled…
waleedlatif1 Apr 5, 2026
78e6de5
fix(webhooks): remove unintended rejectUnauthorized field from IMAP p…
waleedlatif1 Apr 5, 2026
7afed0d
fix(webhooks): replace crypto.randomUUID() with generateId() in ashby…
waleedlatif1 Apr 5, 2026
220aa91
refactor(webhooks): standardize logger names and remove any types fro…
waleedlatif1 Apr 5, 2026
98b4586
refactor(webhooks): remove remaining any types from deploy.ts
waleedlatif1 Apr 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(webhooks): remove duplicate generic file processing from webhook-…
…execution

The generic provider's processInputFiles handler already handles file[] field
processing via the handler.processInputFiles call. The hardcoded block from
staging was incorrectly preserved during rebase, causing double processing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  • Loading branch information
waleedlatif1 and claude committed Apr 5, 2026
commit 60610b7351f5f068d0ffd8d4684291498a9391e3
47 changes: 0 additions & 47 deletions apps/sim/background/webhook-execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import type { AsyncExecutionCorrelation } from '@/lib/core/async-jobs/types'
import { createTimeoutAbortController, getTimeoutErrorMessage } from '@/lib/core/execution-limits'
import { IdempotencyService, webhookIdempotency } from '@/lib/core/idempotency'
import { generateId } from '@/lib/core/utils/uuid'
import { processExecutionFiles } from '@/lib/execution/files'
import { preprocessExecution } from '@/lib/execution/preprocessing'
import { LoggingSession } from '@/lib/logs/execution/logging-session'
import { buildTraceSpans } from '@/lib/logs/execution/trace-spans/trace-spans'
Expand Down Expand Up @@ -429,52 +428,6 @@ async function executeWebhookJobInternal(
}
}

// Process generic webhook files based on inputFormat
if (input && payload.provider === 'generic' && payload.blockId && blocks[payload.blockId]) {
try {
const triggerBlock = blocks[payload.blockId]

if (triggerBlock?.subBlocks?.inputFormat?.value) {
const inputFormat = triggerBlock.subBlocks.inputFormat.value as unknown as Array<{
name: string
type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'
}>

const fileFields = inputFormat.filter((field) => field.type === 'file[]')

if (fileFields.length > 0 && typeof input === 'object' && input !== null) {
const executionContext = {
workspaceId,
workflowId: payload.workflowId,
executionId,
}

for (const fileField of fileFields) {
const fieldValue = input[fileField.name]

if (fieldValue && typeof fieldValue === 'object') {
const uploadedFiles = await processExecutionFiles(
fieldValue,
executionContext,
requestId,
payload.userId
)

if (uploadedFiles.length > 0) {
input[fileField.name] = uploadedFiles
logger.info(
`[${requestId}] Successfully processed ${uploadedFiles.length} file(s) for field: ${fileField.name}`
)
}
}
}
}
}
} catch (error) {
logger.error(`[${requestId}] Error processing generic webhook files:`, error)
}
}

logger.info(`[${requestId}] Executing workflow for ${payload.provider} webhook`)

const metadata: ExecutionMetadata = {
Expand Down
Loading