Forum Discussion
Update list when Send email with options sends successfully
What if you used a proxy timestamp instead? If you're willing to sacrifice up to a couple seconds, you can use the Current Time action immediately after your Send Email with Options action is completed and use that to populate your "Email Sent" field in your List.
*Possibly dumb question, are you trying to log the time the email was sent, or the time that the recipient of the Send Email with Options email responds?
- Jason BarnesJan 28, 2019Brass Contributor
I'm actually trying to log when the email was sent AND when the recipient response. I'd like to have a view where it shows all the info - email sent (yes/no), email sent date, response (a, b, or c), response date.
In theory I could set a variable when the send email runs and update the list after the response using that variable, but it doesn't give the visibility I'm after to know which items have had an email sent but not responded to. Hopefully that makes sense and adds some clarity.
- Matt WestonJan 28, 2019Iron Contributor
You could always work on the assumption that it fails, and handle the error of the email being sent accordingly (See screenshot). If the email is going to fail to send, you'll get the failure almost immediately and so you can a further update to either log the error in the list or remove the sent date. This would be your "has failed" step, whereas the "is successful" will continue to wait until the response comes back.
It's not quite the nice and shiny solution which you're looking for but it should do the job.
- Matt WestonJan 28, 2019Iron Contributor
You could always work on the assumption that it fails, and handle the error of the email being sent accordingly (See screenshot). If the email is going to fail to send, you'll get the failure almost immediately and so you can a further update to either log the error in the list or remove the sent date. This would be your "has failed" step, whereas the "is successful" will continue to wait until the response comes back.
It's not quite the nice and shiny solution which you're looking for but it should do the job.
- Jason BarnesJan 28, 2019Brass Contributor
I think if I combine your 2 suggestions I can get what I want. If I update the "Email Sent" flag and set a timestamp parallel to (or prior to) the send email with options, I assume it will send successfully and it logs the info accordingly. Then on fail I can update "Email Sent" to No and clear out "Email Sent Date". That would let me run a recurrence and I could re-try those fails automatically by querying the list for any items where "Email Sent" equals "No".
Do you see any problems with that approach or any gotchas I might be missing or failing to consider?