Fiddling with Integromat: Steem Subreddit Link Auto-Forwarding
Today I wanted to write about some task automation I was playing with while we were getting the Steem Subreddit up and running.
Steem Subreddit
As background, there's now an announcement by @acidyo with a cool initiative to drum up activity on the subreddit and to encourage participation. This will serve as a discussion forum for those that are not familiar with Steemit to learn about the platform. I know I was not alone in coming to this subreddit to find information about Steemit only to find nothing but a post graveyard, and now we have moderation control of the subreddit to tidy things up and direct meaningful discussion. Do check it out! (I created a reddit account after my steemit account for the purposes of answering questions I found on the steemit subreddit, and this is how I met @lunaticpandora)
Task Automation
If you are not yet familiar with IFTTT, I highly recommend playing with it or snooping around various recipes people have created. You can use it to trigger automated actions, for example, for notifying you to bring an umbrella when there's rain expected, and if you have smart devices, tools for automatically triggering various devices or otherwise augmenting smart assistants.
In fact, one of the major reasons why the Steemit subreddit was a post graveyard was exactly because many people set up IFTTT integrations to automatically post to Reddit. Back in the day, I was manually trying to redirect users of the subreddit to send their links elsewhere, to no avail. At the time, there was no active moderator either, so that made it impossible to do any sort of cleanup initiative. Now these link dumps are automatically marked as spam by automoderator rules.
So as far as the subreddit goes, everything was great. But there were actually people that were actively using the subreddit as a post promotion. I then asked, well, I wonder if we can redirect the links to another place automatically? This turned out to be pretty tricky!
Redirecting Links
What's interesting is that Reddit has the concept of personal RSS feeds that you can use to get a feed of for example your spam queue for a specific subreddit. So I thought, okay, let's use IFTTT's RSS to Reddit recipe and just dump the content to a separate subreddit I set up for this purpose.
Some of you can probably guess what happened. Well the RSS feed has things that had <table>
HTML tags, and the format was not suitable for directly posting on Reddit. Ideally you'd want to extract just the link portion of the feed content and just post that. Game over for IFTTT. There's no multi-step processor, you'd have to write a custom service or something like that.
Zapier
This is when I started to look at alternatives. Zapier came to mind as a way of allowing multi-step processing. One of the steps was to extract the feed content and extract the link out. I saw that you can make custom Javscript formatters that are quite flexible, and I immediately started making something to extract the content I wanted. What was amazing about Zapier was that it had a rich interface where you could see sample feed data and test each individual component to make sure that it was extracting the piece that you expected to extract. I have nothing but praise for how much of a pleasure it was to play around with Zapier.
In a typical @eonwarped style, guess what I found out after I was able to extract the link information? Zapier has no Reddit action integration. Meaning, I couldn't set it up to post the link. I was floored, as I had simply assumed it would be there. Alright, what else is there?
Integromat
Integromat filled what I needed, and more! It also has a great interface, and I did not even need to make a custom javascript code. Here's a peek at what I ended up with:
So starting with the RSS feed, you see a step that extracts elements from HTML, and I selected "Links". You can see from the screenshot that it simply allowed me to choose the Link element out of the "Description" portion of the RSS content.
This outputs a collection of link elements. I only wanted the one corresponding to the user specified link, and thankfully it allowed me to specify a filter to the output.
The specific format of the RSS content, at least for link style posts, is that the text part of the hyperlink simply says [link]
, and that's what I matched.
Now the last pieces of the flow does the following:
- Post the link to the /r/steemitposts subreddit.
- If successful, Post a comment to the link saying who submitted the link.
- If failure, ignore. This can happen for example when a duplicate link has been submitted.
That's right, integromat's flow control offers a way to handle errors gracefully, and that is pretty cool! There's a ton of other features as well that I have not played with as well, but the type of workflows you can set up are quite complex! The free version of integromat allows for 1000 operations per month, and I think I might end up hitting that with this flow, but let's see...
Summary
You can see the full setup in action on the /r/steemitposts Subreddit. At the moment though, the subreddit rules are marking all my automated link posts as spam so I have to approve them. I think I just need to set up an automoderator to approve them though.
Anyway that was a great deal of fun, and wanted to share my process. Let me know if you have any questions below or want to share in gushing about how cool this is. If you are looking for a task that needs automation, the solution may lie here.
This looks amazing! The concept itself of generic post promotion is a bit lame because it gets processed as spam by the brain, so nobody will look at the subreddit, I think. However, it's nice that there's at least a place where people can dump their links (it seems many have a subconscious urge to put their stuff wherever it can fit regardless of the prospects it will have in there).
I think that there could be things we could work on for it in the future. Things like developing a regex that takes the tag and uses it as a post flair, or categorising things, modding content somehow in order to make the subreddit somewhat similar to a curation tool.
I see it too far in the future, though. I don't know what technology or methods could allow this and I'm not really savvy at programming with the reddit API. Do you have any ideas about this?
Heh yeah. Well, who knows, we've gotten at least 2 complaints for people that liked it as a post promotion subreddit, so this may partially allay the fears (or really, the auto-moderator post promotion stickies may do that trick better, since we are actively going to curate from there).
Yeah, good points on future possibilities. This tool really can do a lot of cool things! I've never used the reddit API, so I cannot comment there. But there's always https://www.reddit.com/r/RequestABot/ . Hey maybe steemit should do the same (although the closest thing right now would be the steem dev discord)
Hmm, that subreddit is interesting. I find it curious that there are many professionals willing to do their jobs for free in their free time. I'll think about some way to bring this to Steemit. I am still reflecting on something you said before about the priorities of Steem, about the focus on earning money vs. the philosophy of creating a blockchain community. It's obvious that money has something central to do with it, so I'm still mentally separating them. Thoughts are hard and puzzley!
Pretty good solution! Integromat looks pretty cool too and the interface does look pretty neat... Makes me want to play around with it! Maybe I will :^)
I spent more time than I'd like to admit playing with it. Was worth it though :)
although half of the things I am not understanding but with little bit wat I understand that steemit comes on reddit and u really prepared something intresting...I understand its half way because automation is out of control of these bots...but I am sure soon u will come up with solution and little easy way to make us understand.....
Creative solutions. I like it!
Oh wow, maybe I should create a reddit account, too, then! That's pretty cool that that's how you met @lunaticpandora! I definitely think changing the subreddit to not have post promotion will make it so much less spammy!
Well, it's been done and even though the sub is looking a bit dead, I think that now that it's a healthy environment, it will slowly become alive. :) And yeap! They're both inherently different social networks that garner different kinds of discussion. I'll keep an eye out to welcome you there!
so much to learn! very motivating!