Help

Dynamic Slack user tagging

Topic Labels: Integrations
Solved
Jump to Solution
5895 9
cancel
Showing results for 
Search instead for 
Did you mean: 
Alyssa_Buchthal
7 - App Architect
7 - App Architect

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.

1 Solution

Accepted Solutions

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.

See Solution in Thread

9 Replies 9
Nick_Dennis
7 - App Architect
7 - App Architect

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:
Screenshot 2021-02-05 072336

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:

airtable-slack-troubleshooting

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.

Nick_Dennis
7 - App Architect
7 - App Architect

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.

Hi Alyssa! I am writing to you because you're so far the only person in the community who is possibly setting up slack and airtable the same way as I need it. Before posting a question of my own, I was just wondering if you could explain more about the permission issue that solved the automation? It might not even be my issue, but worth a shot if it could help it work! 

Was it permission from Slack or Airtable? Would appreciate you getting back to me, thank you!

@biancamari If you find the solve PLEASE tag me. I have tried every work around and my Slack mentions have all shown up blank. Driving me nuts!

@Alyssa_Buchthal @Nick_Dennis 

Sorry I didn't see your original question! We discovered it was just a glitch with the editor; once I duplicated the automation it worked just fine in the copied version for me. @NewlyAutomated sorry to not be more help! If you guys select a different test record maybe it shows up then?