StyloDocs
Workflow blocks

Zendesk

Work with Zendesk tickets, users, organizations, macros, custom objects, and conversations

View as Markdown

zendesk — Work with Zendesk tickets, users, organizations, macros, custom objects, and conversations.

Where it appears

The Zendesk block lives in the Integrations group of the Workflow Builder. Connect the Zendesk integration before adding it.

Fields

FieldTypeRequiredDefaultDescription
resourceselectYesticketWhich Zendesk resource to work with. Options: ticket, comment, user, organization, group, agent, tag, macro, custom-object, custom-object-record, conversation.
operationselectYesWhich action to perform on the selected resource.
ticketIdtext (supports references)YesNumeric Zendesk ticket ID. Use a literal number or <StepName.field> to reference an ID from a previous step.
limitnumberNo50Maximum number of comments to return, most recent first. Defaults to 50.
subjecttext (supports references)YesSubject line for the new Zendesk ticket. Use literal text or <StepName.field> to reference a value from a previous step.
descriptiontext (multi-line, supports references)YesBody of the new ticket, used as the first comment. Use literal text or <StepName.field> to reference a value from a previous step.
actionsactionsNoOptional ticket fields to set when creating the ticket. Each action sets one property; requester, priority, type, and tags can each be added once.
addCommenttext (multi-line, supports references)NoMarkdown is rendered to Zendesk HTML: bold, lists (- ), blockquotes (&gt; ), links ([label](url)). Single newlines preserved.
isPublicselectNotrueWhether the closing message is posted as a public reply visible to the customer or as an internal note visible to agents only. Options: true, false.
priorityselectYesPriority level to apply. Urgent triggers SLA breach notifications; use it for customer-impacting issues requiring immediate attention. Options: low, normal, high, urgent.
ticketTypeselectYesZendesk ticket type to apply. Incidents can be linked to a Problem; question and task are standalone classifications. Options: problem, incident, question, task.
querytext (supports references)YesZendesk search query using the Search API syntax (e.g. status:open assignee:me). Use literal text or <StepName.field> to inject a value from a previous step.
sortByselectNoField used to sort the matching tickets. Options: created_at, updated_at, priority, status.
sortOrderselectNoDirection to sort results: ascending or descending by the selected sort field. Options: asc, desc.
assigneeIdtext (supports references)NoNumeric Zendesk user ID of the agent to assign the ticket to. Use a literal ID or <StepName.field> from a previous step.
groupIdtext (supports references)NoNumeric Zendesk group ID to route the ticket to. Use a literal ID or <StepName.field> from a previous step.
commenttext (multi-line, supports references)YesMarkdown is rendered to Zendesk HTML: bold, lists (- ), blockquotes (&gt; ), links ([label](url)). Single newlines preserved as line breaks. Avoid # headers — use bold instead.
publicselectNotrueWhether the comment is sent as a public reply visible to the customer or as an internal note visible to agents only. Options: true, false.
authorIdselectNoPick a Zendesk agent/admin, choose Current User (assist workflows only), or reference an upstream variable. Leave blank to inherit the brand or organization default.
userIdtext (supports references)YesNumeric Zendesk user ID to fetch. Use a literal number or <StepName.field> to reference an ID from a previous step (e.g. a ticket's requester_id).
nametext (supports references)YesDisplay name for the new Zendesk user. Use literal text or <StepName.field> to reference a value from a previous step.
emailtext (supports references)YesPrimary email address for the new user; used as the identity for matching. Accepts literal text or <StepName.field>.
phonetext (supports references)NoOptional phone number to attach to the user. Accepts literal text or <StepName.field>.
roleselectNoZendesk role for the new user. End users are customers; agents and admins are staff with access to the agent interface. Options: end-user, agent, admin.
tagstext (supports references)NoOptional comma-separated tags to apply to the new user. Accepts literal text or <StepName.field>.
organizationIdtext (supports references)YesNumeric Zendesk organization ID to fetch. Use a literal number or <StepName.field> to reference an ID from a previous step (e.g. a user's organization_id).
macroIdtext (supports references)YesNumeric Zendesk macro ID whose actions should be applied to the ticket. Use a literal ID or <StepName.field>.
customObjectKeytext (supports references)YesThe key of the Zendesk custom object type to read from (e.g. home_delivery_order). Accepts literal text or <StepName.field>.
recordIdtext (supports references)YesID of the custom object record to fetch. Use a literal ID or <StepName.field> to reference an ID from a previous step.
sorttext (supports references)NoOptional sort field; prefix with - for descending order (e.g. -updated_at). Accepts literal text or <StepName.field>.
pageSizetext (supports references)NoOptional number of records to return per page. Accepts a literal number or <StepName.field>.
externalIdtext (supports references)NoOptional external identifier to associate with the record for cross-system matching. Accepts literal text or <StepName.field>.
customFieldscodeNoJSON object of custom object field keys to values for the new record (e.g. &#123; "field_key": "value" &#125;).
fieldIdtext (supports references)YesNumeric ID of the lookup-relationship ticket field to set. Use a literal ID or <StepName.field>.
lookupValuetext (supports references)YesIdentifies the custom object record to link: a record ID, or name:VALUE / external_id:VALUE to match by name or external ID. Accepts literal text or <StepName.field>.
conversationIdtext (supports references)YesSunshine Conversations conversation ID to post the message to. Use a literal ID or <StepName.field> from a previous step.
texttext (multi-line, supports references)YesBusiness-authored message text delivered to the customer on the messaging channel. Use literal text or <StepName.field> to reference upstream content.
metadatacodeNoOptional metadata to attach to the passControl event.

Inputs and outputs

Inputs are the configurable fields above. The block produces these outputs:

Outputs

Reference an output downstream with <Zendesk.field>.

NameTypeDescription
successbooleanSuccess status
ticketjsonZendesk ticket object (object — fields: id, subject, description, status, priority, type, tags, requester_id, assignee_id, group_id, custom_fields, created_at, updated_at)
errorstringError message if failed
contextjsonComplete ticket context (object — fields: ticket, conversation, customer, assignee, organization)
commentsarrayComments array
countnumberNumber of comments
ticketsarrayArray of matching tickets
userjsonUser object
organizationjsonOrganization object
groupsarrayArray of groups
agentsarrayArray of agents
macrosarrayArray of macros
customObjectsarrayList of custom object definitions
recordjsonCustom object record (object — fields: id, name, external_id, custom_object_key, custom_object_fields, created_at, updated_at)
recordsarrayMatching custom object records
messagejsonPosted message object returned by the API
conversationjsonConversation object (object — fields: id, type, activeSwitchboardIntegration)

Example

A minimal configuration for this block:

{
  "type": "zendesk",
  "config": {
    "resource": "ticket",
    "operation": "...",
    "ticketId": "<PreviousStep.field>",
    "limit": 50,
    "subject": "<PreviousStep.field>",
    "description": "<PreviousStep.field>",
    "isPublic": "true",
    "priority": "low",
    "ticketType": "problem",
    "query": "<PreviousStep.field>",
    "comment": "<PreviousStep.field>",
    "public": "true",
    "userId": "<PreviousStep.field>",
    "name": "<PreviousStep.field>",
    "email": "<PreviousStep.field>",
    "organizationId": "<PreviousStep.field>",
    "macroId": "<PreviousStep.field>",
    "customObjectKey": "<PreviousStep.field>",
    "recordId": "<PreviousStep.field>",
    "fieldId": "<PreviousStep.field>",
    "lookupValue": "<PreviousStep.field>",
    "conversationId": "<PreviousStep.field>",
    "text": "<PreviousStep.field>"
  }
}

Limits and failure modes

  • Requires a connected Zendesk integration. Calls fail if that integration is disconnected or its authorization has expired.
  • Required fields (resource, operation, ticketId, subject, description, priority, ticketType, query, comment, userId, name, email, organizationId, macroId, customObjectKey, recordId, fieldId, lookupValue, conversationId, text) must be set, or the block fails validation before it runs.
  • On failure the error output is populated; downstream blocks that reference other outputs may not receive values.

On this page