I am trying to send an email to the employee through SMTP connector in a process flow. It works fine with constant value as input (To Recipient) field and receiving the email too. When i tried input with process variable as expression, it is showing error, status code -1. How can i make it work? In my use case, each time the email id will be different, that expression should pick the correct email id but it fails to do so.
Hi Usha,
Is there a particular reason to do this in a Default value query instead of a Process procedure on the Start table task process action?
Could you also share a screenshot selecting the SMTP connector process action in the Process flow monitor? I'm interested in the values for the input parameters:
Mark, i have attached the screen shot you have asked for.
For your previous question, for testing purpose i have added a task to trigger the process. In my actual scenario, i wanted to check a date field, if the condition is true, it should send email to corresponding person. Planning to do it by scheduling the process flow everyday.
This is most likely the issue. There's currently no one that will receive the e-mail. The SMTP connector will fail when no TO recipients are given.
In my use case, each time the email id will be different, that expression should pick the correct email id but it fails to do so.
It's better to do this inside Process procedure logic (f.e. Decision process action or on the Start table task process action). Here you can also make sure your process flow stops when no e-mail has to be send. EDIT: since this will be a system flow, use a Decision node
Hope this helps!
Mark, thanks for your reply, the issue is the expression was returning more than one values, so it did not take any value at all. Worked on the query and now getting the email.
You can use the function STRING_AGG to squash the double records into one. This will allow e-mails to be send to multiple e-mail addresses.
string_agg(ed.email_id, '; ')
Thanks Mark! Sure i will try this.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.