Hello.
I take it this is on the PI that Octoprint is running on and I can call it "apikey" ?
This files is required on the system that execudes node-red.
Easy way:
Import this nodes:

[{"id":"42743e77.9ce29","type":"template","z":"16446ae6.4f4515","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"apikey\": \"Octoprint-API Key\",\n \"ip\": \"192.168.1.210\",\n \"port\": \"5000\",\n \"webcam\": \"http://fullurltowebcam\"\n}","output":"str","x":300,"y":740,"wires":[["4584efe6.699b6"]]},{"id":"cb9852f0.48032","type":"inject","z":"16446ae6.4f4515","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":740,"wires":[["42743e77.9ce29"]]},{"id":"4584efe6.699b6","type":"file","z":"16446ae6.4f4515","name":"","filename":"apikey","appendNewline":true,"createDir":false,"overwriteFile":"true","x":470,"y":740,"wires":[[]]}]
Edit the template to your values.

Initiate the inject and change the filepath in the main flow to an relative path.


Greetings,
Christian