AutomationFlowsGeneral › Mqtt:sendmessage

Mqtt:sendmessage

MQTT:sendMessage. Uses start, mqtt. Manual trigger; 5 nodes.

Manual trigger★★★★☆ complexity5 nodesStartMqtt
General Trigger: Manual Nodes: 5 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "createdAt": "2021-05-06T09:34:45.652Z",
  "updatedAt": "2021-05-06T09:39:48.494Z",
  "id": "197",
  "name": "MQTT:sendMessage",
  "active": false,
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ],
      "id": "850eb506-8c40-4257-92f9-13b39588d01a"
    },
    {
      "parameters": {
        "topic": "TestTopic",
        "sendInputData": false,
        "message": "=MQTT-message{{Date.now()}}",
        "options": {
          "qos": 0
        }
      },
      "name": "MQTT qos:1",
      "type": "n8n-nodes-base.mqtt",
      "typeVersion": 1,
      "position": [
        450,
        160
      ],
      "credentials": {
        "mqtt": {
          "name": "<your credential>"
        }
      },
      "id": "af2b9c5f-2b44-43d6-852f-436ebfc72c3c"
    },
    {
      "parameters": {
        "topic": "TestTopic",
        "sendInputData": false,
        "message": "=MQTT-message{{Date.now()}}",
        "options": {
          "qos": 1
        }
      },
      "name": "MQTT1 qos:0",
      "type": "n8n-nodes-base.mqtt",
      "typeVersion": 1,
      "position": [
        450,
        310
      ],
      "credentials": {
        "mqtt": {
          "name": "<your credential>"
        }
      },
      "id": "37d6e4f3-b06b-4bb3-8f68-ca54de4e41a9"
    },
    {
      "parameters": {
        "topic": "TestTopic",
        "options": {
          "qos": 2
        }
      },
      "name": "MQTT2 qos:2",
      "type": "n8n-nodes-base.mqtt",
      "typeVersion": 1,
      "position": [
        600,
        450
      ],
      "credentials": {
        "mqtt": {
          "name": "<your credential>"
        }
      },
      "id": "6e4693bb-23e5-4622-aa4f-2e93ce916f86"
    },
    {
      "parameters": {
        "functionCode": "items = [\n  {\n    json:{\n      \"message\":`MQTT-item-message${Date.now()}`\n    }\n  }\n]\nreturn items;"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        450,
        450
      ],
      "id": "37ef3107-c80c-4bad-a5d6-3d9a349ca76a"
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "MQTT qos:1",
            "type": "main",
            "index": 0
          },
          {
            "node": "MQTT1 qos:0",
            "type": "main",
            "index": 0
          },
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Function": {
      "main": [
        [
          {
            "node": "MQTT2 qos:2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {},
  "staticData": null,
  "meta": null,
  "versionId": null,
  "triggerCount": 0,
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

MQTT:sendMessage. Uses start, mqtt. Manual trigger; 5 nodes.

Source: https://github.com/n8n-io/test-workflows/blob/c1d376431a818f81f44e9ce645b8fb4878805419/workflows/197.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

TheHive[v4]:Alert:create update get getAll promote merge:Case:create update get getAll:Observable:create update get search getAll:Task:create update get search getAll:Log:create get getAll. Uses start

Start, The Hive
General

uProc:Internet:*;. Uses start, uproc. Manual trigger; 41 nodes.

Start, Uproc
General

uProc:Audio:*:company:*;. Uses start, uproc. Manual trigger; 36 nodes.

Start, Uproc
General

Trello:Board:*List:*Card:*Label:*CardComment:*Attachment:*CheckList:*. Uses start, trello. Manual trigger; 35 nodes.

Start, Trello
General

ClickUp:Task:create update member getAll get delete:List:create update customFields member getAll get delete. Uses start, clickUp. Manual trigger; 30 nodes.

Start, ClickUp