Skip to content

Helpscout new components #17637

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 22, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion components/help_scout/actions/add-note/add-note.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "help_scout-add-note",
name: "Add Note to Conversation",
description: "Adds a note to an existing conversation in Help Scout. [See the documentation](https://developer.helpscout.com/mailbox-api/endpoints/conversations/threads/note/)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
helpScout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
key: "help_scout-create-customer",
name: "Create Customer",
description: "Creates a new customer record in Help Scout. [See the documentation](https://developer.helpscout.com/mailbox-api/endpoints/customers/create/)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
helpScout,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import helpScout from "../../help_scout.app.mjs";

export default {
key: "help_scout-get-conversation-details",
name: "Get Conversation Details",
description: "Retrieves the details of a specific conversation. [See the documentation](https://developer.helpscout.com/mailbox-api/endpoints/conversations/get/)",
version: "0.0.1",
type: "action",
props: {
helpScout,
conversationId: {
propDefinition: [
helpScout,
"conversationId",
],
},
embed: {
type: "boolean",
label: "Embed",
description: "If true, the response will include the threads of the conversation.",
optional: true,
},
},
async run({ $ }) {
const response = await this.helpScout.getConversation({
$,
conversationId: this.conversationId,
params: {
embed: this.embed,
},
});

$.export("$summary", `Successfully retrieved conversation details (ID: ${this.conversationId})`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import helpScout from "../../help_scout.app.mjs";

export default {
key: "help_scout-get-conversation-threads",
name: "Get Conversation Threads",
description: "Retrieves the threads of a specific conversation. [See the documentation](https://developer.helpscout.com/mailbox-api/endpoints/conversations/threads/list/)",
version: "0.0.1",
type: "action",
props: {
helpScout,
conversationId: {
propDefinition: [
helpScout,
"conversationId",
],
},
},
async run({ $ }) {
const response = (await this.helpScout.getConversationThreads({
$,
conversationId: this.conversationId,
}))?._embedded?.threads;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks from the docs like maybe this can be paginated? If so, we should offer a maxResults prop and return a paginated list.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call - it seems the Helpscout API only supports passing a 'page' parameter though, and the page size for this endpoint is fixed at 25 entries. I've added a 'page' prop with this information so users can retrieve older entries if needed


$.export("$summary", `Successfully retrieved ${response?.length || 0} threads for conversation ID: ${this.conversationId}`);
return response;
},
};
2 changes: 1 addition & 1 deletion components/help_scout/actions/send-reply/send-reply.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "help_scout-send-reply",
name: "Send Reply",
description: "Sends a reply to a conversation. Be careful as this sends an actual email to the customer. [See the documentation](https://developer.helpscout.com/mailbox-api/endpoints/conversations/threads/reply/)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
helpScout,
Expand Down
16 changes: 16 additions & 0 deletions components/help_scout/help_scout.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,21 @@ export default {
...opts,
});
},
getConversation({
conversationId, ...opts
}) {
return this._makeRequest({
path: `/conversations/${conversationId}`,
...opts,
});
},
getConversationThreads({
conversationId, ...opts
}) {
return this._makeRequest({
path: `/conversations/${conversationId}/threads`,
...opts,
});
},
},
};
5 changes: 2 additions & 3 deletions components/help_scout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/help_scout",
"version": "0.1.1",
"version": "0.2.0",
"description": "Pipedream Help Scout Components",
"main": "help_scout.app.mjs",
"keywords": [
Expand All @@ -13,8 +13,7 @@
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.0.3",
"@pipedream/platform": "^3.1.0",
"crypto": "^1.0.1"
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import common from "../common/base.mjs";
import sampleEmit from "./test-event.mjs";

export default {
...common,
key: "help_scout-conversation-status-updated-instant",
name: "Conversation Status Updated (Instant)",

Check warning on line 7 in components/help_scout/sources/conversation-status-updated-instant/conversation-status-updated-instant.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name
description: "Emit new event when a conversation has its status updated. [See the documentation](https://developer.helpscout.com/webhooks/)",
version: "0.0.1",
type: "source",
dedupe: "unique",
methods: {
...common.methods,
getEventType() {
return [
"convo.status",
];
},
getSummary(body) {
return `Conversation status updated: ${body.subject} (${body.status})`;
},
},
sampleEmit,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
export default {
"id": 291938,
"type": "email",
"folderId": "1234",
"isDraft": "false",
"number": 349,
"owner": {
"id": 1234,
"firstName": "Jack",
"lastName": "Sprout",
"email": "jack.sprout@gmail.com",
"phone": null,
"type": "user"
},
"mailbox": {
"id": 1234,
"name": "My Mailbox"
},
"customer": {
"id": 29418,
"firstName": "Vernon",
"lastName": "Bear",
"email": "vbear@mywork.com",
"phone": "800-555-1212",
"type": "customer"
},
"threadCount": 4,
"status": "closed",
"subject": "I need help!",
"preview": "Hello, I tried to download the file off your site...",
"createdBy": {
"id": 29418,
"firstName": "Vernon",
"lastName": "Bear",
"email": "vbear@mywork.com",
"phone": null,
"type": "customer"
},
"createdAt": "2012-07-23T12:34:12Z",
"modifiedAt": "2012-07-24T20:18:33Z",
"closedAt": "2012-07-24T20:18:33Z",
"closedBy": {
"id": 1234,
"firstName": "Jack",
"lastName": "Sprout",
"email": "jack.sprout@gmail.com",
"phone": null,
"type": "user"
},
"source": {
"type": "email",
"via": "customer"
},
"cc": [
"cc1@somewhere.com",
"cc2@somewhere.com"
],
"bcc": [
"bcc1@somewhere.com",
"bcc2@somewhere.com"
],
"tags": [
"tag1",
"tag2"
],
"customFields": [
{
"fieldId": 1,
"name": "Team",
"value": "Development"
},
{
"fieldId": 2,
"name": "Customer Disposition",
"value": "Happy"
}
],
"threads": [
{
"id": 88171881,
"assignedTo": {
"id": 1234,
"firstName": "Jack",
"lastName": "Sprout",
"email": "jack.sprout@gmail.com",
"phone": null,
"type": "user"
},
"status": "closed",
"createdAt": "2012-07-23T12:34:12Z",
"createdBy": {
"id": 1234,
"firstName": "Jack",
"lastName": "Sprout",
"email": "jack.sprout@gmail.com",
"phone": null,
"type": "user"
},
"source": {
"type": "web",
"via": "user"
},
"type": "message",
"state": "published",
"customer": {
"id": 29418,
"firstName": "Vernon",
"lastName": "Bear",
"email": "vbear@mywork.com",
"phone": "800-555-1212",
"type": "customer"
},
"fromMailbox": null,
"body": "This is what I have to say. Thank you.",
"to": [
"customer@somewhere.com"
],
"cc": [
"cc1@somewhere.com",
"cc2@somewhere.com"
],
"bcc": [
"bcc1@somewhere.com",
"bcc2@somewhere.com"
],
"attachments": [
{
"id": 12391,
"mimeType": "image/jpeg",
"filename": "logo.jpg",
"size": 22,
"width": 160,
"height": 160,
"url": "https://secure.helpscout.net/some-url/logo.jpg"
}
],
"tags": [
"tag1",
"tag2",
"tag3"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "help_scout-new-agent-reply-instant",
name: "New Agent Reply (Instant)",
description: "Emit new event when an agent replies to a conversation.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "help_scout-new-conversation-assigned-instant",
name: "New Conversation Assigned (Instant)",
description: "Emit new event when a conversation is assigned to an agent. [See the documentation](https://developer.helpscout.com/)",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "help_scout-new-conversation-created-instant",
name: "New Conversation Created (Instant)",
description: "Emit new event when a new conversation is created.",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "help_scout-new-customer-instant",
name: "New Customer Added (Instant)",
description: "Emit new event when a new customer is added.",
version: "0.0.2",
version: "0.0.3",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "help_scout-new-customer-reply-instant",
name: "New Customer Reply (Instant)",
description: "Emit new event when a customer replies to a conversation.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "help_scout-new-note-created-instant",
name: "New Note Created (Instant)",
description: "Emit new event when a note is added to a conversation.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading