Overview
This n8n node allows you to create a new status (post) on a Mastodon instance. It is useful for automating the publishing of updates, announcements, or any content to your Mastodon account directly from n8n workflows. Common scenarios include scheduled posts, cross-posting from other platforms, or integrating Mastodon updates with other automation tasks.
Practical examples:
- Automatically post a daily update to your Mastodon timeline.
- Share notifications or alerts from other systems as Mastodon statuses.
- Cross-post blog entries or tweets to Mastodon.
Properties
| Name | Type | Meaning |
|---|---|---|
| Mastodon URL | String | The base URL of your Mastodon instance (e.g., https://mastodon.example). Required for API requests. |
| Text | String | The content of the status update. This is the main body of your post. |
| Additional Fields | Collection | Optional extra settings for the status update. See below for details. |
Additional Fields (Collection):
| Name | Type | Meaning |
|---|---|---|
| Attachments | String | Names of binary properties containing files to attach to the status. Comma-separated for multiple files. |
| In Reply to Status | String | ID of an existing status to reply to, making this post a reply. |
| Possibly Sensitive | Boolean | Indicates if the media might be sensitive (e.g., nudity, medical procedures). |
| Content Warning | String | Text shown as a warning before the actual content (spoiler text). |
| Language | String | The language code of the status update (e.g., en, fr). |
Output
The node outputs a JSON object representing the created Mastodon status. Typical fields in the output may include:
{
"id": "string",
"content": "string",
"created_at": "string",
"url": "string",
"account": { /* ... */ },
// ...other Mastodon status fields
}
If attachments are included, the output will reference them in the appropriate fields, but the node does not output raw binary data—only references or metadata.
Dependencies
- Mastodon Instance: You must have access to a Mastodon server and know its URL.
- Authentication: The node can use OAuth2 credentials (
mastodonOAuth2Api), though it is not strictly required by the node's configuration. - n8n Configuration: No special environment variables are needed unless your Mastodon instance requires specific authentication setup.
Troubleshooting
Common Issues:
- Invalid Mastodon URL: Ensure the Mastodon URL is correct and accessible.
- Missing Authentication: If your Mastodon instance requires authentication, make sure credentials are configured in n8n.
- Attachment Errors: If specifying attachments, ensure the referenced binary properties exist and contain valid data.
- API Limits or Permissions: Your account must have permission to post statuses; check for rate limits or restricted scopes.
Error Messages:
- "401 Unauthorized" – Check your credentials and permissions.
- "404 Not Found" – Verify the Mastodon URL and endpoint paths.
- "400 Bad Request" – Check that all required fields (especially "Text") are provided and correctly formatted.