Dynamic Slack DM using Scripting Block via Automations

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 Likes