admin管理员组文章数量:1026390
The current Slack API for Reminders allows developers to create a reminder for a specific person. This reminder is directly messaged to them via Slackbot; however, I want the reminder to be posted in a public channel. The Reminder API does not specify a channel argument so I'm unsure how to acplish this with their API. I've posted my current code to create a reminder for a specific user below as reference.
Slack Reminder to user
var payload = {
"token": settings.slackToken,
"text": text,
"time": time,
"user": user
};
var options = {
'method': 'post',
'payload': payload
};
var response = UrlFetchApp.fetch(settings.slackRemindersURL, options);
The current Slack API for Reminders allows developers to create a reminder for a specific person. This reminder is directly messaged to them via Slackbot; however, I want the reminder to be posted in a public channel. The Reminder API does not specify a channel argument so I'm unsure how to acplish this with their API. I've posted my current code to create a reminder for a specific user below as reference.
Slack Reminder to user
var payload = {
"token": settings.slackToken,
"text": text,
"time": time,
"user": user
};
var options = {
'method': 'post',
'payload': payload
};
var response = UrlFetchApp.fetch(settings.slackRemindersURL, options);
Share
Improve this question
asked Oct 19, 2017 at 22:13
baskInEminencebaskInEminence
78211 silver badges28 bronze badges
2 Answers
Reset to default 8I had this same question about a month ago. When I asked slack support, this was their answer:
It's not currently possible to use the API to set a channel reminder. However, it's an interesting idea and one we've had from other developers too. I've shared your thoughts with the Platform team for consideration in a future release.
Sorry for being the bearer of bad news. But maybe if you email them as well, they will know it is a needed feature.
There is a new API scheduleMessage, which can schedule message into a channel.
For example:
app.client.chat_scheduleMessage(channel=<channel_id>, text=<content>, post_at=<timestamp>)
However It can not handle recurring message successfully, you can use other tools to trigger the function.
The current Slack API for Reminders allows developers to create a reminder for a specific person. This reminder is directly messaged to them via Slackbot; however, I want the reminder to be posted in a public channel. The Reminder API does not specify a channel argument so I'm unsure how to acplish this with their API. I've posted my current code to create a reminder for a specific user below as reference.
Slack Reminder to user
var payload = {
"token": settings.slackToken,
"text": text,
"time": time,
"user": user
};
var options = {
'method': 'post',
'payload': payload
};
var response = UrlFetchApp.fetch(settings.slackRemindersURL, options);
The current Slack API for Reminders allows developers to create a reminder for a specific person. This reminder is directly messaged to them via Slackbot; however, I want the reminder to be posted in a public channel. The Reminder API does not specify a channel argument so I'm unsure how to acplish this with their API. I've posted my current code to create a reminder for a specific user below as reference.
Slack Reminder to user
var payload = {
"token": settings.slackToken,
"text": text,
"time": time,
"user": user
};
var options = {
'method': 'post',
'payload': payload
};
var response = UrlFetchApp.fetch(settings.slackRemindersURL, options);
Share
Improve this question
asked Oct 19, 2017 at 22:13
baskInEminencebaskInEminence
78211 silver badges28 bronze badges
2 Answers
Reset to default 8I had this same question about a month ago. When I asked slack support, this was their answer:
It's not currently possible to use the API to set a channel reminder. However, it's an interesting idea and one we've had from other developers too. I've shared your thoughts with the Platform team for consideration in a future release.
Sorry for being the bearer of bad news. But maybe if you email them as well, they will know it is a needed feature.
There is a new API scheduleMessage, which can schedule message into a channel.
For example:
app.client.chat_scheduleMessage(channel=<channel_id>, text=<content>, post_at=<timestamp>)
However It can not handle recurring message successfully, you can use other tools to trigger the function.
本文标签: javascriptHow to set a Slack Reminder with Slack Reminder API to a channelStack Overflow
版权声明:本文标题:javascript - How to set a Slack Reminder with Slack Reminder API to a channel? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745643261a2160873.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论