Dynamic Slack user tagging

I have a list of people linked to projects in my Airtable base and I’m attempting to have the slack messages from my automation tag the user associated with the record matching the conditions when the automation runs.

I’ve tried inputting the slack id as a look-up from the roster table, I’ve made a formula that concatenates it into a string, I’ve tried it both as id (with <@ and > added in message text) and <@id> in the methods above, but none of this results in a proper tag. The only tag I’ve been able to make work is when I hard-code one into the automation message, but that obviously isn’t dynamic. Has anybody had success here?

FWIW; whenever I try to include the field with the Slack id into the message, it doesn’t show up in Slack at all, so I know at some point it’s getting filtered out.

Hi @Alyssa_Buchthal!

When you say “ID”, do you mean the Slack username or the unique Member ID? I was surprised to find out that you can’t just send @[username] from Airtable to tag users in Slack.

Buried in Airtable documentation (Send a Slack message Action – Airtable Support) is a hint on how to accomplish this:

Once you find each user’s Member ID, you should be able to add these to your Roster table, and should be able to tag team members using the format <@[Member ID]>.

It sounds like you may have already tried this though. If you’ve tried this and it doesn’t work, what does the output look like in Slack?

You’re right, that is what I tried. Here is the automation message in AT (just the id in the field, nesting hard-typed): image

and here is the output in slack: image

If I attempt to put the nesting into the field itself, then the output is completely blank.

Hmm that’s very odd. I just tested it again and it worked for me. Maybe a silly question, but when you add the Trigger value above, are you able to see one of the Slack Member IDs from the trigger test before you add the variable? Picture included to show what I mean:


When I test the automation out with a blank variable, I see the same output as you (<@>). Your syntax above looks correct to me, so I’m thinking for whatever reason it’s not reading the variable you’ve selected, or is reading it as blank.

You’re totally right, mine is blank: image

I have no idea why. It’s a look-up field from a different table, but the field type in that table is just single line text, and the look-up is displaying in the table just fine: image

Is this potentially a bug? I also tried creating a formula that concatenates it into a string in case the look-up was messing with data-typing, but that is also blank in the trigger preview despite showing up in the table.

Weird, mine is a lookup field too. I know initially they didn’t support lookup fields in automations, but you could usually get around this using a Formula field exactly as you described.

I would assume it was a bug, and try workarounds as such. Delete the lookup field and recreate it. Create a formula that is nothing but {Lookup Field}.

Another test to try - retest your automation trigger, and then click on “Test ran successfully” to see more details. In the Airtable Record details below, click on Field Values to expand all the fields found by the trigger. See if you can find the Member ID this way. If so, you’ll know Airtable if finding the data correctly at least. At that point you could narrow down that the error was in the automation action, not the trigger.

Solved! We think it might be a permissions issue; my coworker was able to copy my exact automation and it ran fine for him. I’ll find out if our permissions are different and update here if I get a further answer.

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.