Skip to content

Commit 69bfb1b

Browse files
authored
fix(integrations): address the final release audit findings (#10035)
* fix(integrations): address the final release audit findings across Notion, Zendesk, Dropbox, DocuSign, Airtable, ClickUp, Workday, Pipedrive, Intercom, Mailchimp, and SAP Concur * fix(notion): make the rate-limit wait abortable and retry a rate-limited first page too * fix(integrations): stop the stored Send status from filtering DocuSign List Envelopes and serialize object values for monday JSON arguments * fix(workday): send Get Organizations criteria in schema order and show the update payload shape the client marshals * fix(dropbox): keep requiring path for an initial folder listing * test(workday): assert Get_Organizations element order in the XML sent to Workday
1 parent 7246075 commit 69bfb1b

32 files changed

Lines changed: 272 additions & 68 deletions

‎apps/docs/content/docs/integrations/mailchimp.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Use [Mailchimp](https://mailchimp.com/) in Sim to manage audiences and members,
1616

1717
**Delete Member from Mailchimp Audience** and **Archive Member from Mailchimp Audience** both call Mailchimp's reversible [archive endpoint](https://mailchimp.com/developer/marketing/api/list-members/archive-list-member); an archived member can be added back.
1818

19-
**Permanently Delete Member from Mailchimp Audience** calls [`POST .../actions/delete-permanent`](https://mailchimp.com/developer/marketing/api/list-member-actions/delete-list-member-permanently), which erases the member's identifying data. It cannot be undone, and the address cannot be re-imported.
19+
**Permanently Delete Member from Mailchimp Audience** calls [`POST .../actions/delete-permanent`](https://mailchimp.com/developer/marketing/api/lists/members/create-member-action-delete-permanent), which erases the member's identifying data. It cannot be undone, and the address cannot be re-imported.
2020
{/* MANUAL-CONTENT-END */}
2121

2222
## Use the block [#usage-instructions]

‎apps/docs/content/docs/integrations/notion.mdx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Read content from a Notion page
4646

4747
| Parameter | Type | Description |
4848
| --------- | ---- | ----------- |
49+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
4950
| `url` | string | Notion page URL |
5051
| `created_time` | string | ISO 8601 creation timestamp |
5152
| `last_edited_time` | string | ISO 8601 last edit timestamp |
@@ -338,6 +339,7 @@ Append new block children (content) to a Notion page or block
338339
| Parameter | Type | Description |
339340
| --------- | ---- | ----------- |
340341
| `content` | string | Page content in markdown format, or comment text for create comment |
342+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
341343
| `title` | string | Page or database title |
342344
| `url` | string | Notion URL |
343345
| `id` | string | Page, database, block, comment, or user ID |
@@ -377,6 +379,7 @@ Retrieve a single Notion block by its UUID, including its type-specific content
377379
| Parameter | Type | Description |
378380
| --------- | ---- | ----------- |
379381
| `content` | string | Page content in markdown format, or comment text for create comment |
382+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
380383
| `title` | string | Page or database title |
381384
| `url` | string | Notion URL |
382385
| `id` | string | Page, database, block, comment, or user ID |
@@ -418,6 +421,7 @@ Retrieve the block children (content) of a Notion page or block
418421
| Parameter | Type | Description |
419422
| --------- | ---- | ----------- |
420423
| `content` | string | Page content in markdown format, or comment text for create comment |
424+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
421425
| `title` | string | Page or database title |
422426
| `url` | string | Notion URL |
423427
| `id` | string | Page, database, block, comment, or user ID |
@@ -459,6 +463,7 @@ Update the content or archived state of a single Notion block
459463
| Parameter | Type | Description |
460464
| --------- | ---- | ----------- |
461465
| `content` | string | Page content in markdown format, or comment text for create comment |
466+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
462467
| `title` | string | Page or database title |
463468
| `url` | string | Notion URL |
464469
| `id` | string | Page, database, block, comment, or user ID |
@@ -498,6 +503,7 @@ Delete (move to trash) a single Notion block
498503
| Parameter | Type | Description |
499504
| --------- | ---- | ----------- |
500505
| `content` | string | Page content in markdown format, or comment text for create comment |
506+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
501507
| `title` | string | Page or database title |
502508
| `url` | string | Notion URL |
503509
| `id` | string | Page, database, block, comment, or user ID |
@@ -539,6 +545,7 @@ Create a comment on a Notion page or within an existing discussion thread
539545
| Parameter | Type | Description |
540546
| --------- | ---- | ----------- |
541547
| `content` | string | Page content in markdown format, or comment text for create comment |
548+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
542549
| `title` | string | Page or database title |
543550
| `url` | string | Notion URL |
544551
| `id` | string | Page, database, block, comment, or user ID |
@@ -580,6 +587,7 @@ List unresolved comments on a Notion page or block
580587
| Parameter | Type | Description |
581588
| --------- | ---- | ----------- |
582589
| `content` | string | Page content in markdown format, or comment text for create comment |
590+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
583591
| `title` | string | Page or database title |
584592
| `url` | string | Notion URL |
585593
| `id` | string | Page, database, block, comment, or user ID |
@@ -620,6 +628,7 @@ List all users (members and bots) in the Notion workspace
620628
| Parameter | Type | Description |
621629
| --------- | ---- | ----------- |
622630
| `content` | string | Page content in markdown format, or comment text for create comment |
631+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
623632
| `title` | string | Page or database title |
624633
| `url` | string | Notion URL |
625634
| `id` | string | Page, database, block, comment, or user ID |
@@ -659,6 +668,7 @@ Retrieve a single Notion user by their UUID
659668
| Parameter | Type | Description |
660669
| --------- | ---- | ----------- |
661670
| `content` | string | Page content in markdown format, or comment text for create comment |
671+
| `truncated` | boolean | True when the page has more than 1000 top-level blocks and content stops there |
662672
| `title` | string | Page or database title |
663673
| `url` | string | Notion URL |
664674
| `id` | string | Page, database, block, comment, or user ID |

‎apps/docs/content/docs/integrations/workday.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Update fields on an existing worker record in Workday.
145145
| `username` | string | Yes | Integration System User username |
146146
| `password` | string | Yes | Integration System User password |
147147
| `workerId` | string | Yes | Employee ID of the worker to update |
148-
| `fields` | json | Yes | Fields to update as JSON \(e.g., \{"businessTitle": "Senior Engineer", "primaryWorkEmail": "new@company.com"\}\) |
148+
| `fields` | json | Yes | Personal information fields to update as JSON, using Change_Personal_Information_Data element names in schema order \(e.g., \{"Marital_Status_Reference": \{"ID": \{"attributes": \{"wd:type": "Marital_Status_ID"\}, "$value": "Married"\}\}\}\) |
149149

150150
#### Output
151151

‎apps/docs/content/docs/integrations/zendesk.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ Merge multiple tickets into a target ticket
460460
| --------- | ---- | -------- | ----------- |
461461
| `targetTicketId` | string | Yes | Target ticket ID as a numeric string \(tickets will be merged into this one, e.g., "12345"\) |
462462
| `sourceTicketIds` | string | Yes | Comma-separated source ticket IDs to merge \(e.g., "111, 222, 333"\) |
463-
| `targetComment` | string | No | Comment text to add to target ticket after merge |
463+
| `targetComment` | string | No | Comment text to add to the target ticket after merge, posted as a public reply |
464464

465465
#### Output
466466

‎apps/sim/blocks/blocks/clickup.ts‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,21 +1802,21 @@ Return ONLY the value (plain string, number, or JSON) - no explanations, no extr
18021802
toolCallArg(context, optionalNumber(params.endDate)),
18031803
assignee: params.timerAssignee || toolCallArg(context, params.assignee) || undefined,
18041804
taskId:
1805-
params.timeLocationType === 'task'
1806-
? params.timeLocationId || undefined
1807-
: toolCallArg(context, params.taskId) || undefined,
1805+
(params.timeLocationType === 'task' ? params.timeLocationId : undefined) ||
1806+
toolCallArg(context, params.taskId) ||
1807+
undefined,
18081808
listId:
1809-
params.timeLocationType === 'list'
1810-
? params.timeLocationId || undefined
1811-
: toolCallArg(context, params.listId) || undefined,
1809+
(params.timeLocationType === 'list' ? params.timeLocationId : undefined) ||
1810+
toolCallArg(context, params.listId) ||
1811+
undefined,
18121812
folderId:
1813-
params.timeLocationType === 'folder'
1814-
? params.timeLocationId || undefined
1815-
: toolCallArg(context, params.folderId) || undefined,
1813+
(params.timeLocationType === 'folder' ? params.timeLocationId : undefined) ||
1814+
toolCallArg(context, params.folderId) ||
1815+
undefined,
18161816
spaceId:
1817-
params.timeLocationType === 'space'
1818-
? params.timeLocationId || undefined
1819-
: toolCallArg(context, params.spaceId) || undefined,
1817+
(params.timeLocationType === 'space' ? params.timeLocationId : undefined) ||
1818+
toolCallArg(context, params.spaceId) ||
1819+
undefined,
18201820
includeTaskTags: params.includeTaskTags ? true : undefined,
18211821
includeLocationNames: params.includeLocationNames ? true : undefined,
18221822
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { describe, expect, it } from 'vitest'
2+
import { DocuSignBlock } from '@/blocks/blocks/docusign'
3+
4+
function runCanvas(params: Record<string, unknown>) {
5+
const mapper = DocuSignBlock.tools.config?.params
6+
if (!mapper) throw new Error('DocuSign block has no params mapper')
7+
return { ...params, ...mapper(params) }
8+
}
9+
10+
describe('DocuSign List Envelopes status filter', () => {
11+
it('does not filter by the stored Send Envelope status when the list filter is All', () => {
12+
const merged = runCanvas({
13+
operation: 'list_envelopes',
14+
envelopeStatus: 'sent',
15+
listEnvelopeStatus: '',
16+
})
17+
18+
expect(merged.envelopeStatus).toBeUndefined()
19+
})
20+
21+
it('sends the chosen list filter', () => {
22+
const merged = runCanvas({
23+
operation: 'list_envelopes',
24+
envelopeStatus: 'sent',
25+
listEnvelopeStatus: 'completed',
26+
})
27+
28+
expect(merged.envelopeStatus).toBe('completed')
29+
})
30+
})

‎apps/sim/blocks/blocks/docusign.ts‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { DocuSignIcon } from '@/components/icons'
22
import { getScopesForService } from '@/lib/oauth/utils'
33
import type { BlockConfig, BlockMeta } from '@/blocks/types'
44
import { AuthMode, IntegrationType } from '@/blocks/types'
5-
import { normalizeFileInput } from '@/blocks/utils'
5+
import { normalizeFileInput, toolCallArg } from '@/blocks/utils'
66

77
const DOCUMENT_FIELD = ['uploadDocument', 'documentRef'] as const
88

@@ -314,7 +314,7 @@ export const DocuSignBlock: BlockConfig = {
314314
],
315315
config: {
316316
tool: (params) => `docusign_${params.operation}`,
317-
params: (params) => {
317+
params: (params, context) => {
318318
const { oauthCredential, operation, documentFile, listEnvelopeStatus, ...rest } = params
319319

320320
const cleanParams: Record<string, unknown> = {
@@ -326,8 +326,14 @@ export const DocuSignBlock: BlockConfig = {
326326
cleanParams.file = file
327327
}
328328

329-
if (listEnvelopeStatus && operation === 'list_envelopes') {
330-
cleanParams.envelopeStatus = listEnvelopeStatus
329+
/**
330+
* The Send/Template status dropdown stores `sent` on every new block, and the executor
331+
* merges raw inputs under this result, so the list filter is always assigned explicitly:
332+
* otherwise that stored `sent` reached List Envelopes and "All" listed only sent envelopes.
333+
*/
334+
if ((operation ?? context?.operation) === 'list_envelopes') {
335+
cleanParams.envelopeStatus =
336+
listEnvelopeStatus || toolCallArg(context, rest.envelopeStatus) || undefined
331337
}
332338

333339
if (operation === 'create_from_template') {

‎apps/sim/blocks/blocks/intercom.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ Return ONLY the subject line - no explanations.`,
866866
options: [
867867
{ label: 'User', id: 'user' },
868868
{ label: 'Lead', id: 'lead' },
869-
{ label: 'Contact', id: 'contact' },
869+
{ label: 'Contact (legacy)', id: 'contact' },
870870
],
871871
required: true,
872872
condition: {

‎apps/sim/blocks/blocks/notion.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,11 @@ export const NotionV2Block: BlockConfig = {
10281028
description: 'Page content in markdown format, or comment text for create comment',
10291029
condition: { field: 'operation', value: ['notion_read', 'notion_create_comment'] },
10301030
},
1031+
truncated: {
1032+
type: 'boolean',
1033+
description: 'True when the page has more than 1000 top-level blocks and content stops there',
1034+
condition: { field: 'operation', value: 'notion_read' },
1035+
},
10311036
title: {
10321037
type: 'string',
10331038
description: 'Page or database title',
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { describe, expect, it } from 'vitest'
2+
import { SapConcurBlock } from '@/blocks/blocks/sap_concur'
3+
4+
const operation = 'sap_concur_list_travel_requests'
5+
6+
function mapParams(params: Record<string, unknown>, context?: { operation: string }) {
7+
const mapper = SapConcurBlock.tools.config?.params
8+
if (!mapper) throw new Error('SAP Concur block has no params mapper')
9+
return mapper({ operation, ...params }, context)
10+
}
11+
12+
describe('SAP Concur list travel requests mapping', () => {
13+
it('keeps the model user and sort arguments on a tool call', () => {
14+
const mapped = mapParams(
15+
{ userId: 'user-1', sortField: 'startDate', sortOrder: 'DESC' },
16+
{ operation }
17+
)
18+
19+
expect(mapped.userId).toBe('user-1')
20+
expect(mapped.sortField).toBe('startDate')
21+
expect(mapped.sortOrder).toBe('DESC')
22+
})
23+
24+
it('prefers the configured subBlock over the model argument', () => {
25+
const mapped = mapParams({ travelRequestUserId: 'configured', userId: 'model' }, { operation })
26+
27+
expect(mapped.userId).toBe('configured')
28+
})
29+
30+
it('does not forward a stale same-named value on the canvas', () => {
31+
const mapped = mapParams({ userId: 'stale-from-another-operation' })
32+
33+
expect(mapped.userId).toBeUndefined()
34+
})
35+
})

0 commit comments

Comments
 (0)