Experiment with Untappd and WordPress

I try to follow the tenets of the IndieWeb movement in that I try owning all of my own data and in publishing on my own site and syndicating elsewhere (POSSE). By posting original content first on my site, and then syndicating to silos I reduce decencies on third-party services.

But I can’t always have this kind of control. I can do it on Twitter and Facebook and there is an easy way to automate pushing out links from WordPress to my content. But some services aren’t easy to use in this way.

In the last few years, I have enjoyed drinking some of the fine craft ales that are produced in the USA. I enjoy many different styles but my favourite style is the India Pale Ale (IPA). My favourite type of IPA is the New England IPA. This style of ale is cloudy and has a tropical and fruity aroma. One sip and your senses are overwhelmed with flavours of grapefruit, peach, melon, tangerine with little to no bitterness.

I started using an app, Untappd, to keep track of the ales I drink, rate and comment on them, discover new ales and new breweries, and share and connect with other craft ale fanatics, and checkin to beers and breweries. Untappd also has a gaming element, where I earn a number of cool badges for completing a variety of different criteria. It’s a fun little app.

I didn’t have a way to re-create my Untappd content on my WordPress website. Until recently I had been uploading my images and creating a post by manually copying and linking to the post on Untappd. It worked but it was a painful process. Here’s one post for the Neshaminy Creek Mango Shape of Haze to Come.

Part of the pain is self-imposed. I love photography and I love beer. Combine the two and you have beertography. I stage my shots, usually using natural light, and I post process them in Adobe Lightroom. It’s what I do. But it means that my Untappd check-in isn’t instant. And then I have to spend time creating the blog post. I wish it was more like the process I used when I used the now dead Pressgram app.

But … as I dig deeper into making my WordPress website more a part of the IndieWeb, I started to think about how I could integrate Untappd content. I looked at the Untappd API but quickly realized that POSSE would not work. But what about PESOS?

In IndieWeb lingo, PESOS is an acronym/abbreviation for Publish Elsewhere, Syndicate (to your) Own Site. The publishing workflow starts with posting to a 3rd party service such as Foursquare, then using some infrastructure backend magic an archive copy if created under on your site.

Untappd allows the syndication of check-ins to Foursquare so I tried using IFTTT to pull the Foursquare content back to WordPress. It worked. But it wasn’t what I wanted. I wanted all of the information that was siloed in Untappd — the ratings, the toasts, the badges. All of those things are lost from the Foursquare entry.

So I looked at Zapier. Zapier provides similar automation functionality to IFTTT but has more involved workflow features to control the data with actions and triggers. Zapier allows me to chain together input and output from multiple web apps. It’s like IFTTT for programmers. After a week of frustration, I finally have a working method for pulling my Untappd check-ins back to my WordPress website.

Here’s the workflow I created.

  • The Untappd Checkin action connects to Untappd and pull data from the most recent check-in.
  • The Upload Featured Image action uploads the image from the Untappd check-in data to WordPress
  • The Create Post with Featured Image actions creates a new post on WordPress and links the uploaded image to the post as a featured image.

There are few things I needed to resolve before this worked. When the Zapier action uploads the image from the check-in, it needs to give the WordPress image a unique name. I used the name of the beer and the check-in ID as a unique name for the image.

{{29756616__beer__beer_slug}}_{{29756616__checkin_id}}.jpg

The image I chose to upload from the Untappd API is {{29756616__media__items[]photo__photo_img_og}}.

When the Zapier action uploads the image it creates a temporary object with a unique identifier, {{29831497__attachment_id}}. The attachment ID is made available to the next action.

The post title is set using the name of the brewery and the beer.

{{29756616__brewery__brewery_name}}'s {{29756616__beer__beer_name}}

The main body of the post is created using the following template. I wanted to capture as much of the original Untappd checkin as I could and I also wanted to link back to the original post. The Check-in via <a href="https://untappd.com/user/{{29756616__user__user_name}}/checkin/{{29756616__checkin_id}}" class="u-syndication" rel="syndication">Untappd</a> code takes care of that.

<p>I am drinking {{29756616__beer__beer_name}} by {{29756616__brewery__brewery_name}} at  {{29756616__venue__venue_name}} {{29756616__venue__location__venue_city}}.</p>

<p>{{29756616__checkin_comment}}</p>

<p>
Name: <a href="https://untappd.com/b/{{29756616__beer__beer_slug}}/{{29756616__beer__bid}}" rel="nofollow noopener">{{29756616__beer__beer_name}}</a><br/>
Brewery: <a href="https://untappd.com/w/{{29756616__beer__brewery__brewery_slug}}/{{29756616__beer__brewery__brewery_id}}" rel="nofollow noopener">{{29756616__brewery__brewery_name}}</a><br/>
Location: {{29756616__beer__brewery__location__brewery_city}}, {{29756616__brewery__location__brewery_state}}<br/>
Style: {{29756616__beer__beer_style}}<br/>
Alcohol by volume (ABV): {{29756616__beer__beer_abv}}%<br/>
IBU: {{29756616__beer__beer_ibu}}<br/>
My rating: {{29756616__rating_score}}/5<br/>
Brewer's notes: {{29756616__beer__beer_description}}<br/>
</p>

<p><a href="https://untappd.com/user/{{29756616__user__user_name}}/checkin/{{29756616__checkin_id}}" class="u-syndication syn-link" rel="syndication nofollow noopener">Untappd</a>.</p>

<div></div>

I set the excerpt for the post to something that would work well for syndicating to twitter.

I am drinking {{29756616__beer__beer_name}} by {{29756616__brewery__brewery_name}} at  {{29756616__venue__venue_name}} {{29756616__venue__location__venue_city}}.

The date of the WordPress post is set to the same date as the Untappd check-in.

{{29756616__created_at}}

So with a bit of persistence, I have a way to get the best of both worlds. I can check-in using the native Untappd app. I will have an entry on my blog with the details of that check-in.

The title of the post was inspired by Chris Aldrich, who used the hashtag #ManualUntilItHurts on a comment to one of my posts.

7 responses on “Experiment with Untappd and WordPress”

Mentions

  • khurtwilliams
  • Khürt Williams
  • dshanske
  • Khürt Williams

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.