Hello All - new to n8n and still trying to figure it out, but im slowly getting there. I am creating a workflow where I want to send an email to myself to give me an outlook of what my calendar looks like for the. In the screenshot attached, you can see that I have some events in my input, but when it goes through the AI agent, it says that my calendar is empty. Can anyone know where I went wrong?
Im new to this, so any kind of help is appreciated.
Hey @chrisagbalog hope all is well and welcome to the community.
It would be helpful if you were to embed your workflow here for us to look at, and ping the output of the code node, so that we have the data you have to test on.
Thanks @jabbson! Hope I did it right. My goal for this workflow is to have my calendar pulled and an email sent daily to let me know what I have on my calendars for that day. I think it looks messy. Im still figuring this all out
One thing that stands out is that you have a number of different calendar nodes, identically configured. I would combine them into an array of calendar IDs and feed to a single calendar. Something like this:
Hi @jabbson - I tried your workflow and I am getting email that is making up events or saying there is no events. Also, I would like to see it list all of my events for that day, but the input for the AI agent is showing events for the week, it looks like. Any feedback?
The week instead of the day comes from the configuration of the calendar node
now + 1 week
gives you a week worth of events. Try {{ $now.plus({ day: 1 }) }}
if you need only a single day.
As for the making up events, this is now a matter of fiddling with the prompt.
I asked it not to make up events, see if it helps in any way:
This is what it did for me:
from this calendar:
Hi @jabbson - Im still getting a no events note, event though I have a test event entered. Can I see what your prompt looks like? Could I be entering events wrong in my google Calendar? What does your Google Calendar parameters look like? There must be something I am missing. Will embed my code. I feel like I am so close to getting this to work
it is in the workflow I’ve embedded above, here it is again, on it’s own (it’s slightly modified yours):
You are an AI Assistant responsible for generating a daily HTML summary of calendar events based on input data. Your output should be a complete HTML document and nothing else. The input will be a JSON array of calendar events, each including a summary, start and end date and time, it’s creator, organizer, and possibly a location. Do not make up of fabricate events, do not include duplicate events.
Your task is to:
- Greet the user with an energetic opening message.
- List all events in chronological order.
- Each event should include: event time, title, and location.
- Add an appropriate emoji based on the type of event (e.g.,
for calls,
for office,
for home,
for parties,
for lunch,
for focus time,
for work sessions).
- If there are overlapping events, include a clear warning with a
icon.
- If no events are present, display a positive message like “No meetings today! A perfect day to focus on what matters most.
”
After the list:
- Add one interesting fact or actionable tip related to finance, professional growth, or personal development.
- Include a “Word of the Day” with a short definition.
- Add a motivating sign-off, signed by “Your AI Assistant.”
Use simple HTML formatting:
- Soft background color (#f9f9f9), clean font (Arial or sans-serif), and plenty of white space.
- Sections should have rounded corners and padding for readability.
- Ensure it looks great on both mobile and desktop.
Add a relevant energetic GIF via a public URL (from Giphy or Tenor) at the top or bottom of the summary using an
tag.
The output must be pure HTML code—do not include explanations or any other text. Do not wrap the output in triple backticks (```) or include any markdown formatting or language tags like html. Return only raw HTML code as plain text.
My google calendar parameters as default as they get - I don’t use this account’s calendar, it was untouched and completely empty.