# Message sequences

**URL:** <https://discourse.nodered.org/t/message-sequences/55301>\
**Category:** General\
**Created:** [16 December 2021 15:28 UTC](https://discourse.nodered.org/t/message-sequences/55301 "2021-12-16T15:28:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![findoctorlin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/findoctorlin/32/51642_2.png) [@findoctorlin](https://discourse.nodered.org/u/findoctorlin)\
**Post date:** [16 December 2021 15:28 UTC](https://discourse.nodered.org/t/message-sequences/55301/1 "2021-12-16T15:28:00Z")

</div>

Hi!

I followed the tutorial here [Message Sequences - Node-RED Essentials - YouTube](https://www.youtube.com/watch?v=c6qXLko0n48&list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6&index=15)

Trying to create this flow and add "price" as a new column, but the new price column did not show up in the debug console:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/1/015abdf138bf3039bb76265e30b6054b64e97917.png)

Can someone tell me where did I done wrong?

JSON below:

```auto
[
    {
        "id": "c1f66fa3e43837d1",
        "type": "inject",
        "z": "349547f842c76b7c",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "date",
        "x": 190,
        "y": 60,
        "wires": [
            [
                "72f8358d0717cfe9"
            ]
        ]
    },
    {
        "id": "5a725a3f065abf17",
        "type": "csv",
        "z": "349547f842c76b7c",
        "name": "",
        "sep": ",",
        "hdrin": true,
        "hdrout": "none",
        "multi": "mult",
        "ret": "\\n",
        "temp": "",
        "skip": "0",
        "strings": true,
        "include_empty_strings": "",
        "include_null_values": "",
        "x": 575,
        "y": 60,
        "wires": [
            [
                "d64d3c8cfeb829ce"
            ]
        ]
    },
    {
        "id": "72f8358d0717cfe9",
        "type": "template",
        "z": "349547f842c76b7c",
        "name": "CSV Data",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "Date,Quantity,Item\n2021-01-01,4,Apple\n2021-01-02,3,Banana\n2021-01-04,5,Peach",
        "output": "str",
        "x": 375,
        "y": 60,
        "wires": [
            [
                "5a725a3f065abf17"
            ]
        ]
    },
    {
        "id": "d64d3c8cfeb829ce",
        "type": "split",
        "z": "349547f842c76b7c",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "x": 740,
        "y": 60,
        "wires": [
            [
                "b8f69dcab2771ca2",
                "687475a9ed71c06d"
            ]
        ]
    },
    {
        "id": "b8f69dcab2771ca2",
        "type": "debug",
        "z": "349547f842c76b7c",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 920,
        "y": 60,
        "wires": []
    },
    {
        "id": "687475a9ed71c06d",
        "type": "function",
        "z": "349547f842c76b7c",
        "name": "Add Cost",
        "func": "var PRICES = {\n \"Apple\":10,\n \"Banana\":8,\n \"Peach\":6\n}\nmsg.payload.Cost = msg.payload.Quantity * PRICES[msg.payload.Item];\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 375,
        "y": 165,
        "wires": [
            [
                "f9def84e5e0b6380"
            ]
        ]
    },
    {
        "id": "f9def84e5e0b6380",
        "type": "join",
        "z": "349547f842c76b7c",
        "name": "",
        "mode": "auto",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": "false",
        "timeout": "",
        "count": "",
        "reduceRight": false,
        "x": 575,
        "y": 165,
        "wires": [
            [
                "8a0ca3ed561c9499"
            ]
        ]
    },
    {
        "id": "8a0ca3ed561c9499",
        "type": "csv",
        "z": "349547f842c76b7c",
        "name": "",
        "sep": ",",
        "hdrin": true,
        "hdrout": "none",
        "multi": "mult",
        "ret": "\\n",
        "temp": "",
        "skip": "0",
        "strings": true,
        "include_empty_strings": "",
        "include_null_values": "",
        "x": 740,
        "y": 165,
        "wires": [
            [
                "dc7be974e1ec0df0"
            ]
        ]
    },
    {
        "id": "dc7be974e1ec0df0",
        "type": "debug",
        "z": "349547f842c76b7c",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 925,
        "y": 165,
        "wires": []
    }
]

```

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [16 December 2021 15:33 UTC](https://discourse.nodered.org/t/message-sequences/55301/2 "2021-12-16T15:33:59Z")

</div>

Hello

Your flow cannot be imported.  
Please re-edit your post and share your flow code using the **Preformatted text icon**

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/6/2689fb7630c04be0c8fd389bb65adcbbb995abca.png)

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [17 December 2021 08:08 UTC](https://discourse.nodered.org/t/message-sequences/55301/3 "2021-12-17T08:08:21Z")

</div>

In the second CSV Node define what **Columns** to use to make it back into a string

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/8/084292e8a7d265deb7d2fe7272031255c2f00197.png)

**Test Flow:**

```auto
[{"id":"c1f66fa3e43837d1","type":"inject","z":"54efb553244c241f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":240,"y":580,"wires":[["72f8358d0717cfe9"]]},{"id":"5a725a3f065abf17","type":"csv","z":"54efb553244c241f","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":625,"y":580,"wires":[["d64d3c8cfeb829ce"]]},{"id":"72f8358d0717cfe9","type":"template","z":"54efb553244c241f","name":"CSV Data","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Date,Quantity,Item\n2021-01-01,4,Apple\n2021-01-02,3,Banana\n2021-01-04,5,Peach","output":"str","x":425,"y":580,"wires":[["5a725a3f065abf17"]]},{"id":"d64d3c8cfeb829ce","type":"split","z":"54efb553244c241f","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":790,"y":580,"wires":[["b8f69dcab2771ca2","687475a9ed71c06d"]]},{"id":"b8f69dcab2771ca2","type":"debug","z":"54efb553244c241f","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":970,"y":580,"wires":[]},{"id":"687475a9ed71c06d","type":"function","z":"54efb553244c241f","name":"Add Cost","func":"var PRICES = {\n \"Apple\":10,\n \"Banana\":8,\n \"Peach\":6\n}\n\nmsg.payload.Cost = msg.payload.Quantity * PRICES[msg.payload.Item];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":425,"y":685,"wires":[["f9def84e5e0b6380"]]},{"id":"f9def84e5e0b6380","type":"join","z":"54efb553244c241f","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":625,"y":685,"wires":[["8a0ca3ed561c9499"]]},{"id":"8a0ca3ed561c9499","type":"csv","z":"54efb553244c241f","name":"","sep":",","hdrin":false,"hdrout":"none","multi":"mult","ret":"\\n","temp":"Date, Quantity, Item, Cost","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":790,"y":685,"wires":[["dc7be974e1ec0df0"]]},{"id":"dc7be974e1ec0df0","type":"debug","z":"54efb553244c241f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":975,"y":685,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [31 December 2021 08:09 UTC](https://discourse.nodered.org/t/message-sequences/55301/4 "2021-12-31T08:09:13Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
