Skip to content
Merged
2 changes: 1 addition & 1 deletion apps/docs/content/docs/integrations/intercom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ Create and send a new admin-initiated message in Intercom. Returns API-aligned f
| `body` | string | Yes | The body of the message |
| `from_type` | string | Yes | Sender type: "admin" |
| `from_id` | string | Yes | The ID of the admin sending the message |
| `to_type` | string | Yes | Recipient type: "contact" |
| `to_type` | string | Yes | Recipient role: "user" or "lead" |
| `to_id` | string | Yes | The ID of the contact receiving the message |
| `created_at` | number | No | Unix timestamp for when the message was created. If not provided, current time is used. |

Expand Down
22 changes: 12 additions & 10 deletions apps/docs/content/docs/integrations/pipedrive.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Retrieve files from Pipedrive with optional filters
| `files` | array | Array of file objects from Pipedrive |
| ↳ `id` | number | File ID |
| ↳ `name` | string | File name |
| ↳ `file_name` | string | Stored file name |
| ↳ `file_type` | string | File type/extension |
| ↳ `file_size` | number | File size in bytes |
| ↳ `add_time` | string | When the file was uploaded |
Expand Down Expand Up @@ -263,7 +264,8 @@ Retrieve all pipelines from Pipedrive
| `sort_by` | string | No | Field to sort by: id, update_time, add_time \(default: id\) |
| `sort_direction` | string | No | Sorting direction: asc, desc \(default: asc\) |
| `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\) |
| `start` | string | No | Ignored: Pipedrive API v2 pages pipelines with cursor instead of an offset |
| `cursor` | string | No | For pagination, the marker representing the first item on the next page |

#### Output

Expand All @@ -272,15 +274,15 @@ Retrieve all pipelines from Pipedrive
| `pipelines` | array | Array of pipeline objects from Pipedrive |
| ↳ `id` | number | Pipeline ID |
| ↳ `name` | string | Pipeline name |
| ↳ `url_title` | string | URL-friendly title |
| ↳ `order_nr` | number | Pipeline order number |
| ↳ `active` | boolean | Whether the pipeline is active |
| ↳ `deal_probability` | boolean | Whether deal probability is enabled |
| ↳ `add_time` | string | When the pipeline was created |
| ↳ `update_time` | string | When the pipeline was last updated |
| ↳ `is_deleted` | boolean | Whether the pipeline is deleted |
| ↳ `is_deal_probability_enabled` | boolean | Whether deal probability is enabled |
| ↳ `add_time` | string | When the pipeline was created \(ISO 8601\) |
| ↳ `update_time` | string | When the pipeline was last updated \(ISO 8601\) |
| `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 |
| `next_start` | number | Always null: API v2 pages with next_cursor instead of an offset |
| `next_cursor` | string | Cursor for fetching the next page; null on the last page |
| `success` | boolean | Operation success status |

</ReferenceDetails>
Expand Down Expand Up @@ -321,7 +323,7 @@ Retrieve all projects or a specific project from Pipedrive
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `project_id` | string | No | Optional: ID of a specific project to retrieve \(e.g., "123"\) |
| `status` | string | No | Filter by project status: open, completed, deleted \(only for listing all\) |
| `status` | string | No | Filter by project status: open, completed, canceled, deleted \(only for listing all\) |
| `limit` | string | No | Number of results to return \(e.g., "50", default: 100, max: 500, only for listing all\) |
| `cursor` | string | No | For pagination, the marker representing the first item on the next page |

Expand Down Expand Up @@ -419,7 +421,7 @@ Create a new activity (task) in Pipedrive
| `due_time` | string | No | Due time in HH:MM format \(e.g., "14:30"\) |
| `duration` | string | No | Duration in HH:MM format \(e.g., "01:00" for 1 hour\) |
| `deal_id` | string | No | ID of the deal to associate with \(e.g., "123"\) |
| `person_id` | string | No | ID of the person to associate with \(e.g., "456"\) |
| `person_id` | string | No | ID of the person to associate with as the primary participant \(e.g., "456"\) |
| `org_id` | string | No | ID of the organization to associate with \(e.g., "789"\) |
| `note` | string | No | Notes for the activity |

Expand Down Expand Up @@ -533,7 +535,7 @@ Create a new lead in Pipedrive
| `value_amount` | string | No | Potential value amount \(e.g., "10000"\) |
| `value_currency` | string | No | Currency code \(e.g., "USD", "EUR", "GBP"\) |
| `expected_close_date` | string | No | Expected close date in YYYY-MM-DD format \(e.g., "2025-04-15"\) |
| `visible_to` | string | No | Visibility: 1 \(Owner & followers\), 3 \(Entire company\) |
| `visible_to` | string | No | Visibility group; meanings depend on the Pipedrive plan. Light, Growth, and Professional: 1 = owner & followers, 3 = entire company. Premium and Ultimate: 1 = owner only, 3 = owner's visibility group, 5 = owner's visibility group and sub-groups, 7 = entire company |

#### Output

