Skip to content

Commit cbfbd6a

Browse files
committed
[Components] Hep Scout - Added new triggers
1 parent 37e4be7 commit cbfbd6a

File tree

8 files changed

+235
-3
lines changed

8 files changed

+235
-3
lines changed

components/help_scout/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/help_scout",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Pipedream Help Scout Components",
55
"main": "help_scout.app.mjs",
66
"keywords": [
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import common from "../common/base.mjs";
2+
3+
export default {
4+
...common,
5+
key: "help_scout-new-agent-reply-instant",
6+
name: "New Agent Reply (Instant)",
7+
description: "Emit new event when an agent replies to a conversation.",
8+
version: "0.0.1",
9+
type: "source",
10+
dedupe: "unique",
11+
methods: {
12+
...common.methods,
13+
getEventType() {
14+
return [
15+
"convo.agent.reply.created",
16+
];
17+
},
18+
getSummary(body) {
19+
const agentName = body.assignee
20+
? `${body.assignee.firstName} ${body.assignee.lastName}`
21+
: "Agent";
22+
return `New agent reply from ${agentName} in conversation: ${body.subject}`;
23+
},
24+
},
25+
};
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
export default {
2+
"id": 1755285700,
3+
"type": "reply",
4+
"folderId": 98775,
5+
"mailboxId": 76544,
6+
"number": 2571,
7+
"status": "active",
8+
"state": "published",
9+
"subject": "Need help with my account",
10+
"preview": "Hello John, I've reviewed the additional information you sent...",
11+
"createdAt": "2025-04-24T13:45:23Z",
12+
"modifiedAt": "2025-04-24T14:35:45Z",
13+
"closedAt": null,
14+
"closedBy": null,
15+
"threadCount": 5,
16+
"source": {
17+
"type": "email",
18+
"via": "agent"
19+
},
20+
"tags": [
21+
"account",
22+
"customer"
23+
],
24+
"primaryCustomer": {
25+
"id": 298473,
26+
"email": "customer@example.com",
27+
"firstName": "John",
28+
"lastName": "Doe"
29+
},
30+
"assignee": {
31+
"id": 149254,
32+
"email": "agent@company.com",
33+
"firstName": "Support",
34+
"lastName": "Agent"
35+
},
36+
"cc": [],
37+
"bcc": [],
38+
"threads": [
39+
{
40+
"id": 98254745,
41+
"type": "reply",
42+
"status": "active",
43+
"state": "published",
44+
"author": {
45+
"id": 149254,
46+
"email": "agent@company.com",
47+
"type": "user",
48+
"firstName": "Support",
49+
"lastName": "Agent"
50+
},
51+
"text": "Hello John, I've reviewed the additional information you sent and have updated your account accordingly. Your account settings should now be working as expected. Let me know if you have any other questions!",
52+
"createdAt": "2025-04-24T14:35:45Z"
53+
}
54+
]
55+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import common from "../common/base.mjs";
2+
3+
export default {
4+
...common,
5+
key: "help_scout-new-customer-reply-instant",
6+
name: "New Customer Reply (Instant)",
7+
description: "Emit new event when a customer replies to a conversation.",
8+
version: "0.0.1",
9+
type: "source",
10+
dedupe: "unique",
11+
methods: {
12+
...common.methods,
13+
getEventType() {
14+
return [
15+
"convo.customer.reply.created",
16+
];
17+
},
18+
getSummary(body) {
19+
return `New customer reply from ${body.primaryCustomer?.email} in conversation: ${body.subject}`;
20+
},
21+
},
22+
};
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
export default {
2+
"id": 1755285686,
3+
"type": "customer",
4+
"folderId": 98775,
5+
"mailboxId": 76544,
6+
"number": 2571,
7+
"status": "active",
8+
"state": "published",
9+
"subject": "Need help with my account",
10+
"preview": "Hi, I've submitted additional information as requested...",
11+
"createdAt": "2025-04-24T13:45:23Z",
12+
"modifiedAt": "2025-04-24T14:30:12Z",
13+
"closedAt": null,
14+
"closedBy": null,
15+
"threadCount": 4,
16+
"source": {
17+
"type": "email",
18+
"via": "customer"
19+
},
20+
"tags": [
21+
"account",
22+
"customer"
23+
],
24+
"primaryCustomer": {
25+
"id": 298473,
26+
"email": "customer@example.com",
27+
"firstName": "John",
28+
"lastName": "Doe"
29+
},
30+
"assignee": {
31+
"id": 149254,
32+
"email": "agent@company.com",
33+
"firstName": "Support",
34+
"lastName": "Agent"
35+
},
36+
"cc": [],
37+
"bcc": [],
38+
"threads": [
39+
{
40+
"id": 98254732,
41+
"type": "customer",
42+
"status": "active",
43+
"state": "published",
44+
"author": {
45+
"id": 298473,
46+
"email": "customer@example.com",
47+
"type": "customer",
48+
"firstName": "John",
49+
"lastName": "Doe"
50+
},
51+
"text": "Hi, I've submitted additional information as requested. Please let me know if you need anything else.",
52+
"createdAt": "2025-04-24T14:30:12Z"
53+
}
54+
]
55+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import common from "../common/base.mjs";
2+
3+
export default {
4+
...common,
5+
key: "help_scout-new-note-created-instant",
6+
name: "New Note Created (Instant)",
7+
description: "Emit new event when a note is added to a conversation.",
8+
version: "0.0.1",
9+
type: "source",
10+
dedupe: "unique",
11+
methods: {
12+
...common.methods,
13+
getEventType() {
14+
return [
15+
"convo.note.created",
16+
];
17+
},
18+
getSummary(body) {
19+
return `New note created in conversation: ${body.subject}`;
20+
},
21+
},
22+
};
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
export default {
2+
"id": 1755285724,
3+
"type": "note",
4+
"folderId": 98775,
5+
"mailboxId": 76544,
6+
"number": 2571,
7+
"status": "active",
8+
"state": "published",
9+
"subject": "Need help with my account",
10+
"preview": "Internal note: Customer has been having issues since last week...",
11+
"createdAt": "2025-04-24T13:45:23Z",
12+
"modifiedAt": "2025-04-24T14:40:10Z",
13+
"closedAt": null,
14+
"closedBy": null,
15+
"threadCount": 6,
16+
"source": {
17+
"type": "web",
18+
"via": "note"
19+
},
20+
"tags": [
21+
"account",
22+
"customer"
23+
],
24+
"primaryCustomer": {
25+
"id": 298473,
26+
"email": "customer@example.com",
27+
"firstName": "John",
28+
"lastName": "Doe"
29+
},
30+
"assignee": {
31+
"id": 149254,
32+
"email": "agent@company.com",
33+
"firstName": "Support",
34+
"lastName": "Agent"
35+
},
36+
"cc": [],
37+
"bcc": [],
38+
"threads": [
39+
{
40+
"id": 98254760,
41+
"type": "note",
42+
"status": "active",
43+
"state": "published",
44+
"author": {
45+
"id": 149254,
46+
"email": "agent@company.com",
47+
"type": "user",
48+
"firstName": "Support",
49+
"lastName": "Agent"
50+
},
51+
"text": "Internal note: Customer has been having issues since last week. I've checked with the product team and this should be resolved with the next update. Don't mention the upcoming update to the customer yet.",
52+
"createdAt": "2025-04-24T14:40:10Z"
53+
}
54+
]
55+
};

pnpm-lock.yaml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)