Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. router.post('/SlackAppDemo',function(req,res) {
  2. try {
  3. const response = {
  4. response_type: 'in_channel',
  5. channel: req.body.channel_id,
  6. text: 'Hey there...:',
  7. attachments: [{
  8. text: 'What would you like to know in this project?',
  9. fallback: 'What would you like to know in this project?',
  10. color: '#2c963f',
  11. attachment_type: 'default',
  12. callback_id: 'query_selection',
  13. actions: [{
  14. name: 'query_select_menu',
  15. text: 'Choose an option...',
  16. type: 'select',
  17. options: queryOptions,
  18. }],
  19. }],
  20. };
  21. return res.json(response);
  22. } catch (err) {
  23. console.log(err);
  24. return res.status(500).send('Something went wrong :(');
  25. }
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement