Skip to content

Commit 3025414

Browse files
committed
fix(ashby): address PR review comments
- Restore mode: 'advanced' on updateName sub-block - Move action after spread in formatWebhookInput to prevent override - Remove generic webhook trigger (Ashby requires webhookType)
1 parent a96ca03 commit 3025414

File tree

8 files changed

+3
-61
lines changed

8 files changed

+3
-61
lines changed

apps/docs/content/docs/en/tools/ashby.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ With Ashby, you can:
2222
- **List and view jobs**: Browse all open, closed, and archived job postings with location and department info
2323
- **List applications**: View all applications across your organization with candidate and job details, status tracking, and pagination
2424

25-
The Ashby block also supports **webhook triggers** that automatically start workflows in response to Ashby events. Available triggers include Application Submitted, Candidate Stage Change, Candidate Hired, Candidate Deleted, Job Created, Offer Created, and a Generic Webhook for all events. Webhooks are fully managed — Sim automatically creates the webhook in Ashby when you save the trigger and deletes it when you remove it, so there's no manual webhook configuration needed. Just provide your Ashby API key (with `apiKeysWrite` permission) and select the event type.
25+
The Ashby block also supports **webhook triggers** that automatically start workflows in response to Ashby events. Available triggers include Application Submitted, Candidate Stage Change, Candidate Hired, Candidate Deleted, Job Created, and Offer Created. Webhooks are fully managed — Sim automatically creates the webhook in Ashby when you save the trigger and deletes it when you remove it, so there's no manual webhook configuration needed. Just provide your Ashby API key (with `apiKeysWrite` permission) and select the event type.
2626

2727
In Sim, the Ashby integration enables your agents to programmatically manage your recruiting pipeline. Agents can search for candidates, create new candidate records, add notes after interviews, and monitor applications across jobs. This allows you to automate recruiting workflows like candidate intake, interview follow-ups, pipeline reporting, and cross-referencing candidates across roles.
2828
{/* MANUAL-CONTENT-END */}

apps/sim/blocks/blocks/ashby.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export const AshbyBlock: BlockConfig = {
2323
'ashby_candidate_delete',
2424
'ashby_job_create',
2525
'ashby_offer_create',
26-
'ashby_webhook',
2726
],
2827
},
2928

@@ -159,6 +158,7 @@ export const AshbyBlock: BlockConfig = {
159158
type: 'short-input',
160159
placeholder: 'Updated full name',
161160
condition: { field: 'operation', value: 'update_candidate' },
161+
mode: 'advanced',
162162
},
163163
{
164164
id: 'websiteUrl',
@@ -387,7 +387,6 @@ Output only the ISO 8601 timestamp string, nothing else.`,
387387
...getTrigger('ashby_candidate_delete').subBlocks,
388388
...getTrigger('ashby_job_create').subBlocks,
389389
...getTrigger('ashby_offer_create').subBlocks,
390-
...getTrigger('ashby_webhook').subBlocks,
391390
],
392391

393392
tools: {

apps/sim/lib/webhooks/provider-subscriptions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,6 @@ export async function createAshbyWebhookSubscription(
21942194
ashby_candidate_delete: 'candidateDelete',
21952195
ashby_job_create: 'jobCreate',
21962196
ashby_offer_create: 'offerCreate',
2197-
ashby_webhook: undefined,
21982197
}
21992198

22002199
const webhookType = webhookTypeMap[triggerId]

apps/sim/lib/webhooks/utils.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,8 +1246,8 @@ export async function formatWebhookInput(
12461246

12471247
if (foundWebhook.provider === 'ashby') {
12481248
return {
1249-
action: body.action,
12501249
...(body.data || {}),
1250+
action: body.action,
12511251
data: body.data || {},
12521252
}
12531253
}

apps/sim/triggers/ashby/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ export { ashbyCandidateHireTrigger } from './candidate_hire'
44
export { ashbyCandidateStageChangeTrigger } from './candidate_stage_change'
55
export { ashbyJobCreateTrigger } from './job_create'
66
export { ashbyOfferCreateTrigger } from './offer_create'
7-
export { ashbyWebhookTrigger } from './webhook'

apps/sim/triggers/ashby/utils.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const ashbyTriggerOptions = [
1111
{ label: 'Candidate Deleted', id: 'ashby_candidate_delete' },
1212
{ label: 'Job Created', id: 'ashby_job_create' },
1313
{ label: 'Offer Created', id: 'ashby_offer_create' },
14-
{ label: 'Generic Webhook (All Events)', id: 'ashby_webhook' },
1514
]
1615

1716
/**
@@ -217,14 +216,3 @@ export function buildOfferCreateOutputs(): Record<string, TriggerOutput> {
217216
},
218217
} as Record<string, TriggerOutput>
219218
}
220-
221-
/**
222-
* Build outputs for generic webhook (all events).
223-
* Includes the action field and full data as JSON since payload varies by event type.
224-
*/
225-
export function buildAshbyWebhookOutputs(): Record<string, TriggerOutput> {
226-
return {
227-
...coreOutputs,
228-
data: { type: 'json', description: 'Full event data payload (structure varies by event type)' },
229-
} as Record<string, TriggerOutput>
230-
}

apps/sim/triggers/ashby/webhook.ts

Lines changed: 0 additions & 41 deletions
This file was deleted.

apps/sim/triggers/registry.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
ashbyCandidateStageChangeTrigger,
77
ashbyJobCreateTrigger,
88
ashbyOfferCreateTrigger,
9-
ashbyWebhookTrigger,
109
} from '@/triggers/ashby'
1110
import {
1211
attioCommentCreatedTrigger,
@@ -181,7 +180,6 @@ export const TRIGGER_REGISTRY: TriggerRegistry = {
181180
ashby_candidate_delete: ashbyCandidateDeleteTrigger,
182181
ashby_job_create: ashbyJobCreateTrigger,
183182
ashby_offer_create: ashbyOfferCreateTrigger,
184-
ashby_webhook: ashbyWebhookTrigger,
185183
attio_webhook: attioWebhookTrigger,
186184
attio_record_created: attioRecordCreatedTrigger,
187185
attio_record_updated: attioRecordUpdatedTrigger,

0 commit comments

Comments
 (0)