Expand Down
5 changes: 3 additions & 2 deletions apps/docs/content/docs/integrations/zendesk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ Update an existing ticket in Zendesk with support for custom fields
| `ticketId` | string | Yes | Ticket ID to update as a numeric string \(e.g., "12345"\) |
| `subject` | string | No | New ticket subject text |
| `comment` | string | No | Comment text to add to the ticket |
| `commentPublic` | boolean | No | Whether the comment is a public reply \(true\) or an internal note \(false\). Omit to keep the ticket default |
| `priority` | string | No | Priority: "low", "normal", "high", or "urgent" |
| `status` | string | No | Status: "new", "open", "pending", "hold", "solved", or "closed" |
| `type` | string | No | Type: "problem", "incident", "question", or "task" |
Expand Down Expand Up @@ -401,7 +402,7 @@ Update multiple tickets in Zendesk at once (max 100)
| `priority` | string | No | New priority for all tickets: "low", "normal", "high", or "urgent" |
| `assigneeId` | string | No | New assignee ID for all tickets as a numeric string \(e.g., "12345"\) |
| `groupId` | string | No | New group ID for all tickets as a numeric string \(e.g., "67890"\) |
| `tags` | string | No | Comma-separated tags to add to all tickets \(e.g., "bulk-update, processed"\) |
| `tags` | string | No | Comma-separated tags that replace the existing tags on all tickets \(e.g., "bulk-update, processed"\) |

#### Output

Expand Down Expand Up @@ -1247,7 +1248,7 @@ Unified search across tickets, users, and organizations in Zendesk

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | Search query string using Zendesk search syntax \(e.g., "type:ticket status:open"\) |
| `query` | string | Yes | Search query string using Zendesk search syntax \(e.g., "status:open priority:urgent"\). The resource type comes from filterType; a "type:" keyword in the query is dropped |
| `filterType` | string | Yes | Resource type to search for: "ticket", "user", "organization", or "group" |
| `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
29 changes: 26 additions & 3 deletions apps/sim/blocks/blocks/intercom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ const EVENT_ACTOR_FIELD = ['event_email', 'event_user_id', 'event_contact_id'] a
/** What an outbound message shows: its subject when set, otherwise its body. */
const MESSAGE_PREVIEW_FIELD = ['subject', 'body'] as const

/** Intercom requires `snoozed_until` as a whole Unix timestamp in seconds. */
function toSnoozeTimestamp(value: unknown): number {
const timestamp = Number(value)
if (!Number.isInteger(timestamp)) {
throw new Error('Snooze until must be a whole Unix timestamp in seconds')
}
return timestamp
}

export const IntercomBlock: BlockConfig = {
type: 'intercom',
name: 'Intercom (Legacy)',
Expand Down Expand Up @@ -854,7 +863,11 @@ Return ONLY the subject line - no explanations.`,
id: 'to_type',
title: 'To Type',
type: 'dropdown',
options: [{ label: 'Contact', id: 'contact' }],
options: [
{ label: 'User', id: 'user' },
Comment thread
waleedlatif1 marked this conversation as resolved.
Resolved
{ label: 'Lead', id: 'lead' },
{ label: 'Contact', id: 'contact' },
],
required: true,
condition: {
field: 'operation',
Expand All @@ -864,9 +877,9 @@ Return ONLY the subject line - no explanations.`,
{
id: 'to_id',
title: 'To ID',
canvasNoun: 'a contact ID',
canvasNoun: 'a recipient ID',
type: 'short-input',
placeholder: 'Contact ID',
placeholder: 'User, lead, or contact ID',
required: true,
condition: {
field: 'operation',
Expand Down Expand Up @@ -1354,6 +1367,7 @@ Return ONLY the numeric timestamp.`,
ticket_open,
ticket_is_shared,
ticket_snoozed_until,
snoozed_until,
ticket_assignee_id,
tag_name,
tag_id_update,
Expand Down Expand Up @@ -1406,6 +1420,10 @@ Return ONLY the numeric timestamp.`,
cleanParams.include_translations = include_translations === 'true'
}

if (operation === 'snooze_conversation' && snoozed_until) {
cleanParams.snoozed_until = toSnoozeTimestamp(snoozed_until)
}

if (operation === 'close_conversation' && close_body) {
cleanParams.body = close_body
}
Expand Down Expand Up @@ -1638,6 +1656,7 @@ export const IntercomV2Block: BlockConfig = {
ticket_open,
ticket_is_shared,
ticket_snoozed_until,
snoozed_until,
ticket_assignee_id,
tag_name,
tag_id_update,
Expand Down Expand Up @@ -1690,6 +1709,10 @@ export const IntercomV2Block: BlockConfig = {
cleanParams.include_translations = include_translations === 'true'
}

if (operation === 'snooze_conversation' && snoozed_until) {
cleanParams.snoozed_until = toSnoozeTimestamp(snoozed_until)
}

if (operation === 'close_conversation' && close_body) {
cleanParams.body = close_body
}
Expand Down
5 changes: 3 additions & 2 deletions apps/sim/blocks/blocks/pipedrive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
placeholder: 'Pagination cursor from previous response',
condition: {
field: 'operation',
value: ['get_all_deals', 'get_projects'],
value: ['get_all_deals', 'get_projects', 'get_pipelines'],
},
},
{
Expand All @@ -415,7 +415,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
'get_files',
'get_pipeline_deals',
'get_mail_messages',
'get_pipelines',
],
},
},
Expand Down Expand Up @@ -448,6 +447,8 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
{ label: 'All', id: '' },
{ label: 'Open', id: 'open' },
{ label: 'Completed', id: 'completed' },
{ label: 'Canceled', id: 'canceled' },
Comment thread
waleedlatif1 marked this conversation as resolved.
Resolved
{ label: 'Deleted', id: 'deleted' },
],
value: () => '',
condition: { field: 'operation', value: ['get_projects'] },
Expand Down
Loading
Loading