Help

Dynamic Slack DM using Scripting Block via Automations

Topic Labels: Scripting extentions
3195 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Nathan_Heironim
6 - Interface Innovator
6 - Interface Innovator

I have a very minimal understanding of JavaScript and cannot write anything from scratch (yet). But I believe I could modify something pre-built.

Elements I already have:

  • Base 1: A base with all of my Slack Workspace members and their Slack ID(s) as well as their DM Links

  • Base 2: Another base of incoming inquiries (that populate from an Airtable form) that also has “Lookup” fields that pull the user’s Slack ID and Direct Message (hyperlink) from Base 1.

Request
Using Airtable Automations I’d like to trigger a scripting block to send a Direct Message to a Slack user in my Slack Workspace (using their <{Slack ID}—Lookup field> in Base 2) when the status of an incoming inquiry is “XYZ”.

NOTE: I am aware that Automations has a Slack notification feature, but you can only post to a channel or (the same) Slack ID each time the automation runs. I’d like the ability to dynamically send a message to a different Slack ID (since I have that data), based on the record info, each time the automation runs.

DOES ANYONE HAVE A SCRIPT I COULD MODIFY? :raised_hands:

2 Replies 2
amber_h
5 - Automation Enthusiast
5 - Automation Enthusiast

Did you find a solution for this? I’m also looking for this. Thank you!

Actually @amber_h , I believe this is now possible (exactly what I requested). I have yet to find time to set it up. But I will be doing that soon. I’ll let you know how it goes.

In the mean time, the feature (In AUTOMATIONS), I recently saw, that seems like it would allow for this is a setting next to the “channel” field of the Slack “Action”. You can choose “Static” or “Dynamic”. The Dynamic setting allows you to use field data from a table. For it to work, you’ll just need to have databased your team’s Slack user IDs in a {single line text} field. Then you can choose that’s days for each record from the “Trigger” conditions.

Hope this helps. :raised_hands: