Create files TXT with multiline

Hello

I want to inject several lines into a text file with the following formatting.

# USER
user_name=1000
user_domain=10.65.101.48
user_display=Name site
user_organization=
auth_realm=
auth_name=1000
auth_pass=link2178
auth_aka_op=00000000000000000000000000000000
auth_aka_amf=0000

# SIP SERVER
outbound_proxy=
all_requests_to_proxy=no
registrar=
register_at_startup=yes
registration_time=3600
reg_add_qvalue=no
reg_qvalue=1

I would like to know if I should take a node change or function and how to program it.
For the part created the file and write in it via msg.payload no problem!

Your question is vague, but you would probably use a template node, there is instruction in the nodes info help text, Have a go. If you run into issues post what you have tried and then we can offer advise on where you may have gone wrong.

Hello, I don't have the stream.

my question is simple. I want to create a TXT file with a body containing this :

# USER
user_name=1000
user_domain=10.65.101.48
user_display=Name site
user_organization=
auth_realm=
auth_name=1000
auth_pass=link2178
auth_aka_op=00000000000000000000000000000000
auth_aka_amf=0000

# SIP SERVER
outbound_proxy=
all_requests_to_proxy=no
registrar=
register_at_startup=yes
registration_time=3600
reg_add_qvalue=no
reg_qvalue=1

I don't know what this means.

Your Question is vague, you say you want to inject several lines, but fail to identify lines, or info you wish to inject. You fail to show incoming data that you wish to inject.
Or do you mean you wish to create a text file in that format.

Anyway with info you supplied all I could do is point you to a node I believe will do what you want. Again have a go and post back it you have issues.

A simple example to get you on your way.

[{"id":"4f75b206.fcb2fc","type":"inject","z":"30af2d3e.d94ea2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"one\": 1234, \"two\":\"some text\"}","payloadType":"json","x":220,"y":2240,"wires":[["753b44ea.15d59c"]]},{"id":"753b44ea.15d59c","type":"template","z":"30af2d3e.d94ea2","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"here is a text file over several lines\nvalue one = {{payload.one}}\nYou can add text values to\nvalue two = {{payload.two}}","output":"str","x":420,"y":2240,"wires":[["27e88faa.4cbfb8"]]},{"id":"27e88faa.4cbfb8","type":"debug","z":"30af2d3e.d94ea2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":640,"y":2240,"wires":[]}]

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