Hi - I’ve built an automation where I’m sending transactional emails to many customers simultaneously. This part is functioning perfectly! Based on a linked record lookup constructed around an Iterator, it sends n+1 emails to all recipients who should receive them, utilizing an integration with MailerSend.
My question pertains to a final step I’d like to implement: updating a single Airtable record with a timestamp after the emails have been sent, to signify that the automation executed successfully. However, with the current automation structure, placing this at the end results in callin.io updating the record n+1 times (the same number as the emails sent).
This doesn't seem like the correct approach. Does anyone have a solution for this? The only method I’ve considered is moving the “update record” for the timestamp to an earlier stage in the automation (before the list of names/emails is generated). However, if an error occurs later in the process, this would indicate a false positive. Ideally, I want to place it at the conclusion of the automation, after the emails have successfully been dispatched.
I suspect there might be a solution involving Flow Control, but I haven’t been able to figure it out. Has anyone encountered and resolved this before?
Here’s a suggested approach:
Before the email sending process commences, establish a variable (let’s name it “updateTimestamp”) with an initial value of false.
Within the loop of the Iterator module, where emails are dispatched to each customer, incorporate a conditional check. If the current iteration is the final one (signifying that all emails have been transmitted), set the “updateTimestamp” variable to true.
Following the loop of the Iterator module, introduce a condition utilizing the “If” module. Verify if the “updateTimestamp” variable is true.
If the condition evaluates to true, proceed to update the relevant Airtable record with the timestamp by using the “Update a Record” module.
Should you have additional inquiries or require further support, please do not hesitate to ask! Expert Suggestion