Mastodon file upload?

can someone please help me out with how to upload an image to Mastadon that can be later used as an attachment?

I’m getting some can not create thumbnail error with these two nodes so I’m pretty sure the parameters are somehow wrong.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

You’re almost there - just pass the binary data property as an ‘n8n Binary File’ body parameter.

Note that processing can take a little time. I usually use a 5 second wait before continuing to post a message with the attachment reference. If you want to be absolutely sure that it’s processed, I believe there’s also a callback or poll mechanism you can use, but I never needed it.

ahh cool - that worked thanks @bartv

though could you check i’ve got the correct body parameters which i know i don’t since the attachment doesn’t appear

media_ids needs to be an array. I just did it like this:

ahh ok, now i understand @bartv

for me, {{ [ $json.uploadpostid ] }} did the trick.
thanks heaps in getting me over the line with this one

2 Likes

You’re welcome! Happy to promote Mastodon wherever I can :wink:

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