# \[TUTORIAL\] Trigger a flow using calendar events

**URL:** <https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017>\
**Category:** Tutorials\
**Created:** [August 26, 2020, 11:37am UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017 "2020-08-26T11:37:14Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![runely](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/runely/32/28153_2.png) [@runely](https://community.homey.app/u/runely)\
**Post date:** [July 2, 2022, 2:54pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/21 "2022-07-02T14:54:08Z")

</div>

You can use the “Event ends” trigger and a Logic card in the AND section to check if `Title` of the ended event is the one you want and then do whatever you want in the Then section

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [July 2, 2022, 3:29pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/22 "2022-07-02T15:29:54Z")

</div>

Why don’t you use one of these trigger cards ( **When…** section):  
– _ **Event starts** _  
– _ **Event starts from xxx Calendar** _  
– _ **Event starts in x Minutes/Hours** _  
– _ **Event ends** _ (as Rune already suggested)  
– _ **Event ends in x Minutes/Hours** _  
in combination with the Title-Tag in the **And…** section instead of _ **Elke 16 Minuten** _?

Btw, I would realize that with a geofencing app like [Location and Presence](https://homey.app/en-us/app/nl.scanno.owntracks/Location-and-Presence/) or [Connect Life360](https://homey.app/en-us/app/com.cyclone-software.life360/Connect-Life360/). You can also use an smartphone geofencing app which supports web hooks. Then you need no additional Homey app.

---

<div class="post-metadata">

**Author:** ![BertSP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bertsp/32/33015_2.png) [@BertSP](https://community.homey.app/u/BertSP)\
**Post date:** [July 2, 2022, 3:48pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/23 "2022-07-02T15:48:17Z")

</div>

Oke, i can try that indeed, i hope it works…  
Thanks for helping.

---

<div class="post-metadata">

**Author:** ![BertSP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bertsp/32/33015_2.png) [@BertSP](https://community.homey.app/u/BertSP)\
**Post date:** [July 2, 2022, 3:53pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/24 "2022-07-02T15:53:06Z")

</div>

Thanks for helping me, it’s a lot of info…  
I first try Rune his idea if that works for me.

Geofencing is not what i’m looking for, the flow already have to be active when arriving.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [July 3, 2022, 6:37am UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/25 "2022-07-03T06:37:30Z")

</div>

> [@BertSP](#):
>
> the flow already have to be active when arriving.

Ok, that’s the reason why you trigger the flow every 16 minutes?

Just for information. With the mentioned geofencing apps you can create several geofencing location, e.g. one for home, one for Berlin Airport and one for Amsterdam Airport. And with these locations you can do something like that:

On the way to Berlin  
_ **When…** _  
– Enter Geofence **Berlin Airport**  
_ **And…** _  
– Event **Berlin Meeting** is ongoing (or Event **Berlin Meeting** starts within x minutes/hour)  
_ **Then…** _  
– Turn light on/off (or whatever)

On the way home  
_ **When…** _  
– Enter Geofence **Amsterdam Airport**  
_ **And…** _  
– Event **Berlin Meeting** is ongoing (or Event **Berlin Meeting** ends within x minutes/hours)  
_ **Then…** _  
– Turn light on/off (or whatever)

---

<div class="post-metadata">

**Author:** ![j\_wak](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/j_wak/32/56668_2.png) [@j\_wak](https://community.homey.app/u/j_wak)\
**Post date:** [September 7, 2022, 8:19am UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/26 "2022-09-07T08:19:31Z")

</div>

Getting issues trying to change date format.  
Can’t use weekdays.  
Input field convert small letters to capital letters.  
Anyone else experiencing this too?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 7, 2022, 1:57pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/27 "2022-09-07T13:57:26Z")

</div>

Confirmed, just tried:  
DD/MM/YYYY works  
DDD/MM/YYYY doesn’t  
DDDD/MM/YYYY doesn’t

---

<div class="post-metadata">

**Author:** ![runely](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/runely/32/28153_2.png) [@runely](https://community.homey.app/u/runely)\
**Post date:** [September 7, 2022, 7:18pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/28 "2022-09-07T19:18:13Z")

</div>

This is a bug. However, you have entered an invalid pattern considering the pattern it’s validated with.

This setting is not documented good enough, almost not documented at all 😬

I have fixed the bug, and will release a new version soon, aswell as better documentation!

---

<div class="post-metadata">

**Author:** ![j\_wak](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/j_wak/32/56668_2.png) [@j\_wak](https://community.homey.app/u/j_wak)\
**Post date:** [September 7, 2022, 7:41pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/29 "2022-09-07T19:41:58Z")

</div>

Do you mean “DDD, DD/MM” is not valid?

I thought it fit the criteria hehe, cause I figured I would get better info to know an event’s weekday and date more than a bunch of numbers. More specifically I would like to get the following “Thursday, 05 September”

But nonetheless, thanks, and appreciate your time.

---

<div class="post-metadata">

**Author:** ![runely](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/runely/32/28153_2.png) [@runely](https://community.homey.app/u/runely)\
**Post date:** [September 7, 2022, 7:59pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/30 "2022-09-07T19:59:05Z")

</div>

Yes, that is invalid!

Weekday must be in lowercase, either as **ddd** or **dddd**.  
Furthermore, _comma_ is actually not allowed as a separator between weekday and date as of now, but i will add it to the next release!

The next release will contain better documentation for the **Date format** and **Time format** sections!

For now, this is what’s allowed / working:

- _DD.MM.YY_ (with **/** , **.** or **-** as separator)

- _DD.MM.YYYY_ (with **/** , **.** or **-** as separator)

- _MM.DD.YY_ (with **/** , **.** or **-** as separator)

- _MM.DD.YYYY_ (with **/** , **.** or **-** as separator)

- _YY.DD.MM_ (with **/** , **.** or **-** as separator)

- _YYYY.DD.MM_ (with **/** , **.** or **-** as separator)

- _YY.MM.DD_ (with **/** , **.** or **-** as separator)

- _YYYY.MM.DD_ (with **/** , **.** or **-** as separator)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 7, 2022, 9:13pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/31 "2022-09-07T21:13:32Z")

</div>

> [@runely](#):
>
> Weekday must be in lowercase, either as **ddd** or **dddd**

That’s in the examples, but when you enter ddd it is converted to DDD, and that’s invalid… and it cannot be changed into ddd again 😉

---

<div class="post-metadata">

**Author:** ![runely](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/runely/32/28153_2.png) [@runely](https://community.homey.app/u/runely)\
**Post date:** [September 7, 2022, 9:34pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/32 "2022-09-07T21:34:37Z")

</div>

Yes, I know. That is one of the bugfixes in the next release. And also why I didn’t mention it in the list in the previous post 😉

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 7, 2022, 9:42pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/33 "2022-09-07T21:42:26Z")

</div>

Ah I see. I read your sentence a bit like we entered the wrong `ddd` 😉

---

<div class="post-metadata">

**Author:** ![runely](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/runely/32/28153_2.png) [@runely](https://community.homey.app/u/runely)\
**Post date:** [September 9, 2022, 10:04am UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/34 "2022-09-09T10:04:44Z")

</div>

I just released **v1.6.0**. This should make it work better. @j_wak , could you install this version and let me know how it turns out?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/6/a66772d339784b06e98629de6776b67766196144.png)

---

<div class="post-metadata">

**Author:** ![j\_wak](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/j_wak/32/56668_2.png) [@j\_wak](https://community.homey.app/u/j_wak)\
**Post date:** [September 9, 2022, 2:23pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/35 "2022-09-09T14:23:54Z")

</div>

Success! Thank you!

Any future plans on implementing/allowing different date formats?

 ![Screenshot_20220909-161702_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/a/0a1694bcfbd0e515e029b082d7d281ac24922ea8.jpeg)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 9, 2022, 3:01pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/36 "2022-09-09T15:01:47Z")

</div>

Yes, thanks!!  
“ddd, DD-MM-YYYY” and “dddd, DD-MM-YYYY” both work

 ![Screenshot_20220909-165627_Signal](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/3/83c1fc26f44c28c5b61a21c428e871491701cb4a.jpeg)

---

<div class="post-metadata">

**Author:** ![runely](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/runely/32/28153_2.png) [@runely](https://community.homey.app/u/runely)\
**Post date:** [September 9, 2022, 3:18pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/37 "2022-09-09T15:18:51Z")

</div>

Any particular date formats you’re missing?  
They must be somewhat pre-approved because the app parses it to find the long and short date format from it.

---

<div class="post-metadata">

**Author:** ![j\_wak](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/j_wak/32/56668_2.png) [@j\_wak](https://community.homey.app/u/j_wak)\
**Post date:** [September 10, 2022, 7:02am UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/38 "2022-09-10T07:02:31Z")

</div>

I get my events spoken out by Sonos, so it gets a bit long with the full date and too much numbers. The optimal end result would be “Thursday, 5 of September”.

So maybe something like **dddd, DD/mm** would result in **Thursday, 05/September**

Is that something possible even?  
I haven’t gotten the chance to experiment with logic conversion/expression yet, maybe it’s possible that way too, don’t know.

---

<div class="post-metadata">

**Author:** ![runely](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/runely/32/28153_2.png) [@runely](https://community.homey.app/u/runely)\
**Post date:** [September 10, 2022, 1:55pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/39 "2022-09-10T13:55:40Z")

</div>

How date/time format was parsed was quite old, actually from when the app first were launched.

So, i have rewritten date/time format to support all tokens (_in any layout_) from **[moment.format](https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/)**

This is released as a test version, could you (preferably more) install it and test if all works as it should, and give me some feedback?

I have tested it and found no problems.

> **[IcalCalendar](https://homey.app/no-no/app/no.runely.calendar/IcalCalendar/)**
>
> Ha full kontroll på planleggingen med Homey

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 10, 2022, 10:07pm UTC](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017/40 "2022-09-10T22:07:19Z")

</div>

Thanks m8, very nice!

it seems to work fine  
 ![Screenshot from 2022-09-10 23-47-42](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/0/b05543e898904787801ec7dda69ac1ba976d7cdc.png)

Formats used:  
`ddd, Do MMMM YYYY`  
`ddd, DD-MM-YYYY`

- With weeknumber  
 ![Screenshot from 2022-09-11 00-13-06](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/6/3632f3fb85fa601b33ddc153c4e5726161d95a62.png)  
`ddd, Do MMMM wo YYYY`

[Previous page](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017.md?page=1)

[Next page](https://community.homey.app/t/tutorial-trigger-a-flow-using-calendar-events/34017.md?page=3)
