cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
komo
Level: Powered On

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
komo
Level: Powered On

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
komo
Level: Powered On

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.

1.PNG12.PNG23.PNG34.PNG4

Community Support Team
Community Support Team

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.
komo
Level: Powered On

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

komo
Level: Powered On

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?

Community Support Team
Community Support Team

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.
komo
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,663)