Skip to main content

Subject:
Unable to send individual Slack DMs with Looping by Zapier

Summary:
I want to send Slack DMs individually, pairing each Slack ID with its corresponding ToDo, but when using Looping by Zapier, all recipients are sent together instead of one by one.

Steps taken:

  1. Used Extract Pattern (Match All: Yes) to get Slack IDs and ToDos (as Line Items)

  2. Used Formatter → Line Itemizer to pair them

  3. Used Looping by Zapier to iterate Slack ID & ToDo pairs

  4. Slack DM step: set “To Usernames” to Loop’s Slack ID, “Message Text” to Loop’s ToDo, Multi Message: No

Issues:

  • Slack IDs are still sent together in one DM (comma-separated)

  • Removing Extract Pattern’s meta info (_matched, etc.) doesn’t help

  • Tried Code by Zapier to clean the arrays, but sometimes values break into individual characters

Questions:

  • How to ensure each Slack ID & ToDo pair is sent in a separate DM when using Looping

  • How to remove Extract Pattern’s meta info and create clean arrays

  • Recommended way to send multiple paired Slack messages without using Looping

Hi ​@nagi1612 

Help us have more info by posting these screenshots:

  • how your Zap steps are outlined
  • how your Zap steps are configured in EDIT mode with the field mappings visible in the CONFIGURE tab
  • how the data is returned from the origin step that you are trying to use in the Looping step

 Thank you for your reply!
Since then, I've stopped the loop processing and been experimenting.  
I want to send the Slack ID and Todo LineItem separately to Slack.  
However, they are all sent together.  
The overall flow is as follows:  
1. Load the JSON text.  
2. Set the Formatter's ExtractPattern to retrieve the three items: assignee, Slack ID, and ToDo.  
3. Send the retrieved data to Slack.
 

This post has been edited by a moderator to remove personally identifiable information (PII). Please remember that this is a public forum and avoid sharing personal or potentially sensitive details.


Hi ​@nagi1612, just checking in! 👋 

Did you manage to get the todos sent to the correct user on Slack?

If not, as you’re wanting to pair each Slack user ID with its corresponding Todo Line Item the original approach you had of using Looping would be best here. I suspect the “preview” version of the Todo Line Item field from the loop was selected in the Slack action. That field would have contained all the values as it provides a preview of all the values for each loop.

The non-preview version of the Todo field would only show a single value for the first loop - when testing in the Zap editor, only the first loop’s data is used:

33a3a1aa757d38d88a13f93c5fb02f6a.png
You can learn more about how to work with loops in Zaps here: Loop your Zap actions

Let us know how you’re getting on, want to make sure you’re all set! 🙂