Develop your own
For your convenience, we’re hosting and maintaining webhook integrations with several popular services. Submit your own on GitHub
Minimal requirement
const Integration = require('../integration')
class MyService extends Integration {
// This is the entry point of every integration instance
//
// Receives
// payload: parsed req.body
// req: the request itself (if you need to read headers, etc.)
//
// Returns
// An object with at least `references` and either
// `text`, `markdown`, `attachment` or `attachments` (see Posts documentation)
process(payload, req) {
return {
references: ['some-ref'],
text: 'My text',
}
}
}
Configuration
By default, Missive will use the class name as the Post username and the image in /assets/integrations/PROVIDER.png
for the icon and avatar. These can however be configured:
class MyService extends Integration {
get name() { return 'My Service' }
get avatar() { return `https://cageme.herokuapp.com/200/200` }
get icon() { return `https://cageme.herokuapp.com/32/32` }
}
subject
Sets the subject for new conversations.
process(payload, req) {
return {
subject: 'New subscriber!'
}
}
update_existing_conversation_subject
By default, integrations will only set the subject on new conversations (or conversations without subject). An integration could however update the subject on every event if need be.
process(payload, req) {
let { subscriber } = payload
return {
subject: `New subscriber: ${subscriber}`,
update_existing_conversation_subject: true,
}
}
color
When a conversation is shared with an organization, Missive displays the organization color in the conversation list. While this cannot be customized on a per-conversation basis from the interface, we allow developers to do it via the API.
process(payload, req) {
return {
color: '#f00',
}
}