cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alex069
Frequent Visitor

Send email with excluded email addresses

Hello Everyone,

 

So i'm trying to do the following thing:

 

I'm receiving  event invites regularly with standard participants but only 1 different in every invite (for example 1@XX.com , 2@xx.com  , 3@xx.com, these are the standards, and 4@xx.com )

 

I want to automatically send an email (a separate email) towards 4@xx.com   .

 

I can't simply find a solution, from the "get event V3 (were i can identify and see the emails of the "required attendees") to move it forwards 

Screenshot 2022-08-05 161534.jpg

 

Is there any possibility to extract all the emails of the attendees, then exclude the ones I want (1@xx.com,2@xx.com, 3@xx.com ), and an email to be sent afterwards to the remaining one (4@xx.com  )?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
MarconettiMarco
Super User
Super User

Hello @Alex069 ,please follow these steps:

1. Add an "Apply to each" control in which put the following actions/controls:

MarconettiMarco_8-1659710561836.png

 

2. Add a Compose action in which put the "Required attendees" value

MarconettiMarco_9-1659710583844.png

 

3. Add a "Compose" action in which put the following expression:

split(outputs('Compose-requiredAttendees'),';')

MarconettiMarco_10-1659710603099.png

 

4. Add a "Filter array" action:

- From: previous Compose outputs;

-Filter: edit in in advanced mode and put the following expression (you can add as many emails you want to exclude):

@And(not(contains(item(), 'Email_1')),not(contains(item(),'Email_2')))

MarconettiMarco_11-1659710686438.png

 

5. Add a "Compose" action in which put the following expression:

 length(body('Filter_array')) 

MarconettiMarco_12-1659710705176.png

6. Add a "Condition" control: if the Compose-Length outputs is greater than or equal to 1

 

MarconettiMarco_13-1659710734634.png

 

7. Add a Compose action in which put the following expression: 

join(body('Filter_array'),',') 

MarconettiMarco_14-1659710788399.png

8. Add a "Send an email" action in which put the previous Compose outputs in the "To" field:

MarconettiMarco_15-1659710969497.png

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

BR,

Marco

 

 

 

 

 

 

 

 

 

View solution in original post

7 REPLIES 7
MarconettiMarco
Super User
Super User

Hello @Alex069 ,please follow these steps:

1. Add an "Apply to each" control in which put the following actions/controls:

MarconettiMarco_8-1659710561836.png

 

2. Add a Compose action in which put the "Required attendees" value

MarconettiMarco_9-1659710583844.png

 

3. Add a "Compose" action in which put the following expression:

split(outputs('Compose-requiredAttendees'),';')

MarconettiMarco_10-1659710603099.png

 

4. Add a "Filter array" action:

- From: previous Compose outputs;

-Filter: edit in in advanced mode and put the following expression (you can add as many emails you want to exclude):

@And(not(contains(item(), 'Email_1')),not(contains(item(),'Email_2')))

MarconettiMarco_11-1659710686438.png

 

5. Add a "Compose" action in which put the following expression:

 length(body('Filter_array')) 

MarconettiMarco_12-1659710705176.png

6. Add a "Condition" control: if the Compose-Length outputs is greater than or equal to 1

 

MarconettiMarco_13-1659710734634.png

 

7. Add a Compose action in which put the following expression: 

join(body('Filter_array'),',') 

MarconettiMarco_14-1659710788399.png

8. Add a "Send an email" action in which put the previous Compose outputs in the "To" field:

MarconettiMarco_15-1659710969497.png

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

BR,

Marco

 

 

 

 

 

 

 

 

 

Alex069
Frequent Visitor

Hey @MarconettiMarco ,

 

Do i need to keep the Get Event (V3)?

 

 

@Alex069  please keep the “get calendar view events”.

the get event action is not needed in order to get the required attendees.

 

BR,

Marco

Alex069
Frequent Visitor

@MarconettiMarco 

The problem is with the filter array, the expression is invalid, and it's typing very very very slow, like u need to be sure that what you tipped is entered.

 

and there is no "expression" function for me to use

 

any suggestions?

Alex069
Frequent Visitor

@MarconettiMarco , managed to solve the Filter Array,

 

but getting problem with this :

 

 

Screenshot 2022-08-05 195334.jpg

Hello @Alex069 ,

please be aware to add also the comma:

 

join(body('Filter_array'),',') 

 

BR,

Marco

 

Alex069
Frequent Visitor

@MarconettiMarco ,

 

it's working !

 

10x a million !

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,651)