

We previously implemented the slack_api utility function to With that set, we can take advantage of our new scope. Is in your App admin under OAuth & Permissions in the field labeled OAuth Access Token.

We’ve been using the bot token so far, not the OAuth token, so we’llĪlso need to the OAuth token to our env.yaml file. Until you see Scopes and then add channels:history.Īfter that, reinstall your app to request the additional OAuth scope. Go into your app dashboard, click on OAuth & Permissions, scroll down Adding channels:history scopeīefore we can call the channels.history endpoint, we first need to request Need to make a call to conversations.historyĪs described in the Retrieving messages docs. What did you or they actually do? To answer that, we’ll We’re still not really sure about the contents of the message: Now that we’ve filtered down to appropriate messages, def reaction_added_event(request, parsed): The first thing we want to do is to filter down to reactionsĪct on the two reactions we added, :ididit: and :udidit:,Īnd we only want to handle reactions to message items, I added :relaxed: to a message and the handler emitted this Log the incoming message so we can get a look at its parameters. Raise Exception("unable to handle event_callback event type: %s" % \įor our first implementation of reaction_added_event, let’s just Return reaction_added_event(request, parsed) Return app_home_opened_event(request, parsed) def event_callback_event(request, parsed): To handle reaction_added events rather than erroring on them. Now that we’re receiving these events, we need to extend event_callback_event Remember to click Save Changes below, and reinstall your application Open up Subscribe to workspace events and select reaction_added. To subscribe, head over to Event Subscriptions in your App dashboard, Whenever an emoji is added, an associated reaction_addedĮvent can be fired to the Events API, if you’ve subscribed to it.
Slack client response with json format how to#
Now we have our custom emoji, and we just need to figure out how to Then go ahead and do the same for the :ididit: emoji as well. I used Omnigraffle because I already had it open, but yeah, probablyĪdd your image, name it :udidit: and click Save. So this could be a playful way to get their team and community to help.Īdd those emoji via the Customize Slack option in the top-left menuįrom there click on Add custom emoji and create an image somehow. I’ve noticed some folks discount or dislike tracking their own accomplishments, :udidit: emoji, which folks could use to add items they did to their list of accomplishmentsĪs well as use to add accomplishments to other folks’ lists. Or reacji are a common way for folks to interact with messages in a channel.įor the application we’re building, I was thinking it might be neat to add :ididit: and Using Cloud Firestore to power a Slack app.Post starts at commit 4120, and ends at commit 08eb A lot of the subtle, emergentĬommunication patterns within Slack happen by reacting to messages with emoji, and I thought it would beįun to take advantage of that playfulness within the app we’re building. Picking up after adding an App Home view.
Slack client response with json format series#
This post continues the series on creating a Slack app in Python,
