I created some “counters” in my automations. At the end of the entire process I want to log a message that references all my 5 objects
start time
end time
Total Emails
Good Emails
Bad Emails
I need my message to log as “This report begun at “start time” and ended at “endtime”. There was a total of “total emails” in the inbox. “good emails” were moved to lead folder and “bad emails” were moved to exception folder”
Does anyone have any ideas? Any assistance will be appreciated.
I assume you already having the values for the variables you mentioned above like start time and end time etc.
you can use like below expression in your log message and set to info type.
“This report begun at “+start time+” and ended at “+endtime+”. There was a total of “+total emails+” in the inbox. “+good emails+” were moved to lead folder and “+bad emails+” were moved to exception folder”
or you want the logic for all the objects/variables you mentioned. please confirm. thanks.
String.Format("This report begun at {0} and ended at {1}. There was a total of {2} in the inbox. {3} were moved to lead folder and {4} were moved to exception folder", strStart, strEnd, strTotal, strGood, strBad)
all strXXX are string Variables or statements producing a string like intCount.ToString and were placed on the corresponding position, expressed with the {X} syntax within the string Template text
Good morning. I was hoping you can assist me with this inquiry. I attempted to email the same log message, but my output did not come out the same. What am I doing wrong?
could you check for the isBodyHtml option in the send outlook email activity is unchecked since we are using only text format for the email body. thanks.
“This report begun at “+StartTime.tostring+” and ended at “+EndTime.tostring+”. There was a total of “+TotalEmails.tostring+” in the inbox. “+GoodEmail.tostring+” were moved to lead folder and “+BadEmail.tostring+” were moved to exception folder”
I was under the impression I was able to use the same expression as I did on the log message
Use the above output EmailBodyText in your body section of sendoutlook email message instead of the whole string you mentioned. I hope it will resolve your issue. thanks.
Good morning Sir. So sorry to bother you, but you have been so helpful. can I ask for one more favor? How can I add a png image to this email? Again, any assistance will be greatly appreciated
You have to delete with the alt name of the image and content id and you have to create html content to attach the image in the email body. please refer the below thread . thanks.