Support for attachments/rich text in response to custom slash-command

609 views
Skip to first unread message

Scott Bonneau

unread,
Apr 14, 2014, 11:35:43 PM4/14/14
to slac...@googlegroups.com
Hi guys,

I'm putting together a custom slash-command, and I'd like to return a structured result (in my case, an attachment with a set of fields describing a Jira issue).  It looks like the returned text supports some formatting, including links, bolding, italics, etc, but not structured data (i.e. attachments).  Is there any way to do this, or any workaround besides posting back using an Incoming Webhook?  

Alternatively, is there any way to suppress the response from Slackbot to a custom slash command?  I'd be fine with no response from Slackbot after my custom slash-command if the slash-command is going to post using an Incoming Webhook.

Thanks,
Scott

Paul Hammond

unread,
Apr 27, 2014, 1:12:14 AM4/27/14
to slac...@googlegroups.com
Hi Scott,

I don't think there's any way to respond with an attachment to a slash command right now. Outgoing webhooks are slightly easier: you can respond with an empty body to suppress the normal response then send an attachment via an incoming webhook. Unfortunately the code for slash commands is slightly different and doesn't support that. Yet.

There's no reason for this inconsistency, other than that we've had too many other things to do and not got round to cleaning it up. I'm going to take a look at this soon and see what I can to do make it better.

Sorry to take so long to get back to you,

Paul




--
You received this message because you are subscribed to the Google Groups "Slack API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slack-api+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages