Skip to main content
Solved

SMTP connector fails in process flow with process variable as expression


Forum|alt.badge.img+3
  • Warrior
  • 29 replies

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. 

Best answer by Mark Jongeling

Missing value

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!

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

7 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23

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: 

 


Forum|alt.badge.img+3
  • Author
  • Warrior
  • 29 replies
  • June 24, 2022

Mark, i have attached the screen shot you have asked for. 

 


Forum|alt.badge.img+3
  • Author
  • Warrior
  • 29 replies
  • June 24, 2022

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.


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3945 replies
  • Answer
  • June 24, 2022
Missing value

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!


Forum|alt.badge.img+3
  • Author
  • Warrior
  • 29 replies
  • June 24, 2022

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. 


Mark Jongeling
Administrator
Forum|alt.badge.img+23

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, '; ')


Forum|alt.badge.img+3
  • Author
  • Warrior
  • 29 replies
  • June 24, 2022

Thanks Mark! Sure i will try this.👍


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings