Setu Recipes: reusable digital workers across every app.Browse templates

Integrations / Freshdesk

Freshdesk

Freshdesk helpdesk: list, search, create and update tickets, reply or add notes, read conversations, manage contacts.

10 actions API key 5 read5 write Calls freshdesk.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "freshdesk" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

This toolkit uses a single credential and requests no scopes.

Actions

Add note to ticketwritefreshdesk.add_noteAdd a note to a ticket. Private notes (the default) are visible to agents only; set private to false for a public note.
InputTypeDescription
ticket_idintegerRequiredTicket ID
bodystringRequiredNote text
privatebooleanOptionalTrue for an agent-only note (default true)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.add_note",
  input: {
    "ticket_id": 1,
    "body": "<body>"
  },
});
Create contactwritefreshdesk.create_contactCreate a contact. A name and at least one of email, phone or mobile is required.
InputTypeDescription
namestringRequiredContact name
emailstringOptionalEmail address
phonestringOptionalPhone number
job_titlestringOptionalJob title
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.create_contact",
  input: {
    "name": "<name>"
  },
});
Create ticketwritefreshdesk.create_ticketCreate a ticket. Needs a requester email and, in practice, a subject and description. Status and priority are numeric codes.
InputTypeDescription
subjectstringRequiredTicket subject
descriptionstringRequiredTicket body (HTML or plain text)
emailstringRequiredRequester email address
priorityintegerOptionalPriority: 1 low, 2 medium, 3 high, 4 urgent
statusintegerOptionalStatus: 2 open, 3 pending, 4 resolved, 5 closed
tagsarray of stringOptionalTags to add
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.create_ticket",
  input: {
    "email": "<email>",
    "subject": "<subject>",
    "description": "<description>"
  },
});
Get ticketreadfreshdesk.get_ticketGet one ticket by ID. Set include to 'requester', 'conversations', 'company' or 'stats' to embed related data (each costs extra API credits).
InputTypeDescription
ticket_idintegerRequiredTicket ID
includestringOptionalRelated data to embed: conversations, requester, company or stats
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.get_ticket",
  input: {
    "ticket_id": 1
  },
});
List contactsreadfreshdesk.list_contactsList contacts (customers), optionally filtered by exact email, phone or company.
InputTypeDescription
emailstringOptionalExact email to match
phonestringOptionalExact phone number to match
company_idintegerOptionalOnly contacts of this company
per_pageintegerOptionalContacts per page (max 100)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.list_contacts",
  input: {},
});
List ticket conversationsreadfreshdesk.list_conversationsList the replies and notes on a ticket, oldest first.
InputTypeDescription
ticket_idintegerRequiredTicket ID
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.list_conversations",
  input: {
    "ticket_id": 1
  },
});
List ticketsreadfreshdesk.list_ticketsList tickets (only the last 30 days unless updated_since is given), with optional filters for requester email and sort order.
InputTypeDescription
per_pageintegerOptionalTickets per page (max 100)
pageintegerOptionalPage number, starting at 1
updated_sincestringOptionalOnly tickets updated after this date, e.g. 2015-08-17
emailstringOptionalOnly tickets from this requester email
order_bystringOptionalSort field
order_typestringOptionalSort direction
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.list_tickets",
  input: {},
});
Reply to ticketwritefreshdesk.reply_to_ticketSend a public reply on a ticket; the requester receives it by email.
InputTypeDescription
ticket_idintegerRequiredTicket ID
bodystringRequiredReply text (HTML or plain text)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.reply_to_ticket",
  input: {
    "ticket_id": 1,
    "body": "<body>"
  },
});
Search ticketsreadfreshdesk.search_ticketsSearch tickets with Freshdesk's query language, e.g. 'status:2 AND priority:3' (without the surrounding quotes). Returns up to 30 results per page.
InputTypeDescription
querystringRequiredFilter expression, e.g. status:2 AND priority:3
pageintegerOptionalPage number, starting at 1
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.search_tickets",
  input: {
    "query": "<query>"
  },
});
Update ticketwritefreshdesk.update_ticketChange a ticket's status, priority, subject or assigned agent. Use reply_to_ticket or add_note to add conversation entries.
InputTypeDescription
ticket_idintegerRequiredTicket ID
statusintegerOptionalStatus: 2 open, 3 pending, 4 resolved, 5 closed
priorityintegerOptionalPriority: 1 low, 2 medium, 3 high, 4 urgent
subjectstringOptionalNew subject
responder_idintegerOptionalAgent ID to assign the ticket to
TypeScript
await setu.execute({
  userId: "user_1",
  action: "freshdesk.update_ticket",
  input: {
    "ticket_id": 1
  },
});