@ben1983
der obere block wird getriggert, wenn in der telegram-instanz eine neue message-id gekommen ist. der neue wert wird komma-seperated in einen dp geschreiben
im zweiten block wird durch einen dp getriggert. ist der true wird eine liste/array aus den message-id-wert-dp erzeugt. die liste wird in einer schleife durchlaufen. so werden dann alle message-id an den request angehängt und im verlauf gelöscht
Spoiler
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="`3n?sYfBJf8JN+.HPP8[">myDB</variable>
<variable id=":?Zwz2%8-bi@z;1_N$0q">myList</variable>
<variable id="++Lu#AN=f4!i}^i_zNK1">i</variable>
<variable id="C#nQ@I{NO9%WeXi;cD]}">result</variable>
</variables>
<block type="on" id="e`#*?#:3{X{trx!p[xpE" x="187" y="38">
<field name="OID">telegram.1.communicate.botSendMessageId</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="./s9ck!m5Z]L^G]4R-4y">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="~,K[:}?6}JP9.Egr(APt">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="LJ?|K5$Q/Oq0|Y2}1)~c">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.TelegramDeleteDaten</field>
</block>
</value>
<value name="B">
<block type="text" id="j=!qX9K(3Id/EVUSX=-M">
<field name="TEXT"></field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="d8N(-Z`zfCmwX_pfr)|E">
<field name="VAR" id="`3n?sYfBJf8JN+.HPP8[">myDB</field>
<value name="VALUE">
<block type="text_join" id="NRF]F,He0!y^z.vh$iNy">
<mutation items="1"></mutation>
<value name="ADD0">
<block type="on_source" id="of!c4wfre)*TkocLT_7Z">
<field name="ATTR">state.val</field>
</block>
</value>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="elr`XuY.tDc^Rh4:INp)">
<field name="VAR" id="`3n?sYfBJf8JN+.HPP8[">myDB</field>
<value name="VALUE">
<block type="text_join" id="U7!0a4xD#qx^q}K;w-RT">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="get_value" id="S$uvgf_|!e7M5fjjr!}{">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.TelegramDeleteDaten</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="qJYO5u{#MTrL4*m007eV">
<field name="TEXT">,</field>
</block>
</value>
<value name="ADD2">
<block type="on_source" id="h@H*FDN=@]pcQbDMxwc6">
<field name="ATTR">state.val</field>
</block>
</value>
</block>
</value>
</block>
</statement>
<next>
<block type="debug" id=".xY:Q^wew|V=imC!sX,S">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="Y^fmwrbR~T!F=W!jeLV#">
<field name="TEXT">test</field>
</shadow>
<block type="variables_get" id="S((:c=kSc0?w%fIrU$)Z">
<field name="VAR" id="`3n?sYfBJf8JN+.HPP8[">myDB</field>
</block>
</value>
<next>
<block type="control" id="$pIi:y[^!_PG)Vc.4pxU">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.TelegramDeleteDaten</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="n@)!h$-Cqc8I%LFj1%06">
<field name="VAR" id="`3n?sYfBJf8JN+.HPP8[">myDB</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="on" id="cvGaWg.$M6P;U@2iy53z">
<field name="OID">0_userdata.0.TelegramDeleteExec</field>
<field name="CONDITION">true</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="variables_set" id="/l!BqzXtm#$:fp@QN16!">
<field name="VAR" id=":?Zwz2%8-bi@z;1_N$0q">myList</field>
<value name="VALUE">
<block type="lists_split" id="c{P87Se7(-*pwA+pK+aX">
<mutation mode="SPLIT"></mutation>
<field name="MODE">SPLIT</field>
<value name="INPUT">
<block type="get_value" id="7Iq+[PxUN^iu]rp#Dg06">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.TelegramDeleteDaten</field>
</block>
</value>
<value name="DELIM">
<shadow type="text" id="k8-+3g1~=FoU|*sj5+F3">
<field name="TEXT">,</field>
</shadow>
</value>
</block>
</value>
<next>
<block type="controls_forEach" id="%j!M!)QHu95MS!#HeNPw">
<field name="VAR" id="++Lu#AN=f4!i}^i_zNK1">i</field>
<value name="LIST">
<block type="variables_get" id="=ne~a8+KKnEAdyqGqNr@">
<field name="VAR" id=":?Zwz2%8-bi@z;1_N$0q">myList</field>
</block>
</value>
<statement name="DO">
<block type="request" id="qeVIqQ-~PDiw2%c$X)OQ">
<mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
<field name="WITH_STATEMENT">TRUE</field>
<field name="LOG"></field>
<value name="URL">
<shadow type="text" id="t+-uaZ@!``7RVJJUI/L#">
<field name="TEXT">text</field>
</shadow>
<block type="text_join" id="wrij{69d#t~Grd]i,y;g">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="9WAV_bPTrb?+nVASm(qW" disabled="true">
<field name="TEXT">https://api.telegram.org/bot1xxxxxxxxxccFuk_ksZ1b7EhkNMpfyi5pyctl8MQ/deleteMessage?chat_id=989yyyyyy&message_id=</field>
</block>
</value>
<value name="ADD1">
<block type="variables_get" id="=Epl.G^(%vm#HVdFef.W">
<field name="VAR" id="++Lu#AN=f4!i}^i_zNK1">i</field>
</block>
</value>
</block>
</value>
<statement name="STATEMENT">
<block type="debug" id="!k6n[{0p6595d*Byj/.4">
<field name="Severity">warn</field>
<value name="TEXT">
<shadow type="text" id="bWartkO9L[dEdp$i!3zT">
<field name="TEXT">test</field>
</shadow>
<block type="variables_get" id=")lwJtWn[Ktk-xV6KnAX:">
<field name="VAR" id="C#nQ@I{NO9%WeXi;cD]}">result</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
<next>
<block type="control" id="QOmg(3zU.z[{5wSXPN@r">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
<field name="OID">0_userdata.0.TelegramDeleteExec</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">2</field>
<field name="UNIT">sec</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="l#GLw~-Yrm5FO@$w~dl#">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="control" id="c/m6Es?I@{}=kd_JJcxd">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
<field name="OID">0_userdata.0.TelegramDeleteDaten</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">5</field>
<field name="UNIT">sec</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="text" id="yi+v0B?~E_Ws*O41q7;:">
<field name="TEXT"></field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</xml>