Skip to content

New Components - freshdesk #17764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "freshdesk-add-note-to-ticket",
name: "Add Note to Ticket",
description: "Add a note or conversation to an existing ticket. [See the documentation](https://developers.freshdesk.com/api/#add_note_to_a_ticket).",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
freshdesk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
name: "Add Ticket Tags",
description: "Add tags to a ticket (appends to existing tags). [See the documentation](https://developers.freshdesk.com/api/#update_ticket)",
type: "action",
version: "0.0.2",
version: "0.0.3",
props: {
freshdesk,
ticketId: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-assign-ticket-to-agent",
name: "Assign Ticket to Agent",
description: "Assign a Freshdesk ticket to a specific agent. [See the documentation](https://developers.freshdesk.com/api/#update_ticket).",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
freshdesk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-assign-ticket-to-group",
name: "Assign Ticket to Group",
description: "Assign a Freshdesk ticket to a specific group [See the documentation](https://developers.freshdesk.com/api/#update_ticket).",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
freshdesk,
Expand Down
2 changes: 1 addition & 1 deletion components/freshdesk/actions/close-ticket/close-ticket.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-close-ticket",
name: "Close Ticket",
description: "Set a Freshdesk ticket's status to 'Closed'. [See docs](https://developers.freshdesk.com/api/#update_a_ticket)",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
freshdesk,
Expand Down
103 changes: 103 additions & 0 deletions components/freshdesk/actions/create-agent/create-agent.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import freshdesk from "../../freshdesk.app.mjs";
import constants from "../../common/constants.mjs";

export default {
key: "freshdesk-create-agent",
name: "Create Agent",
description: "Create an agent in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#create_agent)",
version: "0.0.1",
type: "action",
props: {
freshdesk,
email: {
type: "string",
label: "Email",
description: "Email address of the Agent.",
},
ticketScope: {
type: "integer",
label: "Ticket Scope",
description: "Ticket permission of the agent. Current logged in agent can't update his/her ticket_scope",
options: constants.TICKET_SCOPE,
},
occasional: {
type: "boolean",
label: "Occasional",
description: "Set to true if this is an occasional agent (true => occasional, false => full-time)",
optional: true,
},
signature: {
type: "string",
label: "Signature",
description: "Signature of the agent in HTML format",
optional: true,
},
skillIds: {
propDefinition: [
freshdesk,
"skillIds",
],
},
groupIds: {
propDefinition: [
freshdesk,
"groupId",
],
type: "string[]",
label: "Group IDs",
description: "Array of group IDs",
optional: true,
},
roleIds: {
propDefinition: [
freshdesk,
"roleIds",
],
},
agentType: {
type: "integer",
label: "Agent Type",
description: "Type of the agent",
options: constants.AGENT_TYPE,
optional: true,
},
language: {
type: "string",
label: "Language",
description: " Language of the Agent. Default language is `en`",
optional: true,
},
timeZone: {
type: "string",
label: "Time Zone",
description: "Time zone of the agent. Default value is time zone of the domain.",
optional: true,
},
focusMode: {
type: "boolean",
label: "Focus Mode",
description: "Focus mode of the agent. Default value is `true`",
optional: true,
},
},
async run({ $ }) {
const response = await this.freshdesk.createAgent({
$,
data: {
email: this.email,
ticket_scope: this.ticketScope,
occasional: this.occasional,
signature: this.signature,
skill_ids: this.skillIds,
group_ids: this.groupIds,
role_ids: this.roleIds,
agent_type: this.agentType,
language: this.language,
time_zone: this.timeZone,
focus_mode: this.focusMode,
},
});
$.export("$summary", `Agent ${this.email} created successfully`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-create-company",
name: "Create a Company",
description: "Create a company. [See the documentation](https://developers.freshdesk.com/api/#create_company)",
version: "0.0.6",
version: "0.0.7",
type: "action",
props: {
freshdesk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "freshdesk-create-contact",
name: "Create a Contact",
description: "Create a contact. [See the documentation](https://developers.freshdesk.com/api/#create_contact)",
version: "0.0.6",
version: "0.0.7",
type: "action",
props: {
freshdesk,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import freshdesk from "../../freshdesk.app.mjs";
import constants from "../../common/constants.mjs";
import { parseObject } from "../../common/utils.mjs";

export default {
key: "freshdesk-create-solution-article",
name: "Create Solution Article",
description: "Create a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)",
version: "0.0.1",
type: "action",
props: {
freshdesk,
categoryId: {
propDefinition: [
freshdesk,
"categoryId",
],
},
folderId: {
propDefinition: [
freshdesk,
"folderId",
(c) => ({
categoryId: c.categoryId,
}),
],
},
title: {
type: "string",
label: "Title",
description: "Title of the article",
},
description: {
type: "string",
label: "Description",
description: "Description of the article",
},
status: {
type: "integer",
label: "Status",
description: "Status of the article",
options: constants.ARTICLE_STATUS,
},
seoData: {
type: "object",
label: "SEO Data",
description: "Meta data for search engine optimization. Allows meta_title, meta_description and meta_keywords",
optional: true,
},
tags: {
type: "string[]",
label: "Tags",
description: "Tags for the article",
optional: true,
},
},
async run({ $ }) {
const response = await this.freshdesk.createArticle({
$,
folderId: this.folderId,
data: {
title: this.title,
description: this.description,
status: this.status,
seo_data: parseObject(this.seoData),
tags: this.tags,
},
});
$.export("$summary", `Successfully created solution article ${this.title}`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import freshdesk from "../../freshdesk.app.mjs";
import { parseObject } from "../../common/utils.mjs";
import { ConfigurationError } from "@pipedream/platform";

export default {
key: "freshdesk-create-ticket-field",
name: "Create Ticket Field",
description: "Create a ticket field in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#create_ticket_field)",
version: "0.0.1",
type: "action",
props: {
freshdesk,
label: {
type: "string",
label: "Label",
description: "Display the name of the Ticket Field",
},
labelForCustomers: {
type: "string",
label: "Label for Customers",
description: "The label for the field as seen by customers",
},
type: {
type: "string",
label: "Type",
description: "The type of the field. Can be custom_dropdown, custom_checkbox, custom_text, etc...",
default: "custom_text",
},
customersCanEdit: {
type: "boolean",
label: "Customers Can Edit",
description: "Whether customers can edit the field",
optional: true,
},
displayedToCustomers: {
type: "boolean",
label: "Displayed to Customers",
description: "Whether the field is displayed to customers",
optional: true,
},
position: {
type: "integer",
label: "Position",
description: "The position of the fieldPosition in which the ticket field is displayed in the form. If not given, it will be displayed on top",
optional: true,
},
requiredForClosure: {
type: "boolean",
label: "Required for Closure",
description: "Set to `true` if the field is mandatory for closing the ticket",
optional: true,
},
requiredForAgents: {
type: "boolean",
label: "Required for Agents",
description: "Set to `true` if the field is mandatory for agents",
optional: true,
},
requiredForCustomers: {
type: "boolean",
label: "Required for Customers",
description: "Set to `true` if the field is mandatory for customers",
optional: true,
},
choices: {
type: "string[]",
label: "Choices",
description: "Array of key, value pairs containing the value and position of dropdown choices. Example: `[{ \"value\": \"Refund\", \"position\": 1 }, { \"value\": \"FaultyProduct\", \"position\": 2 }]`",
optional: true,
},
dependentFields: {
type: "string[]",
label: "Dependent Fields",
description: "Applicable only for dependent fields, this contains details of nested fields Example: `[{ \"label\": \"District\", \"label_for_customers\": \"District\", \"level\": 2 }, { \"label\": \"Branch\", \"label_for_customers\": \"Branch\", \"level\": 3 }]`",
optional: true,
},
sectionMappings: {
type: "string[]",
label: "Section Mappings",
description: "Applicable only if the field is part of a section. This contains the details of a section (ID, position) for which it is been a part of. Example: `[{ \"position\": 3, \"section_id\": 1 }]`",
optional: true,
},
},
async run({ $ }) {
if (this.type === "custom_dropdown" && !this.choices) {
throw new ConfigurationError("Choices are required for custom_dropdown fields");
}

const response = await this.freshdesk.createTicketField({
$,
data: {
label: this.label,
customers_can_edit: this.customersCanEdit,
label_for_customers: this.labelForCustomers,
displayed_to_customers: this.displayedToCustomers,
position: this.position,
type: this.type,
required_for_closure: this.requiredForClosure,
required_for_agents: this.requiredForAgents,
required_for_customers: this.requiredForCustomers,
choices: parseObject(this.choices),
dependent_fields: parseObject(this.dependentFields),
section_mappings: parseObject(this.sectionMappings),
},
});
$.export("$summary", `Successfully created ticket field: ${response.label}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-create-ticket",
name: "Create a Ticket",
description: "Create a ticket. [See the documentation](https://developers.freshdesk.com/api/#create_ticket)",
version: "0.0.7",
version: "0.0.8",
type: "action",
props: {
freshdesk,
Expand Down
Loading
Loading