Search code examples
slackslack-api

Send Slack Modal Data to Third Party


Is it possible to send data gathered from a Slack modal to an external site?

I’m using Slack Bolt for JavaScript

I’ve tried receiver.router.post('siteToSendData', (req, res) => { // You're working with an express req and res now. console.log('post to slack') res.send(dataToSend); });


Solution

  • You cannot send the captured data directly to a third party site.
    What you can do instead, is process the submission event.
    https://api.slack.com/surfaces/modals/using#handling_submissions
    Slack Bolt Reference : https://slack.dev/bolt-js/concepts#view_submissions

    The captured data will be sent to your application first. You can then re-route it to the desired external website.

    Here is example of payload that you can expect:
    https://api.slack.com/reference/interaction-payloads/views