Categories
Uncategorized

How to Post to Societal From Anything Using IFTTT

Users can hook up IFTTT to Societal to auto-post from another site! WordPress users can also use this approach to publish new blog posts to their Societal pages.

1. Set up IFTTT’s Maker Webhooks

On IFTTT, go to “Webhooks”. Activate it by clicking on the Connect button.

2. Set up Societal to allow IFTTT as an application

Go to https://societal.co/settings/applications on Societal. Click on New Application. Enter the following:

Name: IFTTT
Website: https://maker.ifttt.com/
Select Scopes: write:statuses

Submit the app.

Now open the new app you’ve created and look up the access token.

3. Create an IFTTT app!

Go back to IFTTT and create a new app. You could also set it up to autopost every time you blog with a specific tag, or every new item in an RSS feed, or all kinds of things. Even cross-post from Facebook or “the birdsite” (Twitter).

SInce IFTTT has rearranged their site to make it easier to use pre-built recipes — here are the steps to get to the point where you can build your own.

  1. Click on the “Get More” button at the top of the IFTTT page.
  2. The first bar should say “Make more Applets from scratch.” Click on the “IfThisThenThat” button in that bar.
  3. Click on “This” in “If +This Then That”
  4. Search for the type of service you want to hook up — RSS for a feed, or Pocket, or Facebook, etc. and choose the type of event you want to use (ex. “New feed item” or “New item tagged…”)
  5. Enter the info needed for the event — your feed URL, the tags you’re looking for, etc, and click on “Create Trigger.”
  6. Click on “That” in “If [rss] Then +That”
  7. Search for Webhooks and click on it.
  8. Choose “Make a Web Request”

And now you’re ready to configure how IFTTT will actually talk to your Mastodon app. Enter the following settings:

URL: https://societal.co/api/v1/statuses?access_token=123456789 (replace 123456789 with the access token you got from Societal.)
Method: POST
Content Type: application/x-www-form-urlencoded
Body: status=Whatever you want to post

For example, to share a link from Pocket you might want the body to be

status=<<<{{Title}}>>> <<<{{Url}}>>>

Or for posting from WordPress, you might want it to be

status=New blog post: <<<{{PostTitle}}>>>
<<<{{PostUrl}}>>>

Or from an RSS feed, you could use

status=New post: <<<{{EntryTitle}}>>>
<<<{{EntryUrl}}>>>

The “ingredients” available (Title/PostTitle/etc.) will depend on the source you’re using, and you can get them from the IFTTT user interface. RSS feeds will have EntryTitle, EntryUrl, etc., WordPress will have PostTitle and PostUrl, and so on. You can click on the “Add ingredient” button to see what’s available.

Watch out for ampersands and single quotes, because the API handler treats them as separators. Even if they’re in the source material!

Be sure to include the status= at the beginning!

To post an excerpt in a CW that doesn’t show up in local/federated timelines or hashtag searches, you would do something like this:

spoiler_text=Link: <<<{{Title}}>>>&visibility=unlisted&status=<<<{{Url}}>>> <<<{{Excerpt}}>>>

Unfortunately, this method can’t post images because uploading images to Societal is a two-step process** and IFTTT webhooks can only do one step. For Twitter, the cross-poster crossposter.masto.donte.com.br, can handle image uploads.

Click on “Create action.”

Add a title and click on “Finish.”

Leave a Reply

Your email address will not be published. Required fields are marked *