Nodes start dates different than trigger

Hi all. My workflow has a Google calendar event with a specific title as the trigger. The nodes that are being triggered create Google Calendar events and Google Tasks entries, most of which need to be on different dates or times than the original trigger event. I have added the dateTime string from the trigger Start object to the node’s due date for the event or task being triggered, but I don’t know how to add the specific instructions to the due date so it will occur on a different date or time than the original event. I would appreciate anyone’s help!

Hi @timschwindt Welcome to the n8n community! :tada:

Could you explain a bit more? I don’t think I understand it correctly.

An example workflow maybe?

1 Like

Hi @mcnaveen. My trigger is a Google Calendar event that I create. Every time I create an event with a specific title, I want it to trigger a series of Google Tasks, some of which need to be on dates earlier than the original event, some of which need to be on the same date, and some of which need to be on later dates. For the ones on the same date, I just add the dateTime string from the trigger’s Start object into the Due Date field of the task, and it works. But for the ones that need to be on different dates, I obviously need to add further code in order to instruct the task to be on an earlier or later date than the original event, and I don’t know what code to add to the dateTime string code. Thanks!

1 Like

Hi @timschwindt

Thanks for explaining further. So what you actually want is to set x days before or after the trigger date in specific tasks

In that case do you have that x days? I mean the count of how many days it should be?

Yes I know exactly how many days before or after the original event that each event or task needs to be: 2 months before, 12 days before, 5 days before, 3 days before, 2 days before, same date (which isn’t an issue), 30 minutes after, 2 days after, and 14 days after. All of these are Google tasks, except for the one that is 30 minutes after, which is a Google Calendar event. Thanks!

1 Like

Thanks for the confirmation. This can be done in Two Ways.

  1. Date and Time Node
  2. Code Node

In this example workflow you can see how I implemented in both.

Hope this helps.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.