Skip to content

Commit e0ac39a

Browse files
committed
fixed remaining
1 parent fdbbc6e commit e0ac39a

File tree

19 files changed

+169
-209
lines changed

19 files changed

+169
-209
lines changed

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

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,7 @@ Retrieve files from Pipedrive with optional filters
151151

152152
| Parameter | Type | Required | Description |
153153
| --------- | ---- | -------- | ----------- |
154-
| `deal_id` | string | No | Filter files by deal ID \(e.g., "123"\) |
155-
| `person_id` | string | No | Filter files by person ID \(e.g., "456"\) |
156-
| `org_id` | string | No | Filter files by organization ID \(e.g., "789"\) |
157-
| `limit` | string | No | Number of results to return \(e.g., "50", default: 100, max: 500\) |
154+
| `limit` | string | No | Number of results to return \(e.g., "50", default: 100, max: 100\) |
158155
| `start` | string | No | Pagination start offset \(0-based index of the first item to return\) |
159156
| `downloadFiles` | boolean | No | Download file contents into file outputs |
160157

@@ -175,6 +172,8 @@ Retrieve files from Pipedrive with optional filters
175172
|`url` | string | File download URL |
176173
| `downloadedFiles` | file[] | Downloaded files from Pipedrive |
177174
| `total_items` | number | Total number of files returned |
175+
| `has_more` | boolean | Whether more files are available |
176+
| `next_start` | number | Offset for fetching the next page |
178177
| `success` | boolean | Operation success status |
179178

180179
### `pipedrive_get_mail_messages`
@@ -195,6 +194,8 @@ Retrieve mail threads from Pipedrive mailbox
195194
| --------- | ---- | ----------- |
196195
| `messages` | array | Array of mail thread objects from Pipedrive mailbox |
197196
| `total_items` | number | Total number of mail threads returned |
197+
| `has_more` | boolean | Whether more messages are available |
198+
| `next_start` | number | Offset for fetching the next page |
198199
| `success` | boolean | Operation success status |
199200

200201
### `pipedrive_get_mail_thread`
@@ -242,6 +243,8 @@ Retrieve all pipelines from Pipedrive
242243
|`add_time` | string | When the pipeline was created |
243244
|`update_time` | string | When the pipeline was last updated |
244245
| `total_items` | number | Total number of pipelines returned |
246+
| `has_more` | boolean | Whether more pipelines are available |
247+
| `next_start` | number | Offset for fetching the next page |
245248
| `success` | boolean | Operation success status |
246249

247250
### `pipedrive_get_pipeline_deals`
@@ -254,7 +257,6 @@ Retrieve all deals in a specific pipeline
254257
| --------- | ---- | -------- | ----------- |
255258
| `pipeline_id` | string | Yes | The ID of the pipeline \(e.g., "1"\) |
256259
| `stage_id` | string | No | Filter by specific stage within the pipeline \(e.g., "2"\) |
257-
| `status` | string | No | Filter by deal status: open, won, lost |
258260
| `limit` | string | No | Number of results to return \(e.g., "50", default: 100, max: 500\) |
259261
| `start` | string | No | Pagination start offset \(0-based index of the first item to return\) |
260262

@@ -286,6 +288,8 @@ Retrieve all projects or a specific project from Pipedrive
286288
| `projects` | array | Array of project objects \(when listing all\) |
287289
| `project` | object | Single project object \(when project_id is provided\) |
288290
| `total_items` | number | Total number of projects returned |
291+
| `has_more` | boolean | Whether more projects are available |
292+
| `next_cursor` | string | Cursor for fetching the next page |
289293
| `success` | boolean | Operation success status |
290294

291295
### `pipedrive_create_project`
@@ -316,9 +320,7 @@ Retrieve activities (tasks) from Pipedrive with optional filters
316320

317321
| Parameter | Type | Required | Description |
318322
| --------- | ---- | -------- | ----------- |
319-
| `deal_id` | string | No | Filter activities by deal ID \(e.g., "123"\) |
320-
| `person_id` | string | No | Filter activities by person ID \(e.g., "456"\) |
321-
| `org_id` | string | No | Filter activities by organization ID \(e.g., "789"\) |
323+
| `user_id` | string | No | Filter activities by user ID \(e.g., "123"\) |
322324
| `type` | string | No | Filter by activity type \(call, meeting, task, deadline, email, lunch\) |
323325
| `done` | string | No | Filter by completion status: 0 for not done, 1 for done |
324326
| `limit` | string | No | Number of results to return \(e.g., "50", default: 100, max: 500\) |
@@ -343,6 +345,8 @@ Retrieve activities (tasks) from Pipedrive with optional filters
343345
|`add_time` | string | When the activity was created |
344346
|`update_time` | string | When the activity was last updated |
345347
| `total_items` | number | Total number of activities returned |
348+
| `has_more` | boolean | Whether more activities are available |
349+
| `next_start` | number | Offset for fetching the next page |
346350
| `success` | boolean | Operation success status |
347351

348352
### `pipedrive_create_activity`
@@ -442,6 +446,8 @@ Retrieve all leads or a specific lead from Pipedrive
442446
|`add_time` | string | When the lead was created \(ISO 8601\) |
443447
|`update_time` | string | When the lead was last updated \(ISO 8601\) |
444448
| `total_items` | number | Total number of leads returned |
449+
| `has_more` | boolean | Whether more leads are available |
450+
| `next_start` | number | Offset for fetching the next page |
445451
| `success` | boolean | Operation success status |
446452

447453
### `pipedrive_create_lead`

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ Retrieve a list of tickets from Zendesk with optional filtering
6767
| `type` | string | No | Filter by type: "problem", "incident", "question", or "task" |
6868
| `assigneeId` | string | No | Filter by assignee user ID as a numeric string \(e.g., "12345"\) |
6969
| `organizationId` | string | No | Filter by organization ID as a numeric string \(e.g., "67890"\) |
70-
| `sortBy` | string | No | Sort field: "created_at", "updated_at", "priority", or "status" |
71-
| `sortOrder` | string | No | Sort order: "asc" or "desc" |
70+
| `sort` | string | No | Sort field for ticket listing \(only applies without filters\): "updated_at", "id", or "status". Prefix with "-" for descending \(e.g., "-updated_at"\) |
7271
| `perPage` | string | No | Results per page as a number string \(default: "100", max: "100"\) |
7372
| `pageAfter` | string | No | Cursor from a previous response to fetch the next page of results |
7473

@@ -1250,8 +1249,6 @@ Unified search across tickets, users, and organizations in Zendesk
12501249
| `subdomain` | string | Yes | Your Zendesk subdomain |
12511250
| `query` | string | Yes | Search query string using Zendesk search syntax \(e.g., "type:ticket status:open"\) |
12521251
| `filterType` | string | Yes | Resource type to search for: "ticket", "user", "organization", or "group" |
1253-
| `sortBy` | string | No | Sort field: "relevance", "created_at", "updated_at", "priority", "status", or "ticket_type" |
1254-
| `sortOrder` | string | No | Sort order: "asc" or "desc" |
12551252
| `perPage` | string | No | Results per page as a number string \(default: "100", max: "100"\) |
12561253
| `pageAfter` | string | No | Cursor from a previous response to fetch the next page of results |
12571254

