Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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/frontapp/actions/add-comment/add-comment.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "frontapp-add-comment",
name: "Add Comment",
description: "Add a comment to a conversation. [See the documentation](https://dev.frontapp.com/reference/add-comment)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-archive-conversation",
name: "Archive Conversation",
description: "Archives a conversation. [See the documentation](https://dev.frontapp.com/reference/patch_conversations-conversation-id)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-assign-conversation",
name: "Assign Conversation",
description: "Assign or unassign a conversation. [See the documentation](https://dev.frontapp.com/reference/update-conversation-assignee)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "frontapp-create-draft-reply",
name: "Create Draft Reply",
description: "Create a new draft as a reply to the last message in the conversation. [See the documentation](https://dev.frontapp.com/reference/create-draft-reply)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
2 changes: 1 addition & 1 deletion components/frontapp/actions/create-draft/create-draft.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "frontapp-create-draft",
name: "Create Draft",
description: "Create a draft message which is the first message of a new conversation. [See the documentation](https://dev.frontapp.com/reference/create-draft)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
2 changes: 1 addition & 1 deletion components/frontapp/actions/create-inbox/create-inbox.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-create-inbox",
name: "Create Inbox",
description: "Create an inbox in the default team (workspace). [See the documentation](https://dev.frontapp.com/reference/create-inbox).",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "frontapp-create-message-template",
name: "Create Message Template",
description: "Create a new message template. [See the documentation](https://dev.frontapp.com/reference/create-message-template).",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
frontApp,
Expand Down
71 changes: 71 additions & 0 deletions components/frontapp/actions/create-message/create-message.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import frontApp from "../../frontapp.app.mjs";

