You will need:
Step 1: Setup your Personal Access Token
Since you need to use the Botpress API to send a reminder to all users, you need to set up a Personal Access Token for authentication.Create the token
- In the bottom-left corner of the Dashboard, select your profile picture.
- Select Personal access tokens, then Generate new token.
- Enter a note to remember the token’s purpose—like “Reminders”.
- Select Generate Token.
- Copy the generated token and store it somewhere—once you leave this page, you won’t be able read it again.
Store the token in a variable
Next, create a configuration variable calledPERSONAL_ACCESS_TOKEN
and store your token in it. This will let you access the token in code.
Step 2: Add a Fixed Schedule Trigger
Add a Fixed Schedule Trigger to your bot’s Workflow. This will make sure your reminder sends on a set interval.
Step 3: Add an Execute Code Card
Connect an Execute Code Card to your Trigger:
Step 4: Apply the custom code
Paste the following code into the Card’s configuration:botId
with your actual bot ID. To find your bot ID:
- Open your bot in the Studio.
- Get the bot ID from the URL’s path. For example:
https://studio.botpress.cloud/THIS_IS_YOUR_BOT_ID/
Once you’ve published the latest version of your bot, it will send reminders to all active conversations at the specified interval.