12

Slack Bot! SLACK BOT!!

via GIPHY I don’t know why these two things are connected in my head but they are. So this is another one of those odd workflow posts. Here’s the scenario. I built a Slack App in their Bolt javascript SDK. That app has a command /courseupdate that triggers a modal with a selection and three text entry fields. Submission of that modal form creates a custom post type on a WordPress site. That custom post type is created with three ACF fields updated and a tag added so the update can be associated with a particular project. You can see it in action in the video below. There’s also a custom WordPress theme involved but it doesn’t really matter for this conversation. Various Resources The app runs on Heroku because that seemed the easiest route at the time to host the app. The Bolt framework to build the Slack portion runs in Node. The WP-API to connect the Slack actions to the WordPress site via the WordPress JSON API (also runs in Node). JSON formatter so I could more easily see what was going on with some of the JSON. There are a variety of tutorials that I used but none of them quite worked for me by themselves. Slack Bolt App in Glitch Deploying your slackbot to Heroku Another […]

12

WordPress and Slack Workflow Experiments

Every place I’ve ever worked we’ve ended up talking about paths to deal with support emails and follow ups. Generally there is an existing technology helpdesk support system but it is usually unpleasant to use and hard to customize.1 What we have currently at Middlebury is a fairly typical combination of things going on. We have a Google Form that enters things in a spreadsheet and alerts one email (shared). We also have direct emails coming to various people. We’re also all in Slack. I find email to be an ugly place to try to claim and dispatch work. Do you move it immediately to a folder to indicate you’re dealing with it? Do you mark it as read? How do you have a conversation about who should do it or ask other questions? Seems overkill to do that all in email and especially ugly to do in a shared email account. Do you BCC the original email to tie in the responses? Lots of ugly things that email doesn’t handle well on its own. We can create messages in Slack via forms. That’s no problem. Gravity Forms has a plugin option and we can do it via webhooks if we want to stay in Google Forms. We can also forward emails to a Slack channel. For our particular setup, […]

Archiving Slack Channels

Since we’re making channels in Slack via our project creation, it made sense to archive them when the project was completed. In projects (this particular post type) we have a custom field for the start date of the project and one for the end date of the project. Step one is to check on updates whether the post has the end-date field filled out. In my case, this is one of the legacy ACF fields that survived my great metadata purge. So checking it is done like so . . . The Slack archive API piece looks like this. And finally we run this function when projects are updated like so. We’re still experimenting with this workflow and archiving is a decent start. You can easily reactivate it and results still turn up in searches. It’s likely we’ll also rename it from p-whatever to z-whatever to get it out of the way.

Auto-Creating Slack Channels from WordPress

Image from page 279 of “The Ladies’ home journal” (1889) flickr photo by Internet Archive Book Images shared with no copyright restriction (Flickr Commons) In working through the project page a bit more, it seemed like it’d be more pleasant to start in WordPress and have our events echo outward in other services. One of those events is the creation of project specific Slack channels. In the past, I’d mainly listened for events . . . programmatically checking back every so often to see if something had occurred so I could do something else. In this case it made more sense to have one action directly precipitate another. These are the three functions that fire when we publish the custom-post-type Project.1 In any case, it’s a pretty instantaneous creation and invitation to the channels. 1 I don’t know how to punctuate that but it’s probably not hyphens.

List Public Slack Channels via API

Image from page 249 of “The development of the chick; an introduction to embryology” (1919) flickr photo by Internet Archive Book Images shared with no copyright restriction (Flickr Commons) I ended up doing this while pursuing some of the API integration stuff for our projects page. It doesn’t list the private pages and might be useful to someone. This was the byproduct of looking for a way to look up the ID for a particular channel which ended up looking like this.

Adjusting Tension in Slack

flickr photo shared by ReflectedSerendipity under a Creative Commons ( BY-SA ) license Like everyone else it seems, we started using Slack at work. It’s been a while (maybe 6 months?) and I’ve had mixed feelings which seem to be echoed by the group so I thought I’d take a harder look at our use and at least sketch out my personal feelings about where it’s working for me and where I’m struggling. As you should expect, your mileage should vary. Do not trust me. I am an unreliable narrator. I may not even know what’s going on here. Umwelt and all that. Workflow & Intent On my end, I thought Slack was worth pursuing mainly because of archive and search. Workflow baby. I’ve had a number of jobs and it’s really ugly to come in somewhere and realize any documentation that exists is in email exchanges. Those emails may forwarded to you in bulk or individually as you request information or they could simply disappear. That’s pretty horrific and if the emails are between the person you replaced and a faculty member, it’s really easy to simply lose all that information. The archive is valuable and while formal documentation is important a chunk of this stuff ought to be available through organic means. Given we’ve had a fair amount […]