export default {
key: "frontapp-create-message",
name: "Create Message",
description: "Send a new message from a channel. [See the documentation](https://dev.frontapp.com/reference/create-message).",
version: "0.0.1",
type: "action",
props: {
frontApp,
channelId: {
propDefinition: [
frontApp,
"channelId",
],
},
to: {
propDefinition: [
frontApp,
"to",
],
},
cc: {
propDefinition: [
frontApp,
"cc",
],
},
senderName: {
type: "string",
label: "Sender Name",
description: "Name used for the sender info of the message",
optional: true,
},
subject: {
type: "string",
label: "Subject",
description: "Subject of the message for email message",
optional: true,
},
body: {
type: "string",
label: "Body",
description: "Body of the message",
},
},
async run({ $ }) {
// const {
// frontApp,
// name,
// teammateIds,
// } = this;

Comment on lines +48 to +53
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// const {
// frontApp,
// name,
// teammateIds,
// } = this;

const data = {
to: this.to,
cc: this.cc,
sender_name: this.senderName,
subject: this.subject,
body: this.body,
};

const response = await this.frontApp.createMessage({
channelId: this.channelId,
data,
$,
});

$.export("$summary", `Successfully created message to the recipient: "${this.to}"`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-delete-message-template",
name: "Delete Message Template",
description: "Delete a message template. [See the documentation](https://dev.frontapp.com/reference/delete-message-template).",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
frontApp,
Expand Down
2 changes: 1 addition & 1 deletion components/frontapp/actions/get-comment/get-comment.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-get-comment",
name: "Get Comment",
description: "Retrieve a comment from a conversation. [See the documentation](https://dev.frontapp.com/reference/get-comment)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-get-conversation",
name: "Get Conversation",
description: "Retrieve a conversation by its ID from Front. [See the documentation](https://dev.frontapp.com/reference/get-conversation-by-id)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontapp,
Expand Down
2 changes: 1 addition & 1 deletion components/frontapp/actions/get-message/get-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-get-message",
name: "Get Message",
description: "Retrieve a message by its ID. [See the documentation](https://dev.frontapp.com/reference/get-message)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
frontApp,
Expand Down
2 changes: 1 addition & 1 deletion components/frontapp/actions/get-teammate/get-teammate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-get-teammate",
name: "Get Teammate",
description: "Retrieve a teammate by ID. [See the documentation](https://dev.frontapp.com/reference/get-teammate)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "frontapp-import-message",
name: "Import Message",
description: "Appends a new message into an inbox. [See the documentation](https://dev.frontapp.com/reference/import-inbox-message).",
version: "0.1.8",
version: "0.1.9",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-list-comment-mentions",
name: "List Comment Mentions",
description: "List the teammates mentioned in a comment. [See the documentation](https://dev.frontapp.com/reference/list-comment-mentions)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-list-comments",
name: "List Conversation Comments",
description: "List the comments in a conversation. [See the documentation](https://dev.frontapp.com/reference/list-conversation-comments)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-list-conversations",
name: "List Conversations",
description: "List conversations in the company. [See the documentation](https://dev.frontapp.com/reference/list-conversations)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-list-message-templates",
name: "List Message Templates",
description: "List the message templates. [See the documentation](https://dev.frontapp.com/reference/list-message-templates).",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-list-teammates",
name: "List Teammate",
description: "List teammates in the company. [See the documentation](https://dev.frontapp.com/reference/list-teammates)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "frontapp-receive-custom-messages",
name: "Receive Custom Messages",
description: "Receive a custom message in Front. [See the documentation](https://dev.frontapp.com/reference/post_channels-channel-id-incoming-messages).",
version: "0.0.5",
version: "0.0.6",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "frontapp-reply-to-conversation",
name: "Reply To Conversation",
description: "Reply to a conversation by sending a message and appending it to the conversation. [See the documentation](https://dev.frontapp.com/reference/post_conversations-conversation-id-messages).",
version: "0.0.4",
version: "0.0.5",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "frontapp-send-new-message",
name: "Send New Message",
description: "Sends a new message from a channel. It will create a new conversation. [See the documentation](https://dev.frontapp.com/reference/post_channels-channel-id-messages).",
version: "0.2.7",
version: "0.2.8",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-tag-conversation",
name: "Tag Conversation",
description: "Add tags to a conversation. [See the documentation](https://dev.frontapp.com/reference/patch_conversations-conversation-id)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "frontapp-update-conversation",
name: "Update Conversation",
description: "Updates a conversation. [See the documentation](https://dev.frontapp.com/reference/patch_conversations-conversation-id).",
version: "0.1.7",
version: "0.1.8",
type: "action",
props: {
frontApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "frontapp-update-teammate",
name: "Update Teammate",
description: "Update a teammate. [See the documentation](https://dev.frontapp.com/reference/update-teammate).",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
frontApp,
Expand Down
9 changes: 9 additions & 0 deletions components/frontapp/frontapp.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,15 @@ export default {
...args,
});
},
async createMessage({
channelId, ...args
}) {
return this.makeRequest({
method: "post",
path: `/channels/${channelId}/messages`,
...args,
});
},
async paginateOptions({
prevContext,
listResourcesFn,
Expand Down
2 changes: 1 addition & 1 deletion components/frontapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/frontapp",
"version": "0.7.2",
"version": "0.8.0",
"description": "Pipedream Frontapp Components",
"main": "frontapp.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "frontapp-new-conversation-created",
name: "New Conversation Created",
description: "Emit new event when a conversation is created. [See the documentation](https://dev.frontapp.com/reference/list-conversations)",
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 @@ -7,7 +7,7 @@ export default {
key: "frontapp-new-conversation-state-change",
name: "New Conversation State Change",
description: "Emit new event when a conversation reaches a specific state. [See the documentation](https://dev.frontapp.com/reference/list-conversations)",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "frontapp-new-conversation-tag",
name: "New Conversation Tag",
description: "Emit new event when a conversation is tagged with a specific tag or any tag. [See the documentation](https://dev.frontapp.com/reference/events)",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "frontapp-new-message-template-created",
name: "New Message Template Created",
description: "Emit new event when a message template is created. [See the documentation](https://dev.frontapp.com/reference/list-message-templates)",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Loading