Crossposting selected posts from Mastodon to Twitter via Dlvr.it

I tried the excellent directions by Tim Perry on how to set up crossposting from Mastodon to Twitter with IFTTT and they worked like a charm. I was pretty pleased with myself.

Then I realized there was Just One Problem™.

I’m a… prolific… conversationalist. And I really don’t want to flood my Twitter feed with one side of every conversation I have on Mastodon, every @someone “LOL”, every :pineapple:. (Okay, maybe the :pineapple: :)

I backtracked and tried creating a recipe with IFTTT’s keyword filtered RSS option. Which is where I hit another snag: it doesn’t seem to work. (My first try, created according to Tim Perry’s directions, worked great. All the salient data is the same. I’m also not the only one having this problem. I don’t know what’s up with it.)

So I did what any experienced internet user would do in this situation. I Googled “how to post from RSS to Twitter”. After much research (I clicked some links and skimmed) I settled on Dlvr.it.

It’s not quite as pared down and intuitive to set up as IFTTT. But it works. Which is what mama needs.

THE SETUP

Go to Dlvr.it and make an account. (If you don’t already have one; if you have one, you don’t need these directions. :) I used the login with Twitter option since I’m going to be using it to post to Twitter anyway. (Bonus: if you do this, you don’t have to add your Twitter account later.)

Once you’re in, the first thing you need to do is create a new connection between Mastodon and Twitter.

Add the atom feed to your Mastodon account.

Step 1: add your feed

Your feed will be in the following format: 
https://instance.name.tld/users/username.atom

Where instance.name.tld is the base URL of the instance your account is on, and username.atom uses your username.

Click the magnifying glass and Dlvr.it will search for the feed. Once it finds your feed, click the ‘add’ (plus sign). You’ll get a screen with some settings.

Defaults are fine

The defaults are fine. Click the Next: Connect socials button.

Connect the feed to your Twitter account

If you created your Dlvr.it account by logging in with Twitter, your Twitter account will already be listed and selected. Just click the Start Posting button.

Your basic connection between Mastodon and Twitter is created.

Connection created!

Next we’re going to set up filtering so only toots containing a specific hashtag are crossposted to Twitter.

Click Settings on your connection. (At the top, with the pencil icon.)

The Settings window

On the settings screen, click the Filters tab.

The Filter tab

By default, both Title and Content are set to on. I turn off Title, but you don’t have to. Make sure Content to on (set to blue).

In the Filter Behavior drop down choose Match Whole Words.

Now we’ll set the tag.

In posted items must contain all the terms, enter the hashtag you want to use to flag a toot that should be posted on Twitter. I use #bsxp (for “birdsite crosspost”) but you can choose anything you want.

Click Save.

Finally, we’re going to adjust the post format so the posts on Twitter show the body of our posts and link back to the original. (By default, Dlvr.it uses the title from the RSS feed and a link to the full post, but that’s no good for our purposes because the titles are all the same.)

Click Automate in the left column to go back to the list of connections.

Main connection screen

On your Mastodon to Twitter connection (the one we just created) click Edit Output (the gear wheel).

The Settings window

In the Post Options tab of the Settings window, set the Post Title switch to off (grey) and the Post Body switch to on (blue).

Scroll down and click Save.

Yay! Now your automated crossposting set up!

TESTING

Now we want to test and make sure our connection is working and toots that are supposed to crosspost are, well, crossposting.

Go to your Mastodon account and create a test post in Mastodon. Make sure you include the hashtag you set up in Filters.

Shitposting like a boss!

By default, Dlvr.it checks RSS every half an hour, so you shouldn’t have to wait longer than half an hour to see your post appear on Twitter. (You can adjust this frequency on the Updates tab of the connection settings.)

Boom! There it is!

And you’re done! Victory!

If your test toot doesn’t appear, or if you’re just really impatient and don’t feel like waiting, hop down to…

TROUBLESHOOTING

If it’s been longer than half an hour and your test post hasn’t appeared on Twitter, deactivate and reactivate the connection. The Active/Inactive switch is in the upper right of the connection window.

Turn it off and on again.

Choose the Share the most recent new item from each feed option and click Done.

IN CONCLUSION

That’s all folks. If you have any questions or get stuck, leave a comment or hit me up on Mastodon and I’ll do my best to help.