Send message to an authorized Slack channel.
| Billable Operation | Provider | Billing Mode Docs | Connection Docs | Cost per operation Docs |
|---|---|---|---|---|
| send-message-slack | P Slack | n/a | User | n/a |
const options = {
method: 'POST',
headers: {'content-type': 'application/json', authorization: 'Bearer <TOKEN>'},
body: JSON.stringify({
config: {environment: 'production'},
pipes: [
{
connector: {strategy: 'first', connections: [{connection: 'slack_123', type: 'vault'}]},
pipe_id: 'message:send:slack@1',
config: {channel_id: '<SLACK_CHANNEL_ID>'}
}
],
input: [{id: '1', message: '<MESSAGE_TEXT>'}]
})
};
fetch('https://api.pipe0.com/v1/pipes/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));