Tulip Automation - Email action

Hello Community,

I am building an automation to send email with “Email“ action as bellow:

  1. Run automation on a schedule.
  2. Run CF to count quantity of users in the users table and store it in count variable.
  3. Use count variable from (2) and loop for entire table:

inside of the loop

  • run CF to return the user variable (text), where CF return list of “users” here from table, I have linked the “users_to_send_mail“ variable in output Object (it has {} symbol), and it include all fields from users table now (including “user” field)
  • run “Email” action to send notification to table “user” field that is defined as output in CF run in the loop (in the {} Object).
  1. End of the loop/automation.

Somehow, there seems to be no link between output linked variable of CF ({} “users_to_send_mail“) and “user” table field of the same Object “{} users_to_send_mail”, that is used in the Email action of the automation. As a result mail is not send and I do have “Unknown task“.

Can You please advise?

Thank You,

Mateusz

Hi Mateusz,

The “Unknown task” you’re seeing is almost always the connector function step in the log, not the email failing. The main issue here is that you don’t need to count users or run the CF inside the loop. Automations work best if the connector returns the full list once, you store it in an array/object variable, and then let the Loop run over that list directly. Inside the loop, point the Email action’s To field at the current item’s user field (must be a Tulip User field).

If the email still doesn’t send, check the automation’s Run History and look for which block shows an error.

Hello Nicolo,

we managed to fix it without count as You suggested, approach:

  • run CF and return ids ((not user field or e-mail) of records with users defined in table - list
  • for Loop use Logic Block Result - list from CF (position + element)
  • in the Loop action “Get table record“ and point again to table where users are defined, and record id “Element“
  • in the Loop config for E-mail action: To: “User” Variable.

Thank You :slight_smile:

1 Like