Using Leantime
Send project updates to Slack, Discord and other chat tools
- Core feature
- Cloud and self-hosted
At a glance
You need
- The Company Manager role or higher, and access to the project
- Permission to add a bot or webhook in your chat tool (Slack, Discord, Mattermost, Telegram or Zulip)
Where you'll work
- Your chat tool, to create the bot or webhook
- Leantime, in Project Settings → Integrations
At the end
The project's to-dos, milestones, ideas, comments and goals posted to your chat channel as they change.
A project can post its updates, like new to-dos, status changes and comments, to a chat in Slack, Discord, Mattermost, Telegram or Zulip. Each project has its own settings, so each team can use its own channel. Microsoft Teams isn’t one of the options.
Who can set this up?
Section titled “Who can set this up?”You need the Company Manager role or higher, and access to the project. Administrators and Owners can set it up in any project. It’s under Project Settings at the bottom of the project’s left menu. If you don’t see Project Settings, ask an Administrator.
What gets posted?
Section titled “What gets posted?”Once a project is connected, Leantime posts a message when someone:
- adds a to-do or changes one, like its status
- adds or changes a milestone
- writes a comment on a to-do, a milestone or the project, including project updates
- adds or changes an idea
- adds or changes a goal or a Blueprint item, or comments on one
- changes the project’s details
Each message names the project and links to the item in Leantime. In Slack, Discord, Mattermost and Zulip, it says who did what, like “Ada updated the To-Do: ‘Fix the login page’”. Slack, Discord and Mattermost also show a to-do’s status. In Telegram, a message about a to-do shows its title, status, priority, who it’s assigned to and its due date.
Files you upload aren’t posted. There’s no way to pick which kinds of changes get posted: the project posts all of them, including your own changes.
How do I connect a project to a chat tool?
Section titled “How do I connect a project to a chat tool?”- Open the project and click Project Settings at the bottom of the left menu.
- Open the Integrations tab. It has a section for each chat tool.
- Fill in the section for your tool (see the steps for each tool below) and click the Save under it.
Each section has its own Save, and you can connect more than one tool to the same project. There’s no test button. To check that it works, add a to-do or a comment in the project and look in your chat.
How do I connect Slack?
Section titled “How do I connect Slack?”- In Slack, create an incoming webhook. Go to api.slack.com/apps, click Create New App, choose From scratch, and pick your workspace. Open Incoming Webhooks, switch it on, add a new webhook and choose the channel. (Slack’s help: Sending messages using incoming webhooks.)
- Copy the webhook URL. It starts with
https://hooks.slack.com/services/. - In Leantime, paste it into Webhook URL in the Slack section and click Save.
How do I connect Discord?
Section titled “How do I connect Discord?”- In Discord, open the server’s settings, then Integrations → Webhooks, and click New Webhook.
- Choose the channel the messages should go to.
- Click Copy Webhook URL. It starts with
https://discord.com/api/webhooks/. - In Leantime, paste it into the first box under Webhook URL in the Discord section and click Save.
To post to more than one Discord channel, make a webhook in each channel and paste them into the second and third boxes. That’s up to three channels per project.
How do I connect Mattermost?
Section titled “How do I connect Mattermost?”- In Mattermost, open the main menu and click Integrations, then Incoming Webhooks.
- Click Add Incoming Webhook, give it a title, choose the channel and save it.
- Copy the webhook URL Mattermost shows you.
- In Leantime, paste it into Webhook URL in the Mattermost section and click Save.
If your Mattermost server is only reachable on your company’s network, see If you host Leantime yourself.
How do I connect Telegram?
Section titled “How do I connect Telegram?”You need a Telegram bot that posts the messages.
- Create the bot. In Telegram, open a chat with @BotFather, send
/newbotand follow the steps. BotFather gives you a token, like123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ. - Add the bot to the chat where the messages should go:
- A chat with just you: open a chat with your bot and send it a message.
- A group: add the bot to the group, then send a command addressed to it, like
/start@YourBot(with your bot’s username). By default, a bot in a group only sees commands addressed to it, so a plain message or an @mention isn’t enough. If you make the bot an admin of the group, any message works. - A channel: add the bot as an admin that can post messages. For a channel, type the ID yourself (see below).
- A group with Topics: add the bot as an admin, then send a message in the topic you want.
- In Leantime, paste the token into Bot key in the Telegram section. Leave Chat / Group ID and Topic ID empty.
- Click Save. Leantime looks up the chat that last sent your bot a message and fills in Chat / Group ID (and Topic ID for a topic) for you. Do this soon after step 2: Telegram only keeps a bot’s messages for a day.
You can also type the IDs yourself, and for a channel you have to. A group or channel ID starts with a minus sign, and most start with -100, like -1001234567890. If you open the chat in Telegram Web, you see its ID at the end of the address. A Topic ID is only for groups with Topics. Don’t use the number at the start of the bot’s token: that’s the bot itself, and a bot can’t send messages to itself.
How do I connect Zulip?
Section titled “How do I connect Zulip?”- In Zulip, create a bot. Open Personal settings → Bots, click Add a new bot, choose Generic bot and give it a name. (Zulip’s help: Add a bot or integration.)
- Copy the bot’s email address and API key from the bot list.
- In Leantime, fill in all five boxes in the Zulip section:
- Base URL: your Zulip address, like
https://company.zulipchat.com - Bot Email: the bot’s email address
- Bot key: the bot’s API key
- Stream: the name of the Zulip channel (Zulip used to call channels “streams”)
- Topic: the topic the messages go under, like
Project updates
- Base URL: your Zulip address, like
- Click Save. If a box is empty, Leantime doesn’t save and shows “Zulip integration could not be saved. Please fill out all the fields”.
How do I stop a project posting to a chat tool?
Section titled “How do I stop a project posting to a chat tool?”- Slack, Discord and Mattermost: open Project Settings → Integrations, empty the Webhook URL box (for Discord, all the boxes you don’t want) and click Save.
- Telegram and Zulip: Leantime won’t save these sections with empty boxes, so stop it on the chat side. In Telegram, remove the bot from the chat, or send
/revoketo @BotFather to cancel the bot’s token. In Zulip, deactivate the bot.
Does muting a project stop its chat messages?
Section titled “Does muting a project stop its chat messages?”No. Muting is personal. If you set a project to Muted under My Profile → Notifications → Per-Project Notifications, you stop getting your own notifications from it (except @mentions and to-dos you’re a collaborator on): in the bell, by email, on your phone and through your personal webhook. The project still posts everything to its connected chats. To stop those posts, see How do I stop a project posting to a chat tool?
When people on the team have muted the project, the Integrations tab tells you how many, like “2 team member(s) have muted notifications for this project.” See Notifications for how muting works.
Why aren’t messages arriving?
Section titled “Why aren’t messages arriving?”- Nothing arrives at all. Check that the address or token is complete and that you clicked the Save in the right section. Then add a to-do in the project to test it. Messages go out the moment something changes; there’s no delay or daily batch.
- It worked before and stopped. The webhook or bot may have been deleted, or the channel removed or renamed, in the chat tool. Make a new webhook or bot and save it again.
- Discord: only some channels get messages. Leantime posts to the boxes in order and stops at the first one that doesn’t work, so the channels after it get nothing. Remove or replace the broken address.
- Telegram: “Telegram integration could not be saved. Send your bot a message first, or provide a Chat ID directly”. Leantime couldn’t find a chat that messaged your bot. Make sure the bot is in the chat, send a message (in a group, a command addressed to the bot, like
/start@YourBot), and click Save again within a day. Or type the Chat / Group ID yourself, which you always have to do for a channel. - Telegram: messages go to the General topic. Fill in the Topic ID of the topic you want.
- Mattermost or Zulip on your company’s network. See If you host Leantime yourself. On Leantime Cloud, the chat server has to be reachable from the internet.
- Links in the messages open the wrong address, like
localhost. On your own server, set your public address inLEAN_APP_URL(see Configuration).
If you host Leantime yourself
Section titled “If you host Leantime yourself”To protect your network, Leantime doesn’t send messages to private addresses, like localhost, 10.x.x.x, 172.16.x.x to 172.31.x.x or 192.168.x.x. Slack, Discord, Telegram and Zulip Cloud are on the internet, so they work as they are. If your Mattermost or Zulip server is only on your company’s network, allow it with LEAN_OUTBOUND_ALLOWED_HOSTS in config/.env (or your Docker settings: with Docker Compose, run docker compose up -d afterwards; with docker run, start a new container with the setting, as for an update). This needs Leantime 3.17 or later. List hostnames, IP addresses or ranges, separated by commas:
LEAN_OUTBOUND_ALLOWED_HOSTS = 'mattermost.lan,192.168.1.0/24'Public addresses always work. The list only adds the private addresses you name; other private addresses stay blocked. When Leantime blocks an address, its log shows “SSRF guard: blocked private/reserved IP”. When a chat tool refuses a message, the log shows “Messenger notification was not delivered”, with the tool’s name and the error code.
Was this page helpful?
Thanks, glad it helped.
Thanks for telling us. What was missing?
