Feb 04, 2021 03:43 PM
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.
Solved! Go to Solution.
Feb 05, 2021 02:48 PM
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.
Feb 05, 2021 04:33 AM
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?
Feb 05, 2021 08:16 AM
You’re right, that is what I tried. Here is the automation message in AT (just the id in the field, nesting hard-typed):
and here is the output in slack:
If I attempt to put the nesting into the field itself, then the output is completely blank.
Feb 05, 2021 09:18 AM
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.
Feb 05, 2021 09:45 AM
You’re totally right, mine is blank:
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:
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.
Feb 05, 2021 10:50 AM
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.
Feb 05, 2021 02:48 PM
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.
Feb 05, 2024 08:55 AM
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!
Apr 23, 2024 10:04 PM
@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!
Apr 24, 2024 07:21 AM
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?