"No recipients defined" error in email loop block

I'm trying to set up a workflow that sends HTML emails to individuals based on the results of a query.
I set up a loop to do that and it works fine when I run every block manually (or click on "run with previous blocks").

But when I deploy and click run from the top right I get a "no recipients defined" error in the logs for the email loop step.

Would really appreciate any tips!


Hi there @Fatema_Soliman, and welcome to the forum!

Everything seems to be set up correctly, in order to be able to help I'd be helpful to see how is the to_html block returning data. What happens if you run the block by clicking on the play button, do you get the same error? Also. hovering over value.email is helpful to see what is being passed.

Hi @MiguelOrtiz and thanks for getting back to me!

Here's the structure of the JSON being returned from to_html

{"data":[{"accountManager":"John Smith","email":"john@smith.app","htmlContent":".."}]}

When I hover over "to" in the email loop block it does show the correct email.

When I run the block it works perfectly and sends the email, the problem happens when I click run to run the whole workflow from the top bar.

Hi @Fatema_Soliman, this is a strange error. I am a little confused about your interface, and I have some observations:

  1. In your workflow, query1 has the to_html input and is set to execute in parallel. Compared to the left hand editor, query1 has no input, and the execution is set to sequential. I'm not sure why there is no input.
  2. I think it's odd that your loop block is named query1. I'm wondering if the naming might interfere with its execution, if your workflow is potentially confusing this block for some previous query that may have existed in your workflow.

My advice is to delete the query1 loop block and recreate a new loop block with the same parameters as before but name the block emailLoop or something similarly descriptive/unique. Let us know if that changes anything!

Hi @Fatema_Soliman, just checking in! Were you able to get this working?

1 Like

Hi Mike! that's for checking in
I couldn't fix it but issues like this kept happening with other workflows. We're using a local deployment with temporal which might be why. Here's another post describing a similar issue

Which of these tutorials have you run through? If you've had issues with workflows since your local deployment then I would agree it is likely a deployment issue, and you'll want to redeploy and double check each step with our tutorial. If you let me know which type of deployment it is I can ask the team if there are common pain points in that deployment process.