# Help with Mastodon - Node please

**URL:** <https://discourse.nodered.org/t/help-with-mastodon-node-please/75030>\
**Category:** General\
**Created:** [11 February 2023 10:59 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030 "2023-02-11T10:59:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![My\_Millenium](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@My\_Millenium](https://discourse.nodered.org/u/My_Millenium)\
**Post date:** [11 February 2023 10:59 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030/1 "2023-02-11T10:59:10Z")

</div>

Hey!

I have set up an application on my Mastodon-Account so my Node-Red can set Toots.

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1bdf96204dcec399843371f707c0042456e0b737.png)

I am using the 'node-red-contrib-mastodon : sendMessage' node to do this. See the screenshot for the setup  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/4/849a68169cda87028d720baf568e0453b6bb3bbc.png)

This is the Flow I have configured  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/6/c657a85c093f7e3a54189dcd8d3bf64dfd845755.png)

The inject-node is configured as follows (writing a string to payload.text)  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/f/bf67ee7cc39a8e6b29f52c1d077e59fd410ef262.png)

Now the problem:  
While the getMessage-Node receives messages with the configured hastag and the sendMessage-Node sends the message  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/0/e0307db3ba01d6cc84c26e23ebcea181866411ed.png)

I do not see this Toot in my profile or my timeline and the debug-node 1 does not receive any message (confirgured to show the complete message object)

What is wrong here?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [11 February 2023 20:51 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030/2 "2023-02-11T20:51:31Z")

</div>

1. Are you using your main Mastodon account for this?

2. Is it on mastodon.social?

3. The node doesn't output anything so that is why you don't see anything using the debug node

4. On mine when it says it has sent something, I've always seen the message so it's suprising that your not seeing it - can you change your msg.payload.text to  
`@cymplecy@fosstodon.org test from My_Millenium`  
and I'll see if I receive it

5. Could your help the rest of us out, as no-one else has managed to get the receive node to work ☹ Can you post image of that node and how you've got it configured to receive messages?

---

<div class="post-metadata">

**Author:** ![blackshoals](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/blackshoals/32/75941_2.png) [@blackshoals](https://discourse.nodered.org/u/blackshoals)\
**Post date:** [12 February 2023 01:16 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030/3 "2023-02-12T01:16:15Z")

</div>

I'll second that request for any information on a working receive node. I've been using the Twitter node to pick up the position of a local ferry for a few years but the maintainer of that bot has rejected Twitter and moved to Mastodon.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [12 February 2023 07:18 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030/4 "2023-02-12T07:18:47Z")

</div>

See this for workarounds

> [@Migration from twitter to Mastodon](https://discourse.nodered.org/t/migration-from-twitter-to-mastodon/74959/5):
>
> Ignoring all my rambling above - this flow will get the last 20 status from @nodes@social.nodered.org slight_smile [{"id":"f8763c2e1614896a","type":"function","z":"515cba3a2d3cfa9b","name":"function 1","func":"var oldPayload, newPayload, i2;\n\n\noldPayload = (msg['payload']);\nnewPayload = [];\nfor (i2 = 1; i2 \<= 20; i2++) {\n newPayload.push(((oldPayload[(i2 - 1)])['description'])[0]);\n}\nmsg['payload'] = newPayload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final…

---

<div class="post-metadata">

**Author:** ![My\_Millenium](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@My\_Millenium](https://discourse.nodered.org/u/My_Millenium)\
**Post date:** [12 February 2023 14:34 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030/5 "2023-02-12T14:34:21Z")

</div>

1. Yes I do, because I wanted to check it out first and then make a new account for that

2. My account is on [mastodontech.de](http://mastodontech.de) --\> And that was the solution. I thought Mastodon would have only one API (and every tutorial I found has used mastodon.social 🤣). I changed mastodon.social to [mastodontech.de](http://mastodontech.de) and now it works! So thank you for that!!

3. OK, thanks for the information!

4. Could be a bug in the node.

5. Yesterday I set up the getMessage-Node with a hashtag. It delivered a text-array with subordinated arrays where each one contained a toot that contained the hashtag. Today it does not work anymore. Sounds strange ... I know. But I would not have written it if that has not been true. Strangely I am now experiencing, that for each push to the getMessage-Node, Node-Red loses the connection to the server.  
The only difference between yesterday and today is, that I have set up and tested the getMessage-node after I have installed it without having restarted Node-Red or the server. Today the server has made a reboot.  
Guys .. I swear that the node has worked 🤪

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [12 February 2023 14:49 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030/6 "2023-02-12T14:49:26Z")

</div>

Glad 2 sorted it 🙂

> [@My\_Millenium](#):
>
> Guys .. I swear that the node has worked

I was looking into this again after you said it worked for you and re-read this

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/0/100d778dfd78e8012a0605e25d62e009157eb4be.png)

So this contrib node is old and uses v1 search API so it's going to stop working sometime but I configured the hashtag field to be a JSON array instead of just the #tag and it worked for me! It returned 20 results

But is that what you did yesterday?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/503d1e4e0cd6a5ad71525f14f4fb94f30c164c4f.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f1f6790d5c11ab979b7a62e6ef78f6cccdd13f18.png)

[EDIT} But now its working for me without the {} and !!!!!

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/0/7028ecf2e9cd65be63e85b0f3da25a11812c8a2b.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/c/6c08edfb8d9cf76a360f4e60d591863648fa5c82.png)

Something iffy going on somewhere! 🙂

---

<div class="post-metadata">

**Author:** ![My\_Millenium](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@My\_Millenium](https://discourse.nodered.org/u/My_Millenium)\
**Post date:** [12 February 2023 15:08 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030/7 "2023-02-12T15:08:02Z")

</div>

> [@cymplecy](#):
>
> But is that what you did yesterday?

No 🤪 I just entered #dogs and it worked. But your solutions works for me, too. If I enter {[dogs]} it reveives the mentioned arrays. And if I then change {[dogs]} to dogs, it works, too.

a ghost in the machine 🤣

---

<div class="post-metadata">

**Author:** ![blackshoals](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/blackshoals/32/75941_2.png) [@blackshoals](https://discourse.nodered.org/u/blackshoals)\
**Post date:** [13 February 2023 01:04 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030/8 "2023-02-13T01:04:06Z")

</div>

Thanks, I realized I had not looked carefully enough at the receive node docs. The messages I needed have no # hashtag. I was able to adapt your flow to give me the latest update to the user's (@bowenferry) bot timeline by checking every 5 minutes during the scheduled ferry runs.

```auto
[{"id":"27a10abd9f6cf7ce","type":"inject","z":"3754c020.afda5","name":"Every 5 minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"*/5 4-22 * * *","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":110,"y":220,"wires":[["a62853eec8740870"]]},{"id":"a62853eec8740870","type":"http request","z":"3754c020.afda5","name":"Mastodon @Bowenferry","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://mstdn.ca/@bowenferry.rss","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":510,"y":220,"wires":[["70f6c3f59b601ee3"]]},{"id":"70f6c3f59b601ee3","type":"xml","z":"3754c020.afda5","name":"","property":"payload","attr":"","chr":"","x":90,"y":280,"wires":[["fb8f71fc05e984fc"]]},{"id":"fb8f71fc05e984fc","type":"change","z":"3754c020.afda5","name":"Extract latest update","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.rss.channel[0].item[0].description[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":280,"wires":[["a1da5687476eb4b4"]]},{"id":"a1da5687476eb4b4","type":"function","z":"3754c020.afda5","name":"Remove HTML tags","func":"msg.payload = msg.payload.slice(3, -4);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":280,"wires":[["cadac481.c68368"]]}]

```

---

<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:** [27 February 2023 01:04 UTC](https://discourse.nodered.org/t/help-with-mastodon-node-please/75030/9 "2023-02-27T01:04:10Z")

</div>

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