Skip to main content
Best answer

Send Slack Message with multiple @mentions

  • February 11, 2023
  • 5 replies
  • 1128 views

randyperrone

I have a comma separated string of email addresses which can be any number of addresses, and I want to:

  1. For each of them get the user id by Email
  2. Use the id for each and make an @mention for each of them in the same slack message and send to slack.

I’m not sure if this is possible without being extremely hacky.  I have this working for one user, but can’t seem to find how to add for multiple users.  Anyone have any thoughts?  Thanks

Best answer by Troy Tessalone

@randyperrone 

You can redact sensitive info in screenshots if needed.

 

Try using Formatter > Utilities > Line Items to Text

 

A Code step can be used:

 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • February 11, 2023

Hi @randyperrone 

Good question.

To loop thru the list you can use the Looping app: https://zapier.com/apps/looping/help

You may need to use Storage to aggregate all the @mentions: https://zapier.com/apps/storage/help


randyperrone
  • Author
  • Beginner
  • February 13, 2023

Hi @randyperrone 

Good question.

To loop thru the list you can use the Looping app: https://zapier.com/apps/looping/help

You may need to use Storage to aggregate all the @mentions: https://zapier.com/apps/storage/help

Thanks for your reply! I think the biggest issue is getting the message correct to send to slack once I have all of the id’s ready.  I’m using Send Channel Message in Slack and I know slack mentions are formatted as such <@id> but how to add in any number of those in the text box one after another?  Thanks again!


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • February 13, 2023

@randyperrone 

We’d need more context about how your Zap steps are configured in order to evaluate and advise, thanks.

Please provide screenshots.


randyperrone
  • Author
  • Beginner
  • February 13, 2023

I can’t share the screenshots due to privacy.  I guess more precisely what I’m asking is if there is a way to loop through line items or comma separated text and add text to it.  So say I have apple, orange, pear and want it to loop through and add <@ at the beginning and > at the end so it looks like: <@apple>, <@orange>, <@pear> is that possible?  That would solve the issue.  Thanks!  


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • Answer
  • February 13, 2023

@randyperrone 

You can redact sensitive info in screenshots if needed.

 

Try using Formatter > Utilities > Line Items to Text

 

A Code step can be used: