Alfred + Webhooks by Zapier + Named Variables = Awesome

  • 28 July 2022
  • 4 replies
  • 461 views
Alfred + Webhooks by Zapier + Named Variables = Awesome
Userlevel 7
Badge +11

I’ve got a fun one for ya today :) First, let’s define a few things:

Alfred: Alfred is a productivity application for macOS, which boosts your efficiency with hotkeys, keywords and text expansion. (link)

Webhooks by Zapier: Webhooks simply POST data (or JSON) to a specific URL every time we see something new. Webhooks can also accept data (or JSON) to kick off a workflow in Zapier. (link)

Named Variables: Named variables allows you to format your text in a way that when the Zap runs, this text will be separated out and sent as individual fields. The key to using this function is entirely in the formatting of the original information. (link)

Airtable: In short, Airtable is a platform that makes it easy to build powerful, custom applications. (link)


If you’re still here, then I’ll assume this is relevant for you and you’re up for the challenge :)

In Alfred

We’ve got a blog post about how to use Alfred to send data to a Zapier webhook if you want to check it out. I’m about to show you something that can help you take things up a notch.

NOTE: One thing to be careful of in Alfred is this part, where you decide what to escape. I set it up this way and it worked for my needs:
 

 

Named Variables Provide a Ton of Flexibility

At the link I posted above, about named variables, you’ll learn that when Zapier sees something in this format...

something(here) 

… it will create a field called something with a value of here in it.

How does that help us? Well, take a look at this:

ef3763fe38f5bdd72d1e29ddfdc015c3.gif

In Zapier

What does that look like in my Zap? Check it out:

I’ve created 3 separate fields, that I can (you guessed it) map to different parts of my Airtable action step:

Some Things to Note

There are a few considerations that I’d like to highlight:

  1. Your action app doesn’t need to be Airtable. It just happens to be what I chose :)
  2. In order for the mapped fields to work in your Zap, you’ll have to use the same “named variable” each time. So from my example above, you couldn’t use a thing instead of something and have it work. So make sure you use something memorable (and ideally short). It could be numbers, or single letters that represent the fields you know you’ll map those values to in your action step(s).
  3. You clearly wouldn’t want to use this workflow for something crazy long, à la...
      6e69e1e5dbcbd20655af97b0ab259aa0.gif
    … because it’s tedious, error-prone, and not the point of this workflow 😛
  4. The reason my Zap shows field_1, field_2, etc. is because I used the word field here:

Wrapping Up

I hope you’ve found this helpful! If you have any interesting use cases for this type of workflow, I’d love to hear about them.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 4
Badge +2

regarding the comment above.… um…. ok. yeah so anyway...

 

@nicksimard thank you for this post! i appreciate the detail. I’m about to try this out with airtable first then i have some other ideas in mind. Eg we use Linear for issue tracking and I think I may be able to leverage this workflow to create new issues and tag them at the same time.

Userlevel 4
Badge +2

Woot. I did it. This is fantastic. I also took your suggestion and created a TextExpander snippet (,,ci for Create Issue) so now, I summon Alfred, type issue then trigger my snippet. I enter Title, a Description and then either include the word Backlog or Triage for Status.

My TextExpander snippet automatically moves the cursor inside the first pair of parenthesis so that I can start typing the Title right away. Also, the snippet portion for Status starts off like ‘s(Backlog Triage) so all I have to do is delete the one I don’t want. Then hit enter on my keyboard.

In order to inject some logic into my Zap I added a step after the webhook catch to create a Lookup Table that has two entries, one for Backlog, the other for Triage. I hard coded the status values from Linear here so that depending on what I typed into Alfred will determine if the issue is assigned to my Backlog or the native Triage project in Linear for my teammates to see as well.

Thanks again for the instructions and inspiration, @nicksimard.

Userlevel 7
Badge +11

Hey @donovanwatts!

We somehow missed that comment. I’ve deleted it, but for anyone who’s curious.

Named Variables are powerful, but often overlooked. Like in this article as well:

You might even be able to combine Alfred + TextExpander (or maybe Alfred’s own snippets) in this workflow, for things that are a hassle to type out :)

Userlevel 7
Badge +11

@donovanwatts That’s awesome! Glad I was able to inspire you to play around with this :)