Gmail Module sending multiple emails instead of one

I am trying to create a report on all of our items in our Shopify store that have an inventory of less than ten and then send that in one email. However, it is sending me an email for each low inventory item instead of aggregating. Chat GPT told me to put several aggregators in the scenario and to have the Gmail module connected to the last one and not the iterator. It seems like too many aggregators but it was still doing that when I only had one as well.

Any ideas?

Thanks for your help!

Here is the setup:

Hey @SF_School , the issue is quite obvious. The shopify “search for a product” module acts like an iterator. So it loops through the rest of the modules depending on how many items the spotify module returns.

Thanks for pointing that out! I took away the iterator and now it only sends one email but it only lists one product in that email which is the first product listed. I keep getting told by Chat GPT to select an array to aggregate in the Text Aggregator and make sure it is set to the array output from the Array Aggegator but I see nowhere in the Text aggegator settings to select that. Any ideas?

Here is how it looks now:

You don’t need the text aggregator

After the aggregator(not the text aggregator), add an iterator then map the data from the aggregator into the iterator.

OK I did that but I am still only receiving an email with one item.

I’m curious as to why an iterator would be required after an array aggregator. They seem to be doing the opposite things and would just cancel each other out.

Hey there,

you are trying to search for products on Shopify and send a summary email right? You only need the text aggregator for this. Delete all the other iterator and aggregators. Search for the products you need, filter afterwards, then text aggregator with the Search module as the source, then send the email.

1 Like

That worked! It is now giving me a whole list of products with low inventory in one email. Thank you!

I am hoping to organize the list of our Shopify items by date of last time they were purchased. I added a Search Orders module after the Search for Product module and was hoping to just have that go straight into a text aggregator but that doesn’t seem to be working.

Any ideas?

1. Which was the most helpful post in this thread?

The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep this forum organised. :folded_hands:

This marks the topic as solved, so that others can:

  • save time when browsing the latest activity on the forum, and
  • quickly jump to the solution in this topic

To do this, simply click the checkbox at the bottom of the post that is the most helpful in answering your question.

a screenshot of post menu options at the bottom of each post

:link: Here’s a magic link to a list of your other unsolved topics: status:unsolved

2. Have you learnt something new?

Do bookmark this topic so you can easily find and return to this topic in future.

a screenshot of bookmark link at the bottom of the topic

:link: Here’s a magic link to a list of your bookmarks /my/activity/bookmarks!

3. Have a different/follow-up question? Start a new topic.

Creating a new topic for each question makes it easier for others with the same problem to search for answers. You are also more likely to receive help sooner as new topics are displayed first on the forum’s “new” page

Hope this helps! If you are still having trouble, please start a new thread.

— @samliew

What is the search orders module searching for at the moment? And what output is it giving?

I assume you have it searching for orders on the specific product, you will have to check the shopify documentation on how to properly format the query, but I suppose you can tell it to sort them by date in descending order (or newest first) and grab only the first one.