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
Automate factory data with n8n and AMQP

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

Learn how to Build this Workflow with AI:

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.


Automate factory data with n8n and AMQP

Visit through Desktop to Interact with the Workflow.

Promoted by BULDRR AI

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.