Automate Factory Sensor Alerts with n8n and PagerDuty

This n8n workflow automates monitoring of factory sensor data, converting temperatures, logging machine metrics, and triggering PagerDuty alerts when temperatures exceed 50°C. It helps factory managers reduce downtime and quickly respond to critical incidents.
amqpTrigger
crateDb
pagerDuty
+4
Workflow Identifier: 1826
NODES in Use: AMQPTrigger, Function, IF, Set, CrateDB, PagerDuty, NoOp
Automate factory sensor alerts with n8n and PagerDuty

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

Learn how to Build this Workflow with AI:

What This Automation Does

This workflow watches machine sensors in real time for temperature and uptime data.

It checks if the temperature hits 50°C or more, which means a problem might be coming.

If the temperature is high, it creates an instant alert in PagerDuty for the team to act fast.

It then saves all machine data and incident info into CrateDB for records and analysis.

If the temperature is normal, the workflow stops without doing extra work.


Inputs, Processing Steps, and Outputs

Input

  • Sensor data: Real-time messages from factory machines with temperature (°C) and uptime via AMQP.

Processing Steps

  • Convert Celsius temperature to Fahrenheit.
  • Check if temperature is 50°C or above.
  • If hot, create PagerDuty incident.
  • Prepare machine info for storage.
  • Save machine data to CrateDB.
  • Save incident details to CrateDB.
  • If not hot, skip further steps.

Output

  • Machine metrics stored in CrateDB.
  • Incident alerts created in PagerDuty and logged.
  • Workflow stops cleanly on normal temps.

Tools and Services Used


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

Step 1: Import Workflow

  1. Click the Download button on this page to save the workflow file.
  2. Open the n8n editor where workflows are managed.
  3. Use the “Import from File” option to load the downloaded workflow.

Step 2: Add Credentials and Update Settings

  1. Fill in AMQP credentials to connect to the sensor data source named berlin_factory_01.
  2. Insert PagerDuty API Key in the PagerDuty node.
  3. Set CrateDB connection details for data storage nodes.
  4. Check machine IDs, emails, or table names if adjustment is needed for your setup.

Step 3: Test and Activate

  1. Run the workflow once manually with sample data to verify it works properly.
  2. If all looks good, activate the workflow to run automatically on new sensor data.
  3. Monitor workflow executions inside n8n dashboard for any errors.

You can explore self-host n8n options if running workflows on your own server.


Common Errors and Troubleshooting

  • Workflow does not trigger: Ensure AMQPTrigger node has correct sink name and valid credentials.
  • No PagerDuty incidents created: Check IF node’s temperature path matches sensor data and PagerDuty API key is set.
  • Data not saving in CrateDB: Verify column names are correct and credentials have write access.
  • Typo fixes: Correct misspelled fields like “temeprature_fahrenheit” to “temperature_fahrenheit” in Set nodes.

Customization Ideas

  • Change the temperature alert threshold in the IF node to fit risk preferences.
  • Add new sensor data like humidity or pressure in AMQPTrigger and subsequent nodes.
  • Include Slack node after PagerDuty to send team notifications.
  • Add machine location info to Set nodes to track incidents geographically.

Summary

→ Monitors real-time sensor info for high temperature alerts.

→ Creates PagerDuty incident when machines overheating.

→ Logs machine data and incidents reliably in CrateDB.

✓ Saves manual work and quickens incident response.

✓ Keeps factory data organized and ready for review.

Automate factory sensor alerts with n8n and PagerDuty

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

The workflow uses the AMQPTrigger node to get real-time sensor data messages from an AMQP broker.
When temperature reaches or exceeds 50°C, the workflow creates an incident in PagerDuty and logs this event in CrateDB.
Users can add new sensor fields by updating the AMQPTrigger and Set nodes to include additional data like humidity or pressure.
After importing the workflow, users must configure all credentials, update any IDs or table names, test the workflow, then activate it for automatic runs.

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.