Receive Email Webhook
Add a receiver email address
Follow these steps to add a receiver email address
- Login into the Mailcompose Dashboard
- Click on Receive
- Click on
Add a new Receiver
- Add a new email address and the webhook
- Voila! You are done. Any email now received on that address will be passed to you via the webhook.
JSON Structure
If its a new fresh email, you will get a newly generated thread id
{
type: "NEW_MAIL",
mailcomposeEmailId: "ewic2m12ei0x2n3",
messageId: "sdjnqwfjckow@sub.yourdomain.com",
threadId: "t12ei0x2n32wxmim2",
text: "Hello Mailcompose. I am some text",
subject: "Hello World",
from: "someuser@gmail.com",
to: "support@help.yourcompany.com",
html: "<div>Hello Mailcompose. I am some text</div>",
cc: ["cc@supportlevel2.yourcompany.com"],
bcc: [],
numberOfAttachments: 1,
attachments: [{
type: "attachment",
signedURL: "https://link.to/attachment",
signedURLExpiry: 1722751906395;
contentType: "application/pdf",
contentDisposition: "attachment",
filename: "docs.pdf",
checksum: "028dbfe487494622b77b4cd7b8db793a",
size: 248
}]
}
If its a reply to an existing email, you will get the same thread id that this email is being replied to
{
type: "REPLY",
mailcomposeEmailId: "ewic2m12ei0x2n3",
messageId: "sdjnqwfjckow@sub.yourdomain.com",
threadId: "thwd2wd12212e",
text: "Hello Mailcompose. I am a reply",
subject: "Hello World",
from: "someuser@gmail.com",
to: "support@help.yourcompany.com",
html: "<div>Hello Mailcompose. I am a reply</div>",
cc: ["cc@supportlevel2.yourcompany.com"],
bcc: [],
numberOfAttachments: 0,
attachments: []
}
Last modified: 3 months ago