"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.