Matrix
Connect a Matrix room, and Publishedt posts each new item from your feed there as a bot account that you own. You make the account, get it a long-lived access token, invite it to the room, and paste the token into Publishedt.
Make a bot account
-
On your homeserver, register a new account for the bot, such as
@publishedt:example.org. Use a separate account, because anyone who has its token can post as it. -
Get a token that doesn't expire by logging in through the login API. Run this yourself, in your own terminal. Never paste your password into Publishedt:
printf 'Bot account password: '; read -rs PW; echo printf '{"type":"m.login.password","identifier":{"type":"m.id.user","user":"publishedt"},"password":"%s","initial_device_display_name":"Publishedt"}' "$PW" | curl -X POST https://matrix.example.org/_matrix/client/v3/login \ -H 'Content-Type: application/json' -d @- unset PWThe password is typed hidden, so it isn't saved in your shell history. If it contains a
"or a\, escape it for JSON. -
Copy
access_tokenfrom the response. -
Don't log out of that session. Logging out deletes the token on the homeserver.
Don't copy a token from a client's settings. A token from Element on matrix.org often expires after about 5 minutes, because it's tied to a refresh token that Publishedt never gets, and posts stop soon after. Use a token from the login API instead.
Connect
- Invite the bot account to the room and have it join, by accepting the invite from a client that's signed in as the bot.
- In Publishedt, go to Destinations, then Connect a destination, and choose Matrix.
- Enter your homeserver's address under Homeserver, such as
https://matrix.example.org. - Paste the token under Access token.
- Enter the room's ID or alias under Room, such as
#news:example.orgor!abc123:example.org. - Choose Connect Matrix, then Send a test post on the destination's page to check that it works.
If it worked, Publishedt shows Test post sent, and its Open in Matrix link opens the post in the room. The post reads "This is a test post from Publishedt. If you can read it, posts from your feeds will arrive here." Activity lists it as Test post, with the status Posted, and the destination shows as Working.
If the test post fails, the message gives the reason, and What each failure means covers the fix. If it's still waiting after a minute, check Activity again soon.
Next, route a feed to it, then set the text of each post with its template.
When you connect, Publishedt checks the token. It also checks that the bot has joined the room, that the room isn't encrypted, and that the bot is allowed to send messages. Keep the token private. Publishedt stores it encrypted and never shows it again.
You can connect each room once per workspace.
Reconnect and change room
- Reconnect: get a new token for the same bot account and paste it. Publishedt rejects a token for a different account.
- Change room: enter a different room, and the token doesn't change. Once you've fixed a room's problem, leave the field empty and choose Check again.
Encrypted rooms
Publishedt never posts to an encrypted room, because it would have to send the post unencrypted. Choose a room without encryption. If a room turns on encryption later, it stops getting posts and the destination shows as Needs attention.
What's posted
- Text: the post is sent as a notice (
m.notice). Clients show a notice less prominently than a person's message, and bots don't respond to one. Links are clickable. - Images: up to 4 of the item's images, sent after the text in feed order. Publishedt uploads each one to your homeserver. The item's alt text becomes the image's caption, and an image without alt text uses its file name instead. If the homeserver rejects an image, it's left off and Activity shows why.
Options
A Matrix route has no options beyond its template and its posts per hour.
Limits
- Length: about 60,000 bytes. A post that's longer gets cut to fit, but its link remains intact.
- Images: at most 4 images per post, and your homeserver's upload size limit applies to each one.
- Posts per day: your plan sets a daily cap for each destination. See Pricing.
Posted link
Activity links each post to its place in the room through matrix.to, labeled Open in Matrix.
Partly posted
A post can be sent in parts: first the text, then each image. If a later part fails, Activity shows the post as Partly posted, and the parts that were already posted remain.
- Try again sends only the parts that are missing.
- Post again is for a post that wasn't confirmed. It never sends again a part recorded as posted. A part whose outcome is unknown does get sent again, so it may appear twice.
- After Change room, both buttons send the new room every part it doesn't have. A room the post was sent to before gets only the parts it lacks.
When the bot loses access
If the destination shows Needs reconnecting, the homeserver stopped accepting the token. Get a new token for the same bot account, as in Make a bot account, then choose Reconnect on the destination's page and paste it.
If it shows Needs attention, the room is the problem, such as encryption or a bot that was removed. Fix the room, then choose Change room and enter a different room, or leave the field empty and choose Check again.
Its posts wait until you fix it, and a post that waits more than 3 days is skipped rather than posted late.
A token from a new login is a new session, and the homeserver only matches a resent part to the original within the same session. If a part's outcome was unknown when the token stopped working, and you reconnect with a new login's token within 30 minutes of that part, it can be posted twice.
What each failure means
| Activity shows | What it means |
|---|---|
| The homeserver no longer accepts this destination's access token. Reconnect it with a new token to keep posting. | The homeserver no longer accepts the bot account's access token: it was logged out, ran out, or the account was deactivated or locked. Posts wait. Get a new token for the bot account, then open the destination and choose Reconnect. |
| Publishedt couldn't read this destination's saved access token. Reconnect it to keep posting. | The saved access token or room can't be read. Posts wait. Open the destination and choose Reconnect. |
| This room is encrypted, and Publishedt can't post to encrypted rooms. Choose a room without encryption. | The room turned on encryption, and Publishedt never posts in the clear to an encrypted room. Nothing was sent. Posts wait. Choose a room without encryption. |
| This room was upgraded to a new room. Join the new room with the bot account and choose it here. | The room was upgraded to a new room, and the old one takes no more posts. Posts wait. Join the new room with the bot account, then choose it. |
| The bot account can't post in this room. Check that it's still a member and allowed to send messages. | The bot account left the room, was removed, or lost the power to send messages. Posts wait. Add it back with the right to send messages, then choose the room again. |
| The homeserver can't find this room. Choose another room. | The homeserver can't find the room: it was deleted, or the bot account can't see it. Posts wait. Choose another room. |
| Matrix rejected the post. | The destination rejected this post and gave a reason. It isn't retried. Fix what it names, then choose Try again in Activity. |
| Matrix had an error. | The homeserver kept responding with an error. Publishedt retried, waiting longer each time, then stopped. Any parts already posted remain. Choose Try again in Activity to send the rest. |
| Matrix took too long to respond. | Each try timed out before the next part was sent. Any parts already posted remain. Choose Try again in Activity to send the rest. |
| Publishedt couldn't reach Matrix. | Publishedt couldn't connect on any try. Any parts already posted remain. Choose Try again in Activity to send the rest. |
| Publishedt couldn't confirm whether this posted. Check Matrix before posting it again. | The post was sent, but no response came, so Publishedt can't tell whether it was posted. Check the destination. If the post isn't there, post it again from Activity. |
| Trimmed to fit the destination's n-character limit. | A note, not a failure: the post was cut to fit, keeping its link whole. Shorten the template to avoid it. |
| The link was too long to fit and was left off. | A note, not a failure: the link alone was too long to fit, so the post went without it. |
| Posted without n image(s) that Matrix rejected. | A note, not a failure: the post was sent without some images. The table below shows why for each. |
Images
| Why an image was left off | What it means |
|---|---|
| Publishedt couldn't download an image from the feed's site. | The image's address didn't respond. |
| An image's address isn't a public website. | The image is on a private network, which Publishedt never connects to. |
| A linked file isn't a picture Publishedt can post. | The file at the image's address isn't an image. |
| An image is in a format Publishedt can't post, such as HEIC. | The image is in a format that can't be posted, such as HEIC or an animated AVIF. Use JPEG, PNG, GIF, WebP, or AVIF. |
| An image is too large to process. | The image is over 10 MB, or has too many pixels to open. |
| An image couldn't be made small enough for Matrix. | The image couldn't be made small enough for the destination's size limit. |
| Matrix rejected an image. | The destination rejected the image. |
For failures any destination can run into, see Getting started.
Something wrong on this page? Contact support@publishedt.app.