Front ACTION
Import Message
Appends a new message into an inbox. See the documentation.
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Front account once, then configure and run Import Message from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "frontapp-import-message",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
frontapp: { authProvisionId: "apn_xxxxxxx" },
inboxId: "Inbox ID",
handle: "Handle",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "frontapp-import-message",
"configured_props": {
"frontapp": { "authProvisionId": "apn_xxxxxxx" },
"inboxId": "Inbox ID",
"handle": "Handle"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "frontapp",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "frontapp-import-message",
arguments: {
inboxId: "Inbox ID",
handle: "Handle",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
inboxId Inbox ID | string | Id of the inbox into which the message should be append. Required Dynamic |
handle Handle | string | Handle used to reach the contact. Can be an email address, a twitter, handle, a phone number, custom handle ... Required |
name Name | string | Name of the contact. Optional |
authorId Author ID | string | ID of the teammate who is the author of the message. Ignored if the message is inbound. Optional Dynamic |
to To | string[] | List of recipient handles who received the message. Required |
cc CC | string[] | List of recipient handles who received a copy of the message. Optional |
bcc BCC | string[] | List of the recipeient handles who received a blind copy of the message. Optional |
subject Subject | string | Subject of the message. Optional |
body Body | string | Body of the message. Required |
bodyFormat Body Format | string | Format of the message body. Ignored if the message type is not email. Can be one of: 'html', 'markdown'. (Default: 'markdown') Required |
externalId External ID | string | External identifier of the message. Front won't import two messages with the same external ID. Required |
createdAt Created At | integer | Date at which the message has been sent or received. A timestamp is expected as in 1655507769 Required |
type Type | string | Type of the message to import. Can be one of: email, sms, intercom, custom. (Default: email) Optional |
assigneeId Assignee ID | string | ID of the teammate who will be assigned to the conversation. Optional Dynamic |
tags Tag IDs | string[] | List of tag names to add to the conversation (unknown tags will automatically be created) Optional Dynamic |
threadRef Thread Ref | string | Custom reference which will be used to thread messages. If you omit this field, we'll thread by sender instead. Optional Dynamic |
isInbound Is Inbound | boolean | Whether or not the message is received (inbound) or sent (outbound) by you Required |
isArchive Is Archive | boolean | Whether or not the message should be directly archived once imported. (Default: true) Optional |
shouldSkipRules Should Skip Rules | boolean | Whether or not the rules should apply to this message. (Default: true) Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- frontapp-import-message
- Version
- 0.1.13
- App
- Front
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