Hi @NigelP ,
I would firstly get a collection with some numbers
Clear(colEmailSend);
ForAll(
emailCollection,
Collect(
colEmailSend,
Last(
FirstN(
AddColumns(
emailCollection,
"IDNo",
CountRows(
colEmailSend
)+1
),
CountRows(colEmailSend)+1
)
)
)
);
Note that the below comes from this post from the Dynamic People, so I have not tested it, but it looks like it will do the job for you.
Do a CountRows(colEmailSend) to get the number of mails to send
UpdateContext({vEndLoop: CountRows(colEmailSend)})
Add a button to trigger the flow with OnSelect
UpdateContext({vRunNos: 0});
UpdateContext({vTimerStart: true})
Add a Timer control and set Timer.Duration to 30000 (30 seconds) - with Timer.Start
vTimerStart
and Timer.Repeat to
If(vRunNos >= vEndLoop – 1, false, true)
and Timer.OnTimerEnd to
Office365Outlook.SendEmailV2(
Lookup(colEmailSend,
IDNo = vRunNos,
EmailAddressFieldName
),
TitleStuff,
BodyStuff
);
UpdateContext({vRunNos: vRunNos + 1});
If(vRunNos >= vEndLoop – 1, UpdateContext({vStartTimer: false}))
I will leave you to tidy up any code as I free-typed it
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.