My scenario is pretty basic: I’m clearing out a Google Sheets document then repopulating it with data from my Knack database. However, I want to send an email at the end of this scenario, and I can’t figure out how to make it send ONE email rather than iterating over every bundle in the previous module.
Could someone give me a hint? I thought another Array Aggregator there might help, but it seems to do the same thing.
Have you tried putting in a text aggregator before the email?
I have done this with a similar scenario when I want to inform a client that several emails have been sent to various people, but I only want the client to get one notice.
In my case I put the aggregator right before sending a Slack message, so yours can go before the Microsoft email.
In the image below I have included a ‘>’ which becomes the grey line in the Slack message (last image) (it’s the equivalent of ‘quote’ in Markdown). I also used a bullet (option/alt 8) to replace using HTML for lists.
This is the result (blurred for privacy)
Bear in mind that there may be a better spot in your scenario to put the aggregator so experimenting might be the way to go. Hope this helps point you at something useful!
I have used the Text Aggregator before for this scenario to send a similar list of details in a single email. I recently switched over to just filling out the spreadsheet.
However, I am not wanting to include any information about the scenario at all in the email. I just want it to send a notification and a link to the file. If I put it before the Outlook module, it still sends an email for every bundle.
It feels like creating a separate scenario to watch the Google Sheet and then send an email might be easier…
I rarely use Googlesheets, so this question might be horribly simple:
How are you grabbing the file link that goes in the email?
Having asked that, yes, creating a separate scenario to watch the Google sheet would be easier.
Or even sending yourself an email that triggers a webhook that starts another scenario …
There is probably someone else on here who is a wizard at Google sheets who’ll give you a more sophisticated response!
It’s just a static link that I want to send. And I think I will just amend this scenario to see if I can set a global variable somehow that tells another scenario to say “yes, you can run now”. Or just run it a few minutes after the actual loading scenario runs
Just use an array aggregator at the end of your scenario, just before the email module. And just select the module that generates the bundles at the source.
Brilliant. I had tried using one but was trying to refer to the “Add a row” step rather than the “Search for records” step. I don’t fully understand the difference, but I will note that trick.
The aggregator aggregate the bundles generated by the source module. This means that all the modules between the source and the aggregator will be executed in sequence, bundle by bundle, then aggregated into an array before moving forward beyond the aggregator.
Having the source “add a new row” does not work because it is not the module generating bundles so there is nothing to aggregate
This is wonderful, thank you - I learned something new too!
How can we know whether a module is on the “generating” or “receiving” side? All modules show both input and output bundles in the execution history.
For me, I conceptually understand that the “Search for records” is the module that’s producing the input data for the “Add a row” module, but the “Add a row” module is also producing output bundles.
@Wes Modules will always create output, to either acknowledge what you did or to provide you with data records.
That logic on searching, creating, deleting etc. is something where you will come in as the architect