Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- router.post('/SlackAppDemo',function(req,res) {
- try {
- const response = {
- response_type: 'in_channel',
- channel: req.body.channel_id,
- text: 'Hey there...:',
- attachments: [{
- text: 'What would you like to know in this project?',
- fallback: 'What would you like to know in this project?',
- color: '#2c963f',
- attachment_type: 'default',
- callback_id: 'query_selection',
- actions: [{
- name: 'query_select_menu',
- text: 'Choose an option...',
- type: 'select',
- options: queryOptions,
- }],
- }],
- };
- return res.json(response);
- } catch (err) {
- console.log(err);
- return res.status(500).send('Something went wrong :(');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement