FYI Although the node is 4 years old - it seems to work fine
Is there some context to this Si?
If you don't know why I've posted this then..........
Some basic info on using it to post from a bot.
Set up a bot account (botsin.space seems a popular instance choice)
Get your keys via settiings-> development

add new application - submit and then click on it to see keys - its the access token that's needed

edit a send message node

feed the node with something in msg.payload.text
Should get tooted out ![]()

Awesome, thanks!
Is there an example of how to send media, for instance?
Haven't got to doing that yet
GOT IT.
If you include a filename in msg.payload.image, it will include the image in the toot.
Excellent find and easy to use ![]()
I have a function node which sets msg.payload.text to a String and then returns msg:
msg.payload.text = "Hello world";
return msg;
The output of the function node is connected to the input of the sendMessage node, but the value which is tooted is "undefined". What am I doing wrong?
I don't use JavaScript in functions very much but I think you need to set msg.payload to be an object first
msg.payload = {}
msg.payload.text = "Hello using function node in Node-RED"
return msg;
This woks for me
That did the trick. Thank you!
or
msg.payload = {text: "Hello using function node in Node-RED"}
Many ways to skin a cat
#YLSNED ![]()
I just use explicit core nodes wherever possible ![]()

One explicit core node ![]()
#UpYours!!!!! ![]()
I could work up a Blockly example if you prefer! ![]()
I would be really interested in hearing from people what they use this for. What do you/would you use a bot to send to Mastodon?
I use mine to change #cheerlights if they've stayed the same colour for around 15 minutes.
Used to do it by posting directly to twitter but now I do it on Mastodon via @cheerlights@botsin.space account that cross-posts
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

