I’m pretty sure this is quite simple but couldn’t find it on the other posts. Sorry if this information is already available and I haven’t found.
I’m setting a notification automation that I want to send and e-mail to a specific user that is assigned as the leader of a group. Like this:
Joseph is leader of group A
Maria is part of group A, and she is on a pause. There is date field indicating when her pause ends. When it’s one week from this date, I want to send an e-mail to group A’s (the group that Maria is part of) leader, Joseph.
I have already managed to set the trigger, but I’m having trouble with the itself. I’m assuming it would be a formula on the TO field from the e-mail automation.
If I understand correctly, the automation is in the User db and is being triggered for Maria, right?
Can Maria be part of only one team, or multiple?
If the former, then I think you need to use [Step 1 User].Team.Leader.Email
If the latter, then probably this will work: [Step 1 User].Teams.Join(Leader.Email, ",")
(and all leaders of teams Maria is in will be notified)
I guess there is more than one leader of a team?
(= relation between Circulos and Coordenadora is to-many)
Your original post implied that there was only one.
You’ll need to add an intermediate lookup or formula in your dbs. I would suggest adding a lookup in your User db, which gets the Leaders from all the Teams.
Then you can use [Step 1 User].[Teams Leaders].Join(Email,",")
But then when Maria’s pause ends, all the leaders from my organization would receive the e-mail or only the leaders from the teams that Maria is part of?
Just learned a few things from markdown. <3 Thank you so much @Chr1sG !
For another automation, I want an email to be sent when a task reaches a date. The trigger is ok. But I wanted the e-mail to be sent to the Team Leader of the Circle from which the task is related to…
The dot notation in formulas can be used to get field values from single entities, so you can use Task.Teams
to get the teams for a given task, and you can use Team.Leaders
to get the leaders for a given team.
This can work over multiple levels, provided that the dot is following a single entity, so you could use Task.Team.Leaders
if a task has only one team.
But you can’t use this method to get values from a collection of entities, so Task.Teams.Leaders
won’t work, since you’re trying to get properties from a collection of things (getting the Leaders from the Teams)
However, lookups can work via collection fields, so you can create lookups in your databases to make these ‘indirect’ values available.
For example, you could add a lookup to the Task db which gets the Leaders from the Teams.
And then this field (called “Teams Leaders”) will be available to use in your automation:
[Step 1 Task].[Teams Leaders]
Note: If you try and use a dot after a collection, the auto-complete will offer suggestions for ‘aggregation’ functions (Sum, Avg, Max, Join, etc.) which work to provide aggregated information on the field properties for the collection.