Generate Factory Data Stream with n8n and AMQP

This workflow automates the generation and streaming of simulated factory machine data using n8n’s interval trigger and AMQP nodes, helping factories test IoT data pipelines efficiently.
set
interval
amqp
Workflow Identifier: 2402
NODES in Use: set, interval, amqp

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow creates and sends fake factory machine data again and again.

It helps solve the problem of testing data systems without real machines.

It makes random temperature and uptime numbers, adds a time, and sends them to a message queue.

This lets you check if data collection systems work well before using real sensors.


Inputs → Processing → Output

Inputs

  • No external input needed to run.
  • The workflow starts on a regular timer.

Processing Steps

  • Interval node triggers every set time, like every 10 seconds.
  • Set node makes a new data object with:
    • Machine name “n8n_cr8”.
    • Temperature number between 0 and 99.
    • Uptime number between 0 and 99.
    • Current timestamp in milliseconds.
  • AMQP node takes the data and sends it to the message queue “berlin_factory_01”.

Output

  • JSON messages in the AMQP queue with fake telemetry info.
  • Sample output: { “machine_id”: { “name”: “n8n_cr8”, “uptime”: 72 }, “temperature_celsius”: 54, “time_stamp”: 1685203200000 }

Who Should Use This Workflow

Users who need to test or develop machine data systems.

Those who want automatic, ongoing fake data to check processing or monitoring tools.

This helps avoid making data by hand or missing errors before production.


Tools and Services Used

  • n8n Editor: To build and run the workflow.
  • Interval node: To start the workflow often at set times.
  • Set node: To create the telemetry data with random values.
  • AMQP node: To send messages to the RabbitMQ queue.
  • RabbitMQ or AMQP broker: Receives machine data messages.

Step-by-Step to Use This Workflow in n8n Production

Download and Import

  1. Click the Download button on this page to get the workflow file.
  2. Open n8n editor.
  3. Use the “Import from File” option to load the workflow file.

Configure Credentials and IDs

  1. Add your AMQP broker username, password, host, and port in the n8n credentials.
  2. Check the AMQP node has the queue set to “berlin_factory_01” or change it to your queue.
  3. If needed, update the machine name or other IDs in the Set node.

Test and Activate

  1. Run the workflow once manually to see if data is sent to the queue.
  2. Verify your RabbitMQ or AMQP system receives the messages.
  3. Activate the workflow to let it run on schedule automatically.

Optional

  1. If self hosting n8n, make sure network access to AMQP broker is stable. See self-host n8n for help.

Common Mistakes and Troubleshooting

  • Using wrong format in the Set node expressions causes numbers to not change.
  • If AMQP errors, check username, password, host, and port.
  • Wrong queue name stops messages from being received.
  • Make sure AMQP broker is running and accessible from n8n server.

Customization Ideas

  • Change the interval in the Interval node for faster or slower data.
  • Add new fields in Set node like pressure or vibration with random numbers.
  • Use different AMQP queues for other factory lines.
  • Add a Function node between Set and AMQP to change data format.
  • Use a Switch node to send data only at certain times.

Pre-Production Checklist

  • Check broker is running and reachable.
  • Verify credentials in n8n for the AMQP connection.
  • Confirm the trigger interval suits testing needs.
  • Confirm the Set node expressions generate correct random values.
  • Test message arrival on the AMQP queue.
  • Backup your workflow in n8n before going live.

Deployment Guide

Turn on the workflow to run continuously in n8n.

Monitor the queue for steady data flow.

Check execution logs in n8n for errors.

If self hosting n8n, maintain good uptime and network to AMQP broker. See self-host n8n.


Summary

✓ Saves time by automating machine data creation.

✓ Avoid mistakes from manual data entry.

✓ Tests AMQP data ingestion with real-like payloads.

→ Workflow runs repeatedly, making fake temperature and uptime numbers with time.

→ Sends data continuously to AMQP queue for system validation.


Code Expressions to Use in the Set Node

Here are examples of expressions for random values in the Set node fields.

= {{Math.floor(Math.random() * 100)}}

Use this in temperature_celsius and machine_id.uptime.

Use = {{Date.now()}} to set the time_stamp to the current time.


Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free