Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2899 Widoki

I cannot figure out how to get the emails of all the sales team to send an email to them. I have set up an Automated Action to send an email when a Lead is created. I want the email to go to the entire sales team but i am unable to figure out how to get all of them.

{{ object.team_id.member_ids }} This returns the user_ids of the team but not the email

{{ object.team_id.member_ids.email }} This errors when i create a lead.

{{ ','.join(map(str, object.team_id.member_ids.mapped('email'))) }} This errors when i create a lead.


Awatar
Odrzuć
Autor

This works! Thank you.

Najlepsza odpowiedź

Hi Sean,

Try this on the "To (Partners)" field of your email template;

{{','.join([str(partner.id) for partner in object.team_id.member_ids.mapped('partner_id')])}}

Awatar
Odrzuć
Autor

Thank you for your reply. Python code you are talking about seems pretty involved in terms of sending emails. Is there an easy way to have python use an existing email template to send without recreating an email in python?

Hi Sean,
Try the above. I tried it and it works fine

Powiązane posty Odpowiedzi Widoki Czynność
0
sie 23
1399
2
sie 25
1500
0
maj 25
769
0
paź 24
1200
0
sie 24
1092