slack-commands

How to render tables in Slack

对着背影说爱祢 提交于 2020-04-07 06:46:31
问题 I have a slack application that responds with formatted data in mrkdwn but it would be nice to have the information presented in table form like so Am trying to implement this but cant quite find how to format this message. The only close solution i have is taking a screen grab of the table and sending it instead but that affects the applications response time. Any help would be appreciated thanks 回答1: Slack has no built-in support to render tables in messages. Your workaround options are:

How to fix missing scope error in Slack (rtm.connect) API?

江枫思渺然 提交于 2020-01-13 16:23:50
问题 When I try to use the rtm.connect method with own token, tester returns me a false response. URL : https://slack.com/api/rtm.connect?token=xoxp-532016xxxxx-53xxxxxx-536743xxxxxx-9211bedc4bfe9ddfexxxxxxxxxxxxxx&pretty=1 { "ok": false, "error": "missing_scope", "needed": "rtm:stream", "provided": "identify,incoming-webhook,channels:history,im:history,channels:read,im:read,team:read,users:read,users:read.email,users.profile:read,chat:write:user,files:write:user" } What am I missing in request?

Can a Slack bot get the thread id that a slash command was sent from?

天涯浪子 提交于 2020-01-01 14:12:50
问题 Suppose a user types a slash command inside a thread, as opposed to inside the main channel. Is it possible for to include this information in the request sent to the bot? I want the bot to know where exactly the message came from so that it can reply in the same location (i.e. inside the thread and not in the main channel) Judging by the docs, it seems information about threads is not sent. Here is the POST object that the docs say is sent: token=gIkuvaNzQIHg97ATvDxqgjtO &team_id=T0001 &team

Can a Slack bot get the thread id that a slash command was sent from?

社会主义新天地 提交于 2020-01-01 14:11:44
问题 Suppose a user types a slash command inside a thread, as opposed to inside the main channel. Is it possible for to include this information in the request sent to the bot? I want the bot to know where exactly the message came from so that it can reply in the same location (i.e. inside the thread and not in the main channel) Judging by the docs, it seems information about threads is not sent. Here is the POST object that the docs say is sent: token=gIkuvaNzQIHg97ATvDxqgjtO &team_id=T0001 &team

can't open Slack dialog through google apps scripts

好久不见. 提交于 2019-12-12 08:57:26
问题 I'm trying to use google apps scripts and slack to automate my work. And I wish to enter some text with the Slack dialog to modify my google spreadsheet with google apps scripts. However, with the below code, I can't open a Dialog via Slack-API's Slash command . Is my code have some problems? function doPost(e){ var params = e.parameter; var token = params.token; var text = params.text; var trigger_id = params.trigger_id; var slackUrl = ["https://slack.com/api/dialog.open"]; if (token == "