apps/sim/app/api/tools/pipedrive/get-files/route.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ interface PipedriveFile {
2222
interface PipedriveApiResponse {
2323
success: boolean
2424
data?: PipedriveFile[]
25+
additional_data?: {
26+
pagination?: {
27+
more_items_in_collection: boolean
28+
next_start: number
29+
}
30+
}
2531
error?: string
2632
}
2733

2834
const PipedriveGetFilesSchema = z.object({
2935
accessToken: z.string().min(1, 'Access token is required'),
30-
deal_id: z.string().optional().nullable(),
31-
person_id: z.string().optional().nullable(),
32-
org_id: z.string().optional().nullable(),
3336
limit: z.string().optional().nullable(),
3437
start: z.string().optional().nullable(),
3538
downloadFiles: z.boolean().optional().default(false),
@@ -55,21 +58,18 @@ export async function POST(request: NextRequest) {
5558
const body = await request.json()
5659
const validatedData = PipedriveGetFilesSchema.parse(body)
5760

58-
const { accessToken, deal_id, person_id, org_id, limit, start, downloadFiles } = validatedData
61+
const { accessToken, limit, start, downloadFiles } = validatedData
5962

6063
const baseUrl = 'https://api.pipedrive.com/v1/files'
6164
const queryParams = new URLSearchParams()
6265

63-
if (deal_id) queryParams.append('deal_id', deal_id)
64-
if (person_id) queryParams.append('person_id', person_id)
65-
if (org_id) queryParams.append('org_id', org_id)
6666
if (limit) queryParams.append('limit', limit)
6767
if (start) queryParams.append('start', start)
6868

6969
const queryString = queryParams.toString()
7070
const apiUrl = queryString ? `${baseUrl}?${queryString}` : baseUrl
7171

72-
logger.info(`[${requestId}] Fetching files from Pipedrive`, { deal_id, person_id, org_id })
72+
logger.info(`[${requestId}] Fetching files from Pipedrive`)
7373

7474
const urlValidation = await validateUrlWithDNS(apiUrl, 'apiUrl')
7575
if (!urlValidation.isValid) {
@@ -95,6 +95,8 @@ export async function POST(request: NextRequest) {
9595
}
9696

9797
const files = data.data || []
98+
const hasMore = data.additional_data?.pagination?.more_items_in_collection || false
99+
const nextStart = data.additional_data?.pagination?.next_start ?? null
98100
const downloadedFiles: Array<{
99101
name: string
100102
mimeType: string
@@ -151,6 +153,8 @@ export async function POST(request: NextRequest) {
151153
files,
152154
downloadedFiles: downloadedFiles.length > 0 ? downloadedFiles : undefined,
153155
total_items: files.length,
156+
has_more: hasMore,
157+
next_start: nextStart,
154158
success: true,
155159
},
156160
})

apps/sim/blocks/blocks/pipedrive.ts

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -215,32 +215,11 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
215215
placeholder: 'New deal title ',
216216
condition: { field: 'operation', value: ['update_deal'] },
217217
},
218-
{
219-
id: 'deal_id',
220-
title: 'Deal ID',
221-
type: 'short-input',
222-
placeholder: 'Filter by deal ID ',
223-
condition: { field: 'operation', value: ['get_files'] },
224-
},
225-
{
226-
id: 'person_id',
227-
title: 'Person ID',
228-
type: 'short-input',
229-
placeholder: 'Filter by person ID ',
230-
condition: { field: 'operation', value: ['get_files'] },
231-
},
232-
{
233-
id: 'org_id',
234-
title: 'Organization ID',
235-
type: 'short-input',
236-
placeholder: 'Filter by organization ID ',
237-
condition: { field: 'operation', value: ['get_files'] },
238-
},
239218
{
240219
id: 'limit',
241220
title: 'Limit',
242221
type: 'short-input',
243-
placeholder: 'Number of results (default 100, max 500)',
222+
placeholder: 'Number of results (default 100, max 100)',
244223
condition: { field: 'operation', value: ['get_files'] },
245224
},
246225
{
@@ -343,19 +322,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
343322
placeholder: 'Filter by stage ID ',
344323
condition: { field: 'operation', value: ['get_pipeline_deals'] },
345324
},
346-
{
347-
id: 'status',
348-
title: 'Status',
349-
type: 'dropdown',
350-
options: [
351-
{ label: 'All', id: '' },
352-
{ label: 'Open', id: 'open' },
353-
{ label: 'Won', id: 'won' },
354-
{ label: 'Lost', id: 'lost' },
355-
],
356-
value: () => '',
357-
condition: { field: 'operation', value: ['get_pipeline_deals'] },
358-
},
359325
{
360326
id: 'limit',
361327
title: 'Limit',
@@ -446,22 +412,29 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
446412
id: 'deal_id',
447413
title: 'Deal ID',
448414
type: 'short-input',
449-
placeholder: 'Filter by deal ID ',
450-
condition: { field: 'operation', value: ['get_activities', 'create_activity'] },
415+
placeholder: 'Associated deal ID ',
416+
condition: { field: 'operation', value: ['create_activity'] },
451417
},
452418
{
453419
id: 'person_id',
454420
title: 'Person ID',
455421
type: 'short-input',
456-
placeholder: 'Filter by person ID ',
457-
condition: { field: 'operation', value: ['get_activities', 'create_activity'] },
422+
placeholder: 'Associated person ID ',
423+
condition: { field: 'operation', value: ['create_activity'] },
458424
},
459425
{
460426
id: 'org_id',
461427
title: 'Organization ID',
462428
type: 'short-input',
463-
placeholder: 'Filter by organization ID ',
464-
condition: { field: 'operation', value: ['get_activities', 'create_activity'] },
429+
placeholder: 'Associated organization ID ',
430+
condition: { field: 'operation', value: ['create_activity'] },
431+
},
432+
{
433+
id: 'user_id',
434+
title: 'User ID',
435+
type: 'short-input',
436+
placeholder: 'Filter by user ID',
437+
condition: { field: 'operation', value: ['get_activities'] },
465438
},
466439
{
467440
id: 'type',
@@ -814,12 +787,15 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
814787
due_time: { type: 'string', description: 'Due time' },
815788
duration: { type: 'string', description: 'Duration' },
816789
done: { type: 'string', description: 'Completion status' },
790+
user_id: { type: 'string', description: 'User ID' },
817791
note: { type: 'string', description: 'Notes' },
818792
lead_id: { type: 'string', description: 'Lead ID' },
819793
archived: { type: 'string', description: 'Archived status' },
820794
value_amount: { type: 'string', description: 'Value amount' },
821795
value_currency: { type: 'string', description: 'Value currency' },
822796
is_archived: { type: 'string', description: 'Archive status' },
797+
organization_id: { type: 'string', description: 'Organization ID' },
798+
owner_id: { type: 'string', description: 'Owner user ID' },
823799
},
824800
outputs: {
825801
deals: { type: 'json', description: 'Array of deal objects' },

apps/sim/blocks/blocks/zendesk.ts

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -460,33 +460,20 @@ Return ONLY the search query - no explanations.`,
460460
},
461461
},
462462
{
463-
id: 'sortBy',
464-
title: 'Sort By',
463+
id: 'sort',
464+
title: 'Sort',
465465
type: 'dropdown',
466466
options: [
467-
{ label: 'Relevance', id: 'relevance' },
468-
{ label: 'Created At', id: 'created_at' },
469-
{ label: 'Updated At', id: 'updated_at' },
470-
{ label: 'Priority', id: 'priority' },
471-
{ label: 'Status', id: 'status' },
472-
{ label: 'Ticket Type', id: 'ticket_type' },
467+
{ label: 'Updated At (Asc)', id: 'updated_at' },
468+
{ label: 'Updated At (Desc)', id: '-updated_at' },
469+
{ label: 'ID (Asc)', id: 'id' },
470+
{ label: 'ID (Desc)', id: '-id' },
471+
{ label: 'Status (Asc)', id: 'status' },
472+
{ label: 'Status (Desc)', id: '-status' },
473473
],
474474
condition: {
475475
field: 'operation',
476-
value: ['search'],
477-
},
478-
},
479-
{
480-
id: 'sortOrder',
481-
title: 'Sort Order',
482-
type: 'dropdown',
483-
options: [
484-
{ label: 'Ascending', id: 'asc' },
485-
{ label: 'Descending', id: 'desc' },
486-
],
487-
condition: {
488-
field: 'operation',
489-
value: ['search'],
476+
value: ['get_tickets'],
490477
},
491478
},
492479
// Pagination fields
@@ -645,6 +632,7 @@ Return ONLY the search query - no explanations.`,
645632
email: { type: 'string', description: 'Zendesk email address' },
646633
apiToken: { type: 'string', description: 'Zendesk API token' },
647634
subdomain: { type: 'string', description: 'Zendesk subdomain' },
635+
sort: { type: 'string', description: 'Sort field for ticket listing' },
648636
},
649637
outputs: {
650638
// Ticket operations - list

apps/sim/tools/pipedrive/get_activities.ts

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,11 @@ export const pipedriveGetActivitiesTool: ToolConfig<
2424
visibility: 'hidden',
2525
description: 'The access token for the Pipedrive API',
2626
},
27-
deal_id: {
27+
user_id: {
2828
type: 'string',
2929
required: false,
3030
visibility: 'user-or-llm',
31-
description: 'Filter activities by deal ID (e.g., "123")',
32-
},
33-
person_id: {
34-
type: 'string',
35-
required: false,
36-
visibility: 'user-or-llm',
37-
description: 'Filter activities by person ID (e.g., "456")',
38-
},
39-
org_id: {
40-
type: 'string',
41-
required: false,
42-
visibility: 'user-or-llm',
43-
description: 'Filter activities by organization ID (e.g., "789")',
31+
description: 'Filter activities by user ID (e.g., "123")',
4432
},
4533
type: {
4634
type: 'string',
@@ -73,9 +61,7 @@ export const pipedriveGetActivitiesTool: ToolConfig<
7361
const baseUrl = 'https://api.pipedrive.com/v1/activities'
7462
const queryParams = new URLSearchParams()
7563

76-
if (params.deal_id) queryParams.append('deal_id', params.deal_id)
77-
if (params.person_id) queryParams.append('person_id', params.person_id)
78-
if (params.org_id) queryParams.append('org_id', params.org_id)
64+
if (params.user_id) queryParams.append('user_id', params.user_id)
7965
if (params.type) queryParams.append('type', params.type)
8066
if (params.done) queryParams.append('done', params.done)
8167
if (params.limit) queryParams.append('limit', params.limit)
@@ -131,6 +117,16 @@ export const pipedriveGetActivitiesTool: ToolConfig<
131117
},
132118
},
133119
total_items: { type: 'number', description: 'Total number of activities returned' },
120+
has_more: {
121+
type: 'boolean',
122+
description: 'Whether more activities are available',
123+
optional: true,
124+
},
125+
next_start: {
126+
type: 'number',
127+
description: 'Offset for fetching the next page',
128+
optional: true,
129+
},
134130
success: { type: 'boolean', description: 'Operation success status' },
135131
},
136132
}

0 commit comments

Comments
 (0)