如何在Slack重复提醒中显示对应日期而非占位符
Hey there, I’ve run into exactly this issue before—Slack’s native /remind command doesn’t natively support replacing placeholders like dd/mm/yyyy with the actual date when the reminder fires. But don’t worry, there are two solid workarounds to get this done:
1. Use Slack Workflow Builder (No Code Needed, Official Solution)
This is the easiest and most reliable method since it’s built right into Slack:
- Open your Slack workspace, click your workspace name in the top-left corner > Tools > Workflow Builder
- Start a new workflow, select Scheduled date and time as the trigger. Set it to run every Tuesday at 07:00 AM.
- Add a Send message action. Choose yourself (or a channel) as the recipient.
- In the message input box, use Slack’s built-in date variable to pull the current date in your desired format:
Slack will automatically replace this variable with the actual date when the workflow runs.Today is {{date.now("DD/MM/YYYY")}} - Save your workflow and toggle it on—you’re all set!
2. Custom Script with Slack API (For Developers)
If you’re comfortable with a bit of coding, you can use a script (like Google Apps Script or a Node.js script) to send dynamic reminders:
- Write a script that triggers on your desired schedule (e.g., weekly Tuesday 7 AM using a cron job or Google Apps Script’s time-driven trigger)
- Use the Slack API’s
chat.postMessagemethod to send a message. In the message text, generate the current date formatted asdd/mm/yyyyusing your script’s date functions (e.g.,new Date().toLocaleDateString('en-GB')in JavaScript for dd/mm/yyyy) - Authenticate the script with your Slack workspace’s API token, and you’ll get dynamic date reminders without relying on Slack’s native tools.
Quick Note on Why the Native /remind Command Fails
Slack’s /remind treats the message content as static text—any placeholders you put in the quoted string won’t be parsed or replaced when the reminder is sent. That’s why dd/mm/yyyy shows up exactly as written instead of the actual date.
内容的提问来源于stack exchange,提问作者Mahmudur Rahman

