Skip to content
Open
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.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
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.4",
version: "0.0.5",
annotations: {
destructiveHint: true,
openWorldHint: true,
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.5",
version: "0.0.6",
annotations: {
destructiveHint: true,
openWorldHint: true,
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.5",
version: "0.0.6",
annotations: {
destructiveHint: true,
openWorldHint: true,
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.5",
version: "0.0.6",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/freshdesk/actions/create-agent/create-agent.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
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.8",
version: "0.0.9",
annotations: {
destructiveHint: false,
openWorldHint: true,
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.8",
version: "0.0.9",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { parseObject } from "../../common/utils.mjs";
import freshdesk from "../../freshdesk.app.mjs";

export default {
key: "freshdesk-create-message-for-thread",
name: "Create Message For Thread",
description: "Create message for a thread. [See the documentation](https://developers.freshdesk.com/api/#create_message_for_thread).",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
freshdesk,
ticketId: {
propDefinition: [
freshdesk,
"ticketId",
],
label: "Ticket ID",
description: "ID of the ticket to create the message for.",
},
threadId: {
propDefinition: [
freshdesk,
"threadId",
({ ticketId }) => ({
ticketId,
}),
],
label: "Thread ID",
description: "ID of the thread to create the message for.",
},
body: {
type: "string",
label: "Body",
description: "Content of the note in HTML format.",
optional: true,
},
participants: {
type: "string[]",
label: "Participants",
description: "List of the participants to be added to the message.",
optional: true,
},
},
async run({ $ }) {
const response = await this.freshdesk.createMessageForThread({
$,
data: {
body: this.body,
participants: {
email: {
to: parseObject(this.participants),
},
},
thread_id: this.threadId,
},
});

$.export("$summary", `Message created successfully with ID: ${response.id}`);
return response;
},
};
111 changes: 111 additions & 0 deletions components/freshdesk/actions/create-reply/create-reply.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import { getFileStreamAndMetadata } from "@pipedream/platform";
import FormData from "form-data";
import { parseObject } from "../../common/utils.mjs";
import freshdesk from "../../freshdesk.app.mjs";

export default {
key: "freshdesk-create-reply",
name: "Create a Reply",
description: "Create a reply to a ticket. [See the documentation](https://developers.freshdesk.com/api/#reply_ticket).",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
freshdesk,
ticketId: {
propDefinition: [
freshdesk,
"ticketId",
],
},
body: {
type: "string",
label: "Body",
description: "Content of the note in HTML format.",
},
attachments: {
type: "string[]",
label: "Attachments",
description: "The total size of all the ticket's attachments (not just this note) cannot exceed 20MB.",
optional: true,
},
fromEmail: {
propDefinition: [
freshdesk,
"fromEmail",
],
optional: true,
},
userId: {
propDefinition: [
freshdesk,
"agentId",
],
label: "User ID",
description: "ID of the agent who is adding the note.",
optional: true,
},
ccEmails: {
type: "string[]",
label: "CC Emails",
description: "Email address added in the 'cc' field of the outgoing ticket email.",
optional: true,
},
bccEmails: {
type: "string[]",
label: "BCC Emails",
description: "Email address added in the 'bcc' field of the outgoing ticket email.",
optional: true,
},
},
async run({ $ }) {
const formData = new FormData();
formData.append("body", this.body);

if (this.fromEmail) {
formData.append("from_email", this.fromEmail.label);
}
if (this.userId) {
formData.append("user_id", this.userId);
}
const parsedCcEmails = parseObject(this.ccEmails);
if (parsedCcEmails) {
parsedCcEmails.forEach((ccEmail) => {
formData.append("cc_emails[]", ccEmail);
});
}
const parsedBccEmails = parseObject(this.bccEmails);
if (parsedBccEmails) {
parsedBccEmails.forEach((bccEmail) => {
formData.append("bcc_emails[]", bccEmail);
});
}

const parsedAttachments = parseObject(this.attachments);
if (parsedAttachments) {
for (const attachment of parsedAttachments) {
const {
stream, metadata,
} = await getFileStreamAndMetadata(attachment);
formData.append("attachments[]", stream, {
contentType: metadata.contentType,
knownLength: metadata.size,
filename: metadata.name,
});
};
}
const response = await this.freshdesk.createReply({
$,
ticketId: this.ticketId,
data: formData,
headers: formData.getHeaders(),
});

$.export("$summary", `Reply created successfully with ID: ${response.id}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
60 changes: 60 additions & 0 deletions components/freshdesk/actions/create-thread/create-thread.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import freshdesk from "../../freshdesk.app.mjs";

export default {
key: "freshdesk-create-thread",
name: "Create a Thread",
description: "Create a thread to a ticket. [See the documentation](https://developers.freshdesk.com/api/#create_a_thread).",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
freshdesk,
type: {
type: "string",
label: "Type",
description: "Type of the thread.",
options: [
"forward",
"discussion",
],
},
ticketId: {
propDefinition: [
freshdesk,
"ticketId",
],
label: "Parent ID",
description: "The ID of the ticket to create the thread for.",
},
emailConfigId: {
propDefinition: [
freshdesk,
"fromEmail",
],
label: "Email Config ID",
description: "The ID of the email config to use for the thread.",
},
},
async run({ $ }) {
const response = await this.freshdesk.createThread({
$,
data: {
type: this.type,
parent: {
id: this.ticketId,
type: "ticket",
},
additional_info: {
email_config_id: this.emailConfigId.value,
},
},
});

$.export("$summary", `Thread created successfully with ID: ${response.id}`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
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.9",
version: "0.0.10",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-delete-solution-article",
name: "Delete Solution Article",
description: "Delete a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "freshdesk-download-attachment",
name: "Download Attachment",
description: "Download an attachment from a ticket. [See the documentation](https://developers.freshdesk.com/api/#view_a_ticket)",
version: "0.0.2",
version: "0.0.3",
type: "action",
annotations: {
destructiveHint: false,
Expand Down
2 changes: 1 addition & 1 deletion components/freshdesk/actions/get-contact/get-contact.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-get-contact",
name: "Get Contact",
description: "Get a contact from Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#view_contact)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-get-solution-article",
name: "Get Solution Article",
description: "Get a solution article in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#solution_article_attributes)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/freshdesk/actions/get-ticket/get-ticket.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-get-ticket",
name: "Get Ticket Details",
description: "Get details of a Ticket. [See the documentation](https://developers.freshdesk.com/api/#view_a_ticket)",
version: "0.1.7",
version: "0.1.8",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/freshdesk/actions/list-agents/list-agents.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "freshdesk-list-agents",
name: "List Agents",
description: "List all agents in Freshdesk. [See the documentation](https://developers.freshdesk.com/api/#list_all_agents)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Loading
Loading