Skip to content

Commit ad1bb6b

Browse files
committed
fix(integrations): wave-4 validation pass — fix alignment enum, GraphQL input-object, scope/UI gaps
Comprehensive /validate-integration of all 6 modified integrations (existing + new tools) vs live API docs. Fixes: - google_docs: CRITICAL alignment enum LEFT/RIGHT/JUSTIFY -> API enum START/END/JUSTIFIED (mapped); namedStyleType 'unchanged' option; 'zero-based' index wording - monday: CRITICAL search_items columns now emits GraphQL input-object with unquoted keys (was always failing the non-cursor branch) - slack: schedule_message DMs via user-id-as-channel; add channels:manage/groups:write/reactions:read scope descriptions; nextCursor optional - jira: list_projects expand=lead so lead outputs populate (was always null) - trello: get_actions limit now applies to the card path too - asana: add missing 'completed' + 'projects' subBlocks (were unsettable in UI); request permalink_url via opt_fields on create routes
1 parent 6770cf4 commit ad1bb6b

22 files changed

Lines changed: 106 additions & 41 deletions

File tree

apps/docs/content/docs/en/integrations/google_docs.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Insert text at a specific index in a Google Docs document. When no index is prov
110110
| --------- | ---- | -------- | ----------- |
111111
| `documentId` | string | Yes | The ID of the document to insert text into |
112112
| `text` | string | Yes | The text to insert |
113-
| `index` | number | No | The 1-based character index at which to insert the text. When omitted, text is appended to the end of the document. |
113+
| `index` | number | No | The zero-based character index at which to insert the text. When omitted, text is appended to the end of the document. |
114114

115115
#### Output
116116

@@ -158,7 +158,7 @@ Insert an empty table with the given number of rows and columns into a Google Do
158158
| `documentId` | string | Yes | The ID of the document to insert the table into |
159159
| `rows` | number | Yes | The number of rows in the table |
160160
| `columns` | number | Yes | The number of columns in the table |
161-
| `index` | number | No | The 1-based character index at which to insert the table. When omitted, the table is appended to the end of the document. |
161+
| `index` | number | No | The zero-based character index at which to insert the table. When omitted, the table is appended to the end of the document. |
162162

163163
#### Output
164164

@@ -181,7 +181,7 @@ Insert an inline image from a public URL into a Google Docs document. The image
181181
| --------- | ---- | -------- | ----------- |
182182
| `documentId` | string | Yes | The ID of the document to insert the image into |
183183
| `imageUrl` | string | Yes | The publicly accessible URL of the image to insert |
184-
| `index` | number | No | The 1-based character index at which to insert the image. When omitted, the image is appended to the end of the document. |
184+
| `index` | number | No | The zero-based character index at which to insert the image. When omitted, the image is appended to the end of the document. |
185185
| `width` | number | No | Optional image width in points \(PT\) |
186186
| `height` | number | No | Optional image height in points \(PT\) |
187187

@@ -205,7 +205,7 @@ Insert a page break into a Google Docs document. When no index is provided, the
205205
| Parameter | Type | Required | Description |
206206
| --------- | ---- | -------- | ----------- |
207207
| `documentId` | string | Yes | The ID of the document to insert the page break into |
208-
| `index` | number | No | The 1-based character index at which to insert the page break. When omitted, the page break is appended to the end of the document. |
208+
| `index` | number | No | The zero-based character index at which to insert the page break. When omitted, the page break is appended to the end of the document. |
209209

210210
#### Output
211211

@@ -227,7 +227,7 @@ Apply bold, italic, underline, and/or font size to a range of text in a Google D
227227
| Parameter | Type | Required | Description |
228228
| --------- | ---- | -------- | ----------- |
229229
| `documentId` | string | Yes | The ID of the document to update |
230-
| `startIndex` | number | Yes | The 1-based start character index of the range to style \(inclusive\) |
230+
| `startIndex` | number | Yes | The zero-based start character index of the range to style \(inclusive\) |
231231
| `endIndex` | number | Yes | The end character index of the range to style \(exclusive\) |
232232
| `bold` | boolean | No | Whether to make the text bold |
233233
| `italic` | boolean | No | Whether to make the text italic |
@@ -254,7 +254,7 @@ Apply a named paragraph style (such as a heading or title) and/or alignment to t
254254
| Parameter | Type | Required | Description |
255255
| --------- | ---- | -------- | ----------- |
256256
| `documentId` | string | Yes | The ID of the document to update |
257-
| `startIndex` | number | Yes | The 1-based start character index of the range to style \(inclusive\) |
257+
| `startIndex` | number | Yes | The zero-based start character index of the range to style \(inclusive\) |
258258
| `endIndex` | number | Yes | The end character index of the range to style \(exclusive\) |
259259
| `namedStyleType` | string | No | The named paragraph style to apply. One of: NORMAL_TEXT, TITLE, SUBTITLE, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6. |
260260
| `alignment` | string | No | The paragraph alignment to apply. One of: LEFT, CENTER, RIGHT, JUSTIFY. |
@@ -279,7 +279,7 @@ Add bulleted or numbered list formatting to the paragraphs overlapping a range o
279279
| Parameter | Type | Required | Description |
280280
| --------- | ---- | -------- | ----------- |
281281
| `documentId` | string | Yes | The ID of the document to update |
282-
| `startIndex` | number | Yes | The 1-based start character index of the range to bullet \(inclusive\) |
282+
| `startIndex` | number | Yes | The zero-based start character index of the range to bullet \(inclusive\) |
283283
| `endIndex` | number | Yes | The end character index of the range to bullet \(exclusive\) |
284284
| `bulletPreset` | string | No | The bullet glyph preset to apply. Defaults to BULLET_DISC_CIRCLE_SQUARE. Examples: BULLET_DISC_CIRCLE_SQUARE, BULLET_CHECKBOX, NUMBERED_DECIMAL_ALPHA_ROMAN, NUMBERED_DECIMAL_NESTED. |
285285

@@ -303,7 +303,7 @@ Remove bullet or numbered list formatting from the paragraphs overlapping a rang
303303
| Parameter | Type | Required | Description |
304304
| --------- | ---- | -------- | ----------- |
305305
| `documentId` | string | Yes | The ID of the document to update |
306-
| `startIndex` | number | Yes | The 1-based start character index of the range to clear bullets from \(inclusive\) |
306+
| `startIndex` | number | Yes | The zero-based start character index of the range to clear bullets from \(inclusive\) |
307307
| `endIndex` | number | Yes | The end character index of the range to clear bullets from \(exclusive\) |
308308

309309
#### Output
@@ -326,7 +326,7 @@ Delete all content between a start and end character index in a Google Docs docu
326326
| Parameter | Type | Required | Description |
327327
| --------- | ---- | -------- | ----------- |
328328
| `documentId` | string | Yes | The ID of the document to delete content from |
329-
| `startIndex` | number | Yes | The 1-based start character index of the range to delete \(inclusive\) |
329+
| `startIndex` | number | Yes | The zero-based start character index of the range to delete \(inclusive\) |
330330
| `endIndex` | number | Yes | The end character index of the range to delete \(exclusive\) |
331331

332332
#### Output
@@ -350,7 +350,7 @@ Create a named range over a span of content in a Google Docs document so it can
350350
| --------- | ---- | -------- | ----------- |
351351
| `documentId` | string | Yes | The ID of the document to update |
352352
| `name` | string | Yes | The name of the range to create \(1-256 characters\) |
353-
| `startIndex` | number | Yes | The 1-based start character index of the range \(inclusive\) |
353+
| `startIndex` | number | Yes | The zero-based start character index of the range \(inclusive\) |
354354
| `endIndex` | number | Yes | The end character index of the range \(exclusive\) |
355355

356356
#### Output

apps/sim/app/api/tools/asana/create-project/route.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,18 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
3232
projectData.notes = notes
3333
}
3434

35-
const response = await fetch('https://app.asana.com/api/1.0/projects', {
36-
method: 'POST',
37-
headers: {
38-
Authorization: `Bearer ${accessToken}`,
39-
Accept: 'application/json',
40-
'Content-Type': 'application/json',
41-
},
42-
body: JSON.stringify({ data: projectData }),
43-
})
35+
const response = await fetch(
36+
'https://app.asana.com/api/1.0/projects?opt_fields=name,notes,archived,color,created_at,modified_at,permalink_url',
37+
{
38+
method: 'POST',
39+
headers: {
40+
Authorization: `Bearer ${accessToken}`,
41+
Accept: 'application/json',
42+
'Content-Type': 'application/json',
43+
},
44+
body: JSON.stringify({ data: projectData }),
45+
}
46+
)
4447

4548
if (!response.ok) {
4649
const errorText = await response.text()

apps/sim/app/api/tools/asana/create-subtask/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
3838
subtaskData.due_on = due_on
3939
}
4040

41-
const url = `https://app.asana.com/api/1.0/tasks/${taskGid}/subtasks`
41+
const url = `https://app.asana.com/api/1.0/tasks/${taskGid}/subtasks?opt_fields=name,notes,completed,created_at,permalink_url`
4242

4343
const response = await fetch(url, {
4444
method: 'POST',

apps/sim/app/api/tools/asana/create-task/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
2727
return NextResponse.json({ error: workspaceValidation.error }, { status: 400 })
2828
}
2929

30-
const url = 'https://app.asana.com/api/1.0/tasks'
30+
const url =
31+
'https://app.asana.com/api/1.0/tasks?opt_fields=name,notes,completed,created_at,permalink_url'
3132

3233
const taskData: Record<string, unknown> = {
3334
name,

apps/sim/blocks/blocks/asana.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,28 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
357357
value: ['add_followers'],
358358
},
359359
},
360+
{
361+
id: 'projects',
362+
title: 'Projects',
363+
type: 'short-input',
364+
placeholder: 'Comma-separated project GIDs to filter by',
365+
mode: 'advanced',
366+
condition: {
367+
field: 'operation',
368+
value: ['search_tasks'],
369+
},
370+
},
371+
{
372+
id: 'completed',
373+
title: 'Completion',
374+
type: 'checkbox-list',
375+
options: [{ label: 'Completed', id: 'completed' }],
376+
mode: 'advanced',
377+
condition: {
378+
field: 'operation',
379+
value: ['update_task', 'search_tasks'],
380+
},
381+
},
360382
],
361383
tools: {
362384
access: [

apps/sim/blocks/blocks/google_docs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ Return ONLY the text to insert - no explanations, no extra text.`,
362362
title: 'Paragraph Style',
363363
type: 'dropdown',
364364
options: [
365+
{ label: 'Default (unchanged)', id: '' },
365366
{ label: 'Normal Text', id: 'NORMAL_TEXT' },
366367
{ label: 'Title', id: 'TITLE' },
367368
{ label: 'Subtitle', id: 'SUBTITLE' },

apps/sim/blocks/blocks/slack.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,9 @@ Return ONLY the integer Unix timestamp - no explanations, no quotes, no extra te
16861686

16871687
if (isDM && dmSupportedOperations.includes(operation)) {
16881688
baseParams.userId = effectiveUserId
1689+
} else if (isDM && operation === 'schedule_message' && effectiveUserId) {
1690+
// chat.scheduleMessage opens a DM when the channel is set to a user ID
1691+
baseParams.channel = effectiveUserId
16891692
} else if (effectiveChannel) {
16901693
baseParams.channel = effectiveChannel
16911694
}

apps/sim/lib/oauth/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,10 @@ export const SCOPE_DESCRIPTIONS: Record<string, string> = {
277277
// Slack scopes
278278
'channels:read': 'View public channels',
279279
'channels:history': 'Read channel messages',
280+
'channels:manage': 'Create, archive, and rename public channels',
280281
'groups:read': 'View private channels',
281282
'groups:history': 'Read private messages',
283+
'groups:write': 'Create, archive, and manage private channels',
282284
'chat:write': 'Send messages',
283285
'chat:write.public': 'Post to public channels',
284286
'assistant:write': 'Set assistant thread status, title, and suggested prompts',
@@ -292,6 +294,7 @@ export const SCOPE_DESCRIPTIONS: Record<string, string> = {
292294
'canvases:read': 'Read canvas sections',
293295
'canvases:write': 'Create, edit, and delete canvas documents',
294296
'reactions:write': 'Add emoji reactions to messages',
297+
'reactions:read': 'View emoji reactions on messages',
295298

296299
// Webflow scopes
297300
'sites:read': 'View Webflow sites',

apps/sim/tools/google_docs/create-named-range.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const createNamedRangeTool: ToolConfig<
4545
type: 'number',
4646
required: true,
4747
visibility: 'user-or-llm',
48-
description: 'The 1-based start character index of the range (inclusive)',
48+
description: 'The zero-based start character index of the range (inclusive)',
4949
},
5050
endIndex: {
5151
type: 'number',

apps/sim/tools/google_docs/create-paragraph-bullets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const createParagraphBulletsTool: ToolConfig<
5656
type: 'number',
5757
required: true,
5858
visibility: 'user-or-llm',
59-
description: 'The 1-based start character index of the range to bullet (inclusive)',
59+
description: 'The zero-based start character index of the range to bullet (inclusive)',
6060
},
6161
endIndex: {
6262
type: 'number',

0 commit comments

Comments
 (0)