Skip to main content

Attach File To Ticket

Add an attachment to a ticket. NOTE: The attachment must be a file previously uploaded to Zendesk. Use the Upload File action to upload a file and retrieve the Upload Token.

External Documentation

To learn more, visit the Zendesk documentation.

Parameters

ParameterDescription
CommentA comment to accompany the attachment.
Ticket IDThe ID of the ticket to attach the file to.
Upload TokenThe token generated by Zendesk on file upload. Can be obtained by using the Upload File action.

Example Output

{
"ticket": {
"url": "https://xxxxxxxxxx.zendesk.com/api/v2/tickets/x.json",
"id": "x",
"external_id": null,
"via": {
"channel": "sample_ticket",
"source": {
"from": {},
"to": {},
"rel": null
}
},
"created_at": "2025-01-12T10:08:40Z",
"updated_at": "2025-01-12T12:04:44Z",
"generated_timestamp": "xxxxxxxxxx",
"type": "incident",
"subject": "SAMPLE TICKET: Meet the ticket",
"raw_subject": "SAMPLE TICKET: Meet the ticket",
"description": "Hi there,\n\nI’m sending an email because I’m having a problem setting up your new product. Can you help me troubleshoot?\n\nThanks,\n The Customer\n\n",
"priority": "normal",
"status": "open",
"recipient": null,
"requester_id": "xxxxxxxxxx",
"submitter_id": "xxxxxxxxxx",
"assignee_id": "xxxxxxxxxx",
"organization_id": null,
"group_id": "xxxxxxxxxx",
"collaborator_ids": [],
"follower_ids": [],
"email_cc_ids": [],
"forum_topic_id": null,
"problem_id": null,
"has_incidents": false,
"is_public": true,
"due_at": null,
"tags": [
"sample",
"support",
"zendesk"
],
"custom_fields": [
{
"id": "xxxxxxxxxx",
"value": null
}
],
"satisfaction_rating": {
"score": "unoffered"
},
"sharing_agreement_ids": [],
"custom_status_id": "xxxxxxxxxx",
"encoded_id": "xxxxxxxxxx",
"fields": [
{
"id": "xxxxxxxxxx",
"value": null
}
],
"followup_ids": [],
"ticket_form_id": "xxxxxxxxxx",
"brand_id": "xxxxxxxxxx",
"allow_channelback": false,
"allow_attachments": true,
"from_messaging_channel": false
},
"audit": {
"id": "xxxxxxxxxx",
"ticket_id": "x",
"created_at": "2025-01-12T12:04:44Z",
"author_id": "xxxxxxxxxx",
"metadata": {
"system": {
"client": "xxxxxxxxxx",
"ip_address": "x.x.x.x",
"location": "xxxxxxxxxx",
"latitude": "xx.xxxx",
"longitude": "-x.xxxx"
},
"custom": {},
"notifications_suppressed_for": [
"xxxxxxxxxx"
]
},
"events": [
{
"id": "xxxxxxxxxx",
"type": "Comment",
"author_id": "xxxxxxxxxx",
"body": "hi",
"html_body": "<div class=\"zd-comment\" dir=\"auto\"><p dir=\"auto\">hi</p></div>",
"plain_body": "hi",
"public": true,
"attachments": [],
"audit_id": "xxxxxxxxxx"
}
],
"via": {
"channel": "api",
"source": {
"from": {},
"to": {},
"rel": null
}
}
}
}

Workflow Library Example

Attach File to Ticket with Zendesk and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop