Retrieving events from Google Calendar and posting to Discord if there are any

Hi all,
This has been driving me nuts and the AI tool does not seem to resolve it at all.

I have a very simple scenario:

  • I get today’s date
  • Add 1 day to it and set the time to 00:00.
  • I then set another date to tomorrow and 23:59:59 so I cover the entire day.
  • I check a Google Calendar for any events happening tomorrow
  • I post a message to Discord that simply says “We have these events planned tomorrow” with the items from the Calendar widget.

The dates are fine, the calendar connection is fine, it works when I find events and posts a single message as I would like. However, when there are NO events, it still posts the “We have these events planned tomorrow:” and then nothing.

If the Calendar module doesn’t return anything, I don’t want it to continue onwards and post to discord.

I have tried filters that check {{4.items}} exist, {{4.length}} > 0, Description != empty and all sorts, but no matter what, it ALWAYS continues to post an empty message to Discord.

What am I missing/doing wrong?



The Text Aggregator and Array Aggregator modules will run at least once if “Stop processing after an empty aggregation” is not checked. That’s why an empty message is being sent to Discord.

If you don’t want to send an empty message, go to the show advanced settings of the text aggregator and click yes.

I hope by doing this your issue will be resolved.

Hi @Rich2 Welcome to the community!

If you simply want to use filters, set it up like this.

And after text aggregator like this :

Combining both filters, It will fix the issue. If returned events are 0, Total number of Bundles in output will be 0, so it won’t pass ahead from filter except as aggregator(any aggregator) is ahead, it will move further. Like @RBalani said you can use tick box option to stop or continue execution in case of empty aggregation. but when you add 1 more check filter for text aggregator values exists or not, it will stop processing further if no value is present. As most people don’t’ use advanced option in aggregator such common mistakes occur.

I hope this helps!

Best,
@Prem_Patel

The advanced setting change fixed it but now I have another issue. What I want is basically what is in this guide/blog here: https://www.make.com/en/blog/how-to-add-a-calendar-to-discord

However, my messages look nothing like that and come out like so:


Why does it have all that HTML in it? Is there a way to remove it and get it to keep the formatting of the description field? I put text into the description field without formatting yet it still comes out like that.

The tutorial/blog post is really not handy for telling you how to get the outputs you want. It shows a screenshot of the scenario and that’s it, doesn’t give anyone much to go off who has never used it before.