Hier ein Denkanstoß:
[image: 1663246018944-screenshot-2022-09-15-at-14.46.31-resized.png]
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="m)|oUe[sqTP=8b)u2jk5">entryList</variable>
<variable id="4pIH7/s#%Wo9zbOUX*$@">entry</variable>
<variable id="oICjxGGUcG3zv?}h#t4X">eventName</variable>
<variable id="I~`9RRDqU=H/w68%c/qz">startDate</variable>
<variable id=":1PbqQeKYUbO(n/BRO^N">endDate</variable>
</variables>
<block type="schedule" id="(u5@NT3Tz9IO|X~i*8mV" x="13" y="63">
<field name="SCHEDULE">0 6 * * *</field>
<statement name="STATEMENT">
<block type="variables_set" id="77h?.-G/:4J@e}sFSxs(">
<field name="VAR" id="m)|oUe[sqTP=8b)u2jk5">entryList</field>
<value name="VALUE">
<block type="get_value" id="zW}Zry1U}(Wf;{gQA1L3">
<field name="ATTR">val</field>
<field name="OID">ical.0.data.table</field>
</block>
</value>
<next>
<block type="controls_forEach" id="jytdrpeTmOs;n`8;`H+(">
<field name="VAR" id="4pIH7/s#%Wo9zbOUX*$@">entry</field>
<value name="LIST">
<block type="variables_get" id="d*Z0x_|UFP8t*%bP:xAM">
<field name="VAR" id="m)|oUe[sqTP=8b)u2jk5">entryList</field>
</block>
</value>
<statement name="DO">
<block type="variables_set" id="ocPJ#uDq5eSx@,MnV!GS">
<field name="VAR" id="oICjxGGUcG3zv?}h#t4X">eventName</field>
<value name="VALUE">
<block type="get_attr" id="+N|T8w$6;WT6^Pm`GO]8">
<value name="PATH">
<shadow type="text" id="WSh68r$0#wJV/LH,{dkT">
<field name="TEXT">event</field>
</shadow>
</value>
<value name="OBJECT">
<block type="variables_get" id="S+ZzQYJ#s~l?G9^^O,b?">
<field name="VAR" id="4pIH7/s#%Wo9zbOUX*$@">entry</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="17F#-T3B=)yaa.81gv:_">
<field name="VAR" id="I~`9RRDqU=H/w68%c/qz">startDate</field>
<value name="VALUE">
<block type="convert_from_date" id="E1-MSgEmzxU1|2)(iYO.">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
<value name="VALUE">
<block type="get_attr" id="u]/:3?#z@NFY=|QM#CW4">
<value name="PATH">
<shadow type="text" id="2Xfsu5T#%=zQxfetO*],">
<field name="TEXT">_date</field>
</shadow>
</value>
<value name="OBJECT">
<block type="variables_get" id="nox26:oNjh]V3Nn^f5:,">
<field name="VAR" id="4pIH7/s#%Wo9zbOUX*$@">entry</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="N$WqvSKoG2zh3tWTWqec">
<field name="VAR" id=":1PbqQeKYUbO(n/BRO^N">endDate</field>
<value name="VALUE">
<block type="convert_from_date" id="|iT1uzYqC#,z#CR^fu_p">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
<value name="VALUE">
<block type="get_attr" id="0lSUp7x}wDJK#Yi8@leW">
<value name="PATH">
<shadow type="text" id="]TA)7wTUdI/8;b$HV0_i">
<field name="TEXT">_end</field>
</shadow>
</value>
<value name="OBJECT">
<block type="variables_get" id="E@wy3sEUn[{.$W}4GIFk">
<field name="VAR" id="4pIH7/s#%Wo9zbOUX*$@">entry</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="controls_if" id="=T2imHf)nyUHnJ)%%a;=">
<value name="IF0">
<block type="logic_compare" id="!geuopHC=7rn9OKwbe:B">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id=",Yfj:zixJvY5$3K;G(iL">
<field name="VAR" id=":1PbqQeKYUbO(n/BRO^N">endDate</field>
</block>
</value>
<value name="B">
<block type="time_get" id="QfGEIzD.Waf,|P)qAa2v">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="debug" id="-M0|/!*@$xxK:4RQ]2!/">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="3HUh/JJuMQd`ZWH~~|,$">
<field name="TEXT">test</field>
</shadow>
<block type="text_join" id="kwckHL#3Ms5?mdb}yT8]">
<mutation items="6"></mutation>
<value name="ADD0">
<block type="text" id="/M}qTasAo@VmF|-PrkMc">
<field name="TEXT">Vermietung beendet: </field>
</block>
</value>
<value name="ADD1">
<block type="variables_get" id="eUqG%))(Y{;q3Vz57dVA">
<field name="VAR" id="oICjxGGUcG3zv?}h#t4X">eventName</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="=,kZ(8,4|q.IZikCk`ZL">
<field name="TEXT"> - Vermietet </field>
</block>
</value>
<value name="ADD3">
<block type="convert_from_date" id="^81T.Oz8Cu^3(8hs)`,5">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
<field name="OPTION">custom</field>
<field name="FORMAT">TT.MM.JJJJ SS:mm</field>
<value name="VALUE">
<block type="variables_get" id="^2h}V?f]G~+chVyEwsnx">
<field name="VAR" id="I~`9RRDqU=H/w68%c/qz">startDate</field>
</block>
</value>
</block>
</value>
<value name="ADD4">
<block type="text" id="*/O~,IA=HIMf-MxvxelL">
<field name="TEXT"> bis </field>
</block>
</value>
<value name="ADD5">
<block type="convert_from_date" id="ZqQD0O`-R*4d-))f)#B,">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
<field name="OPTION">custom</field>
<field name="FORMAT">TT.MM.JJJJ SS:mm</field>
<value name="VALUE">
<block type="variables_get" id="-JP`bfgZVEZAzKDC/DsQ">
<field name="VAR" id=":1PbqQeKYUbO(n/BRO^N">endDate</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="L47vBG=1Iz.|MfWa1pF+">
<field name="COMMENT">... Lade-Stände im Zeitraum ermitteln und Mail versenden</field>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</xml>