Automate Azure DevOps Task Creation with n8n Elasticsearch Alert

This n8n workflow automates monitoring Elasticsearch alerts and creates tasks in Azure DevOps automatically. Save hours on manual alert handling and ensure no critical issues are missed by scheduling regular checks and task creation with ease.
cron
elasticsearch
if
+2
Workflow Identifier: 1535
NODES in Use: cron, elasticsearch, if, httpRequest, noOp
Automate task creation with n8n and Elasticsearch

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow checks Elasticsearch for alert counts every day at 12:15 PM and creates task work items in Azure DevOps when alerts exist. It helps stop the user from wasting time checking errors manually and reduces the chance of missing important alerts. The workflow runs on schedule, queries Elasticsearch, decides if alerts need attention, and creates a task only if needed.


Who Should Use This Workflow

This workflow is useful for anyone who monitors Elasticsearch logs and wants to automate creating follow-up tasks in Azure DevOps. It suits IT operations managers, DevOps teams, or anyone needing to reduce manual alert checking. Users who want to save daily time and avoid missing critical server issues will benefit most.


Tools and Services Used

  • n8n: Workflow automation platform to build and run the integration.
  • Elasticsearch: Source for logs and alert data queried daily.
  • Azure DevOps: Task creation platform where alert-related work items are added.

Inputs, Processing Steps, and Output

Inputs

  • Scheduled time trigger (cron) set to 12:15 PM daily.
  • Elasticsearch index with recent alert logs accessible via query.
  • Azure DevOps credentials and project information to create work items.

Processing Steps

  • A Cron Trigger node starts the workflow automatically at set time.
  • An Elasticsearch Query node runs a search to count alerts matching criteria.
  • An If node checks if alert count > 0.
  • If alerts exist, an HTTP Request node creates a task in Azure DevOps with alert details.
  • If no alerts, a No Operation node ends the flow with no further action.

Output

Azure DevOps task is created only on alert detection. If no alerts, no task is created.


Beginner Step-by-Step: How To Use This Workflow in n8n

Importing the Workflow

  1. Download the workflow file using the Download button found on this page.
  2. Inside the n8n editor, click the menu and choose “Import from File”.
  3. Select the downloaded workflow file to import it.

Configuring the Workflow

  1. Set up your Elasticsearch credentials in n8n credentials manager.
  2. Add your Azure DevOps username and personal access token in the HTTP Request node authentication.
  3. Update Azure DevOps URL in the HTTP Request node: replace <organization> and <project> with your actual names.
  4. Adjust the Elasticsearch query if you want to narrow down which alerts to check.

Testing and Activation

  1. Run the workflow manually once to check connections and outputs.
  2. Check if the Azure DevOps task is created when alerts exist.
  3. Activate the workflow toggle to enable automatic daily runs.

If self hosting n8n, consider checking self-host n8n resources for control and privacy.


Customization Options

  • Change Alert Threshold: Edit the If node to create tasks only when alert counts surpass a number bigger than zero.
  • Modify Task Details: Adjust the Azure DevOps API payload in the HTTP Request node to set different titles, descriptions, assignees, or priorities.
  • Schedule Frequency: Change the Cron Trigger time to run more or fewer times per day as needed.
  • Process Alert Data: Add Function or Code nodes to filter or transform alert information before checking counts.

Common Edge Cases and Troubleshooting

  • 401 Unauthorized Error in HTTP Request: Check Azure DevOps username and personal access token for accuracy and permissions.
  • Error in If Node Expression: Ensure expression is exactly = {{$json["hits"]["total"]["value"]}} to evaluate alert count.
  • No Task Created Despite Alerts: Confirm correct If node connections and that Elasticsearch query returns proper alert data.
  • False Cron Trigger Timing: Make sure cron time matches correct timezone and is set to intended hour and minute.

Summary and Final Result

✓ Saves daily time by automating alert checks and task creation.

✓ Reduces missed alerts by running on schedule and creating necessary tasks.

→ Creates Azure DevOps tasks only when alerts exist in Elasticsearch.

→ Ends workflow gracefully when no alerts found, avoiding unnecessary tasks.

→ Easy to customize thresholds, task details, and run frequency inside n8n.


Automate task creation with n8n and Elasticsearch

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The workflow uses an If node to check if the Elasticsearch alert count is greater than zero. If true, it creates a task in Azure DevOps.
The workflow requires Elasticsearch credentials for query access and Azure DevOps username plus a personal access token for API authentication.
Yes, changing the Cron Trigger node schedule can adjust workflow run frequency to multiple times daily or on other intervals.
If no alerts exist, the workflow runs the No Operation node and ends without creating any Azure DevOps task.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.