Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
fixed remaining
  • Loading branch information
waleedlatif1 committed Feb 17, 2026
commit e0ac39ab67e30912e7fb3b025c331705208d433e
22 changes: 14 additions & 8 deletions apps/docs/content/docs/en/tools/pipedrive.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ Retrieve files from Pipedrive with optional filters

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

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

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

### `pipedrive_get_mail_thread`
Expand Down Expand Up @@ -242,6 +243,8 @@ Retrieve all pipelines from Pipedrive
| ↳ `add_time` | string | When the pipeline was created |
| ↳ `update_time` | string | When the pipeline was last updated |
| `total_items` | number | Total number of pipelines returned |
| `has_more` | boolean | Whether more pipelines are available |
| `next_start` | number | Offset for fetching the next page |
| `success` | boolean | Operation success status |

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

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

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

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

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

### `pipedrive_create_lead`
Expand Down
5 changes: 1 addition & 4 deletions apps/docs/content/docs/en/tools/zendesk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ Retrieve a list of tickets from Zendesk with optional filtering
| `type` | string | No | Filter by type: "problem", "incident", "question", or "task" |
| `assigneeId` | string | No | Filter by assignee user ID as a numeric string \(e.g., "12345"\) |
| `organizationId` | string | No | Filter by organization ID as a numeric string \(e.g., "67890"\) |
| `sortBy` | string | No | Sort field: "created_at", "updated_at", "priority", or "status" |
| `sortOrder` | string | No | Sort order: "asc" or "desc" |
| `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"\) |
| `perPage` | string | No | Results per page as a number string \(default: "100", max: "100"\) |
| `pageAfter` | string | No | Cursor from a previous response to fetch the next page of results |

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

Expand Down
20 changes: 12 additions & 8 deletions apps/sim/app/api/tools/pipedrive/get-files/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ interface PipedriveFile {
interface PipedriveApiResponse {
success: boolean
data?: PipedriveFile[]
additional_data?: {
pagination?: {
more_items_in_collection: boolean
next_start: number
}
}
error?: string
}

const PipedriveGetFilesSchema = z.object({
accessToken: z.string().min(1, 'Access token is required'),
deal_id: z.string().optional().nullable(),
person_id: z.string().optional().nullable(),
org_id: z.string().optional().nullable(),
limit: z.string().optional().nullable(),
start: z.string().optional().nullable(),
downloadFiles: z.boolean().optional().default(false),
Expand All @@ -55,21 +58,18 @@ export async function POST(request: NextRequest) {
const body = await request.json()
const validatedData = PipedriveGetFilesSchema.parse(body)

const { accessToken, deal_id, person_id, org_id, limit, start, downloadFiles } = validatedData
const { accessToken, limit, start, downloadFiles } = validatedData

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

if (deal_id) queryParams.append('deal_id', deal_id)
if (person_id) queryParams.append('person_id', person_id)
if (org_id) queryParams.append('org_id', org_id)
if (limit) queryParams.append('limit', limit)
if (start) queryParams.append('start', start)

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

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

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

const files = data.data || []
const hasMore = data.additional_data?.pagination?.more_items_in_collection || false
const nextStart = data.additional_data?.pagination?.next_start ?? null
const downloadedFiles: Array<{
name: string
mimeType: string
Expand Down Expand Up @@ -151,6 +153,8 @@ export async function POST(request: NextRequest) {
files,
downloadedFiles: downloadedFiles.length > 0 ? downloadedFiles : undefined,
total_items: files.length,
has_more: hasMore,
next_start: nextStart,
success: true,
},
})
Expand Down
58 changes: 17 additions & 41 deletions apps/sim/blocks/blocks/pipedrive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,32 +215,11 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
placeholder: 'New deal title ',
condition: { field: 'operation', value: ['update_deal'] },
},
{
id: 'deal_id',
title: 'Deal ID',
type: 'short-input',
placeholder: 'Filter by deal ID ',
condition: { field: 'operation', value: ['get_files'] },
},
{
id: 'person_id',
title: 'Person ID',
type: 'short-input',
placeholder: 'Filter by person ID ',
condition: { field: 'operation', value: ['get_files'] },
},
{
id: 'org_id',
title: 'Organization ID',
type: 'short-input',
placeholder: 'Filter by organization ID ',
condition: { field: 'operation', value: ['get_files'] },
},
{
id: 'limit',
title: 'Limit',
type: 'short-input',
placeholder: 'Number of results (default 100, max 500)',
placeholder: 'Number of results (default 100, max 100)',
condition: { field: 'operation', value: ['get_files'] },
},
{
Expand Down Expand Up @@ -343,19 +322,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
placeholder: 'Filter by stage ID ',
condition: { field: 'operation', value: ['get_pipeline_deals'] },
},
{
id: 'status',
title: 'Status',
type: 'dropdown',
options: [
{ label: 'All', id: '' },
{ label: 'Open', id: 'open' },
{ label: 'Won', id: 'won' },
{ label: 'Lost', id: 'lost' },
],
value: () => '',
condition: { field: 'operation', value: ['get_pipeline_deals'] },
},
{
id: 'limit',
title: 'Limit',
Expand Down Expand Up @@ -446,22 +412,29 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
id: 'deal_id',
title: 'Deal ID',
type: 'short-input',
placeholder: 'Filter by deal ID ',
condition: { field: 'operation', value: ['get_activities', 'create_activity'] },
placeholder: 'Associated deal ID ',
condition: { field: 'operation', value: ['create_activity'] },
},
{
id: 'person_id',
title: 'Person ID',
type: 'short-input',
placeholder: 'Filter by person ID ',
condition: { field: 'operation', value: ['get_activities', 'create_activity'] },
placeholder: 'Associated person ID ',
condition: { field: 'operation', value: ['create_activity'] },
},
{
id: 'org_id',
title: 'Organization ID',
type: 'short-input',
placeholder: 'Filter by organization ID ',
condition: { field: 'operation', value: ['get_activities', 'create_activity'] },
placeholder: 'Associated organization ID ',
condition: { field: 'operation', value: ['create_activity'] },
},
{
id: 'user_id',
title: 'User ID',
type: 'short-input',
placeholder: 'Filter by user ID',
condition: { field: 'operation', value: ['get_activities'] },
},
{
id: 'type',
Expand Down Expand Up @@ -814,12 +787,15 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
due_time: { type: 'string', description: 'Due time' },
duration: { type: 'string', description: 'Duration' },
done: { type: 'string', description: 'Completion status' },
user_id: { type: 'string', description: 'User ID' },
note: { type: 'string', description: 'Notes' },
lead_id: { type: 'string', description: 'Lead ID' },
archived: { type: 'string', description: 'Archived status' },
value_amount: { type: 'string', description: 'Value amount' },
value_currency: { type: 'string', description: 'Value currency' },
is_archived: { type: 'string', description: 'Archive status' },
organization_id: { type: 'string', description: 'Organization ID' },
owner_id: { type: 'string', description: 'Owner user ID' },
},
outputs: {
deals: { type: 'json', description: 'Array of deal objects' },
Expand Down
32 changes: 10 additions & 22 deletions apps/sim/blocks/blocks/zendesk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,33 +460,20 @@ Return ONLY the search query - no explanations.`,
},
},
{
id: 'sortBy',
title: 'Sort By',
id: 'sort',
title: 'Sort',
type: 'dropdown',
options: [
{ label: 'Relevance', id: 'relevance' },
{ label: 'Created At', id: 'created_at' },
{ label: 'Updated At', id: 'updated_at' },
{ label: 'Priority', id: 'priority' },
{ label: 'Status', id: 'status' },
{ label: 'Ticket Type', id: 'ticket_type' },
{ label: 'Updated At (Asc)', id: 'updated_at' },
{ label: 'Updated At (Desc)', id: '-updated_at' },
{ label: 'ID (Asc)', id: 'id' },
{ label: 'ID (Desc)', id: '-id' },
{ label: 'Status (Asc)', id: 'status' },
{ label: 'Status (Desc)', id: '-status' },
],
condition: {
field: 'operation',
value: ['search'],
},
},
{
id: 'sortOrder',
title: 'Sort Order',
type: 'dropdown',
options: [
{ label: 'Ascending', id: 'asc' },
{ label: 'Descending', id: 'desc' },
],
condition: {
field: 'operation',
value: ['search'],
value: ['get_tickets'],
},
},
// Pagination fields
Expand Down Expand Up @@ -645,6 +632,7 @@ Return ONLY the search query - no explanations.`,
email: { type: 'string', description: 'Zendesk email address' },
apiToken: { type: 'string', description: 'Zendesk API token' },
subdomain: { type: 'string', description: 'Zendesk subdomain' },
sort: { type: 'string', description: 'Sort field for ticket listing' },
},
outputs: {
// Ticket operations - list
Expand Down
30 changes: 13 additions & 17 deletions apps/sim/tools/pipedrive/get_activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,11 @@ export const pipedriveGetActivitiesTool: ToolConfig<
visibility: 'hidden',
description: 'The access token for the Pipedrive API',
},
deal_id: {
user_id: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filter activities by deal ID (e.g., "123")',
},
person_id: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filter activities by person ID (e.g., "456")',
},
org_id: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filter activities by organization ID (e.g., "789")',
description: 'Filter activities by user ID (e.g., "123")',
},
Comment on lines +27 to 32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking removal of deal_id, person_id, org_id filters

The three activity filter params (deal_id, person_id, org_id) have been removed and replaced with user_id. These are all valid filter params on the Pipedrive /v1/activities endpoint and are not mutually exclusive with user_id. Removing them silently breaks existing users who filter activities by deal or person.

The same applies to get_files where deal_id, person_id, and org_id filters were removed entirely (see route.ts and get_files.ts). The Pipedrive /v1/files endpoint does support these filters, so pagination via start doesn't require their removal.

Consider reinstating these filter params alongside the new pagination field.

type: {
type: 'string',
Expand Down Expand Up @@ -73,9 +61,7 @@ export const pipedriveGetActivitiesTool: ToolConfig<
const baseUrl = 'https://api.pipedrive.com/v1/activities'
const queryParams = new URLSearchParams()

if (params.deal_id) queryParams.append('deal_id', params.deal_id)
if (params.person_id) queryParams.append('person_id', params.person_id)
if (params.org_id) queryParams.append('org_id', params.org_id)
if (params.user_id) queryParams.append('user_id', params.user_id)
if (params.type) queryParams.append('type', params.type)
if (params.done) queryParams.append('done', params.done)
if (params.limit) queryParams.append('limit', params.limit)
Expand Down Expand Up @@ -131,6 +117,16 @@ export const pipedriveGetActivitiesTool: ToolConfig<
},
},
total_items: { type: 'number', description: 'Total number of activities returned' },
has_more: {
type: 'boolean',
description: 'Whether more activities are available',
optional: true,
},
next_start: {
type: 'number',
description: 'Offset for fetching the next page',
optional: true,
},
success: { type: 'boolean', description: 'Operation success status' },
},
}
Loading