Opening Problem Statement
Imagine Michael, a project manager at a fast-paced software development company. Every day, he juggles multiple Jira issues created, updated, or assigned to different team members. Michael used to rely on manually checking Jira for updates or waiting for email notifications, which often led to delays in critical issue responses and miscommunication across teams. Hours lost each week due to missed updates and unclear task assignments meant slower project progress and mounting frustration.
This is a very specific pain point many teams face: how to get real-time, personalized notifications from Jira directly to the tool where team members actually communicate—Telegram, without having to constantly switch platforms or miss crucial updates.
What This Automation Does
With this n8n workflow, when a Jira webhook event occurs (issue created, updated, or assignee changed), the following automation unfolds seamlessly:
- Identifies the Jira issue event type: creation, update, or assignment change.
- Checks if the Jira user has a corresponding Telegram account linked in a code node.
- Automatically sends a formatted notification message to the linked Telegram chat ID.
- Delivers tailored messages for new issues, updates, or assignment alerts, including issue details like project name, key, title, description, and creation time.
- Prevents notifications from sending if the Jira assignee does not have a Telegram account mapping.
- Enables real-time, clear, and direct communication to the right Telegram user, improving response times and collaboration efficiency.
Overall, this workflow saves project managers and developers at least several hours a week that they would otherwise spend manually tracking Jira status or sorting through emails.
Prerequisites ⚙️
- Jira account with webhook setup to send issue events.
- n8n account with access to configure workflows.
- Telegram bot account with API credentials to send messages.
- Header Authentication credentials configured in n8n for secure Jira webhook ingestion.
- Basic knowledge of Jira issue fields, Telegram chat IDs, and n8n node configuration.
Step-by-Step Guide
Step 1: Configure Jira Webhook in n8n
Go to your n8n dashboard and create a new workflow. Add a Webhook node named jira-webhook. Set the HTTP Method to POST and choose Header Authentication with your Jira webhook credentials.
Set the webhook path to a unique ID (e.g., 1e4989bf-6a23-4415-bd17-72d08130c5c4). Save and activate the webhook URL in your Jira settings under System > Webhooks.
Test by triggering a Jira event and observing a successful POST request in n8n webhook execution.
Common mistake: Not matching the webhook path or authentication headers exactly will cause failure.
Step 2: Validate Incoming Issue Body and Assignee
Add an If node named check issue body, assignee and hook type. Set the condition to ensure the webhook request body is not empty, the “type” header exists, and the issues’ assignee field is present and not empty.
This filters out webhooks without actionable data to avoid processing errors.
You should see workflow execution only continue when all conditions are met.
Step 3: Map Jira Assignee to Telegram Account
Insert a Code node named telegram account. This node runs JavaScript to extract the Jira assignee’s accountId from the webhook JSON and looks it up in a mapping object linking Jira account IDs to Telegram chat IDs:
const accountId = $('jira-webhook').first().json.body.fields.assignee?.accountId;
const telegramAccounts = {
"[jira account id]": 00000000, // telegram chat id
};
const telegramChatId = telegramAccounts[accountId];
return [{telegramChatId}];
> Replace [jira account id] with actual Jira user account IDs and 00000000 with corresponding Telegram chat IDs.
Successful execution outputs the Telegram chat ID for downstream use.
Step 4: Check if Telegram Account Exists
Add an If node named check tg account exists. Set the condition to check if the Telegram chat ID obtained earlier exists (is not empty).
If not found, the workflow stops from sending irrelevant notifications.
Expected outcome: Only processes notifications for assignees with Telegram enabled.
Step 5: Branch Based on Jira Event Type
Use a Switch node named check type to route workflow based on the webhook “type” header. Configure three cases: created, updated, and change-assignee.
Each case connects to different Telegram notification nodes to tailor messages accordingly.
Expected result: Correct notification sent automatically matching event context.
Step 6: Send Telegram Notification for New Jira Issues
For the created event, connect to a Telegram node named Send Create. Configure message text using n8n expression syntax to include:
- Issue type, project name, issue key, title, description, and creation date/time formatted.
- Use template literals and
DateTime.fromMillis().format()from luxon library in n8n for date formatting.
This node sends a clearly formatted alert to the assigned user’s Telegram chat.
Step 7: Send Telegram Notification for Issue Updates
For the updated event, connect to the Telegram node named Send Update. This sends similar detailed update notifications with a warning icon prefix.
Ensure the message content dynamically reflects the issue updated details.
Step 8: Send Telegram Notification on Assignment Changes
For the change-assignee event, connect to a Telegram node named Send Assign Alert. This message alerts the newly assigned user specifically with a “Assigned to you” label.
Shows project, issue key, title, description, and creation time to provide full context.
Customizations ✏️
- Expand Telegram Account Mapping: Add more Jira
accountIdand Telegram chat ID pairs in the telegram account code node. This allows notifications to reach all team members. - Customize Notification Text: Modify the Send Create, Send Update, and Send Assign Alert nodes’ message templates to include more issue fields, change emojis, or format differently.
- Add More Event Types: In the check type switch node, add more webhook event cases like “comment_added” or “issue_closed” and create corresponding Telegram notification nodes.
- Integrate Additional Channels: Extend the workflow by duplicating notification nodes for Slack or Email if desired, using similar webhook triggers.
Troubleshooting 🔧
Problem: “Telegram chat ID is undefined”
Cause: Jira assignee accountId missing from the telegramAccounts mapping in the code node.
Solution: Update the telegram account code node with accurate Jira user IDs and Telegram chat IDs, then test again.
Problem: “Webhook 401 Unauthorized”
Cause: Incorrect or missing header authentication credentials for Jira webhook.
Solution: Double-check the HTTP Header Auth credentials node and ensure Jira webhook includes matching headers.
Problem: “No notification received on Telegram”
Cause: Telegram chat ID check failed, or Telegram node credentials invalid.
Solution: Confirm Telegram bot token is correct and authorized to message the chat ID. Verify chat ID exists and is reachable.
Pre-Production Checklist ✅
- Verify Jira webhook URL and Header Authentication credentials match in both Jira and n8n.
- Test webhook triggers in Jira by creating, updating, and re-assigning issues.
- Confirm Telegram bot credentials in n8n Telegram nodes are valid and active.
- Ensure the telegram account code node mapping includes all active Jira assignees who need notifications.
- Run workflow in test mode, check logs for proper flow through all nodes.
Deployment Guide
Activate your workflow in n8n by setting it to “Active” and saving. From this point, the webhook listens for Jira issue events continuously.
Monitor workflow executions in n8n’s workflow run history to catch any errors or missed events.
You can also set alerting in n8n if a node fails to ensure smooth operation.
To scale, ensure your Telegram bot and Jira webhook are not rate-limited and adjust team mappings periodically.
FAQs
Can I use Slack instead of Telegram for notifications?
Yes, you can replace or duplicate the Telegram nodes with Slack nodes, adjusting the messages accordingly.
Does this consume Telegram bot API credits?
Telegram bot API usage is free but subject to rate limits. High volumes may require bot scaling.
Is my data safe through this workflow?
Yes, data is exchanged via secure webhooks and encrypted Telegram API calls. Ensure your credentials remain private.
Conclusion
By following this detailed n8n workflow, you have automated the tedious task of monitoring Jira issue events and informing team members via Telegram instantly. Michael, our project manager, now saves hours weekly, with fewer missed updates and clearer assignments.
You’ve crafted a reliable, real-time alert system tailored to Jira and Telegram, improving communication and responsiveness dramatically.
Next steps could include adding more event notifications, integrating other communication channels, or enriching messages with attachments or links.
Keep experimenting and automating to continuously enhance your team’s productivity!