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

Recurring flow, check SP list Created By and compare to Outlook Contacts. If exist, ignore. If not, check SP List if DeleteDate is filled. If Yes, ignore, If no update all items with same createdby with the todays date + 1 year and 9 months to the DeleteDate field.

Like subject states.....I need a reoccuring flow that checks an SP list and view the Created by value and compare to Outlook (Contacts) to see if user still exists. 

 

If user still exists, do nothing.....

If they no longer show up in Contacts, then check condition if DeleteDate in the same SP list is filled.

 

If date shows, then do nothing

If date is null, then add today's date + 1 year and 9 months to the Delete Date field. 

 

I started it, but I'm not sure if I'm doing it correctly at all..... 😞

I'm not sure how to add the images here....I tried the Insert Image and added the source from my computer but it didn't work.....

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Recurring flow, check SP list Created By and compare to Outlook Contacts. If exist, ignore. If not, check SP List if DeleteDate is filled. If Yes, ignore, If no update all items with same createdby with the todays date + 1 year and 9 months to the DeleteDate field.

@v-bacao-msft ,

 

The issue with the "Contact" folder in outlook is if user is no longer active, the email will still show up....and also we have to manage it manually (or create another flow which is cumbersome). 

 

I actually found another way....instead of using outlook, to "Get User profile (V2)" for Office 365 instead. Set a condition, if Account is equal to True.....(but also set that the condition should run after "Get Profitle (V2)" has faile. 

 

This part is important in order to take the error handling into consideration. 

View solution in original post

6 REPLIES 6
Highlighted
Frequent Visitor

Re: Recurring flow, check SP list Created By and compare to Outlook Contacts. If exist, ignore. If not, check SP List if DeleteDate is filled. If Yes, ignore, If no update all items with same createdby with the todays date + 1 year and 9 months to the DeleteDate field.

11223344

Highlighted
Community Support
Community Support

Re: Recurring flow, check SP list Created By and compare to Outlook Contacts. If exist, ignore. If not, check SP List if DeleteDate is filled. If Yes, ignore, If no update all items with same createdby with the todays date + 1 year and 9 months to the DeleteDate field.

 

Hi @komo ,

 

Please try to refer to the following method to achieve your needs.

 

  • Initialize a variable to store all email addresses in specified contact.
  • Using Append to string variable to collect all email address.
  • Check if the current created by email is included in the variable, and if not, check if DeleteDate is empty.
  • If it is empty, use Add to time action to get the specified DeleteDate and update the item.

Image reference:

50.PNG51.PNG52.PNG53.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Recurring flow, check SP list Created By and compare to Outlook Contacts. If exist, ignore. If not, check SP List if DeleteDate is filled. If Yes, ignore, If no update all items with same createdby with the todays date + 1 year and 9 months to the DeleteDate field.

Hi @v-bacao-msft ,

 

I tried your steps, and it looks like the there's an issue with the first condition during the "Iteratation" steps........

Attach is the error I'm getting and an image of what I had placed for the condition.....hope you can help. 

 

Not sure if this matters....but usually "Created By" line from a SharePoint list displays users name not their email address.....

error1.PNGcondition.PNG

Highlighted
Frequent Visitor

Re: Recurring flow, check SP list Created By and compare to Outlook Contacts. If exist, ignore. If not, check SP List if DeleteDate is filled. If Yes, ignore, If no update all items with same createdby with the todays date + 1 year and 9 months to the DeleteDate field.

Hi @v-bacao-msft ,

 

I got it to run "Successfully", however the output is not working as I had hoped.....

 

One note: I changed the "Created By" to show emails, and changed first condition to {x}EmailAddress.... is equal to "Created By Email" (SP).

 

 

See attachment for outcome. 

error2.PNG

The first Entry is with an "Active" User (A)

The last four are "Deactive" Users (D)

I forced a random date on one of it, to see if one of the conditions worked (if there's date, skip/no update). 

 

It would seem like it's working, however the flow actually added a date for the User that's still active..... 😞 

 

Edit: I was reviewing my "success log" and it appears that we are looking at the "Contacts" folder (which only has 1 person). How do I have it look at the Global Address list?

Highlighted
Community Support
Community Support

Re: Recurring flow, check SP list Created By and compare to Outlook Contacts. If exist, ignore. If not, check SP List if DeleteDate is filled. If Yes, ignore, If no update all items with same createdby with the todays date + 1 year and 9 months to the DeleteDate field.

 

Hi @komo ,

 

If you use the method I provided, you can't use is equal to , need to use contains.

Note that the variable type needs to be String.

It should also be noted that Add to time and Update item action need to be configured in the if yes branch of Condition 2.

In addition to Global Address list, please consider configuring a similar Flow for each Contact folder. There is currently no way to get all the contact folders.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Recurring flow, check SP list Created By and compare to Outlook Contacts. If exist, ignore. If not, check SP List if DeleteDate is filled. If Yes, ignore, If no update all items with same createdby with the todays date + 1 year and 9 months to the DeleteDate field.

@v-bacao-msft ,

 

The issue with the "Contact" folder in outlook is if user is no longer active, the email will still show up....and also we have to manage it manually (or create another flow which is cumbersome). 

 

I actually found another way....instead of using outlook, to "Get User profile (V2)" for Office 365 instead. Set a condition, if Account is equal to True.....(but also set that the condition should run after "Get Profitle (V2)" has faile. 

 

This part is important in order to take the error handling into consideration. 

View solution in original post

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,309)