cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jgh40
Helper I
Helper I

avoid duplicate office365 calendar entries

Hi,

 

I am working on and have a successful calendar flow. It look for a message, and takes that message and puts it in my calendar. Right now it is triggered by receiving an email with specific subject. If I run it over and over again, it will continually create new items. I am handling this in the script to not do this anymore, but is there a way to take care of this in automate flow? I tried a number of scenarios, but am not finding the right combination.

 

image (1).png

 

maybe @ScottShearer can help?

 

 

Thanks!

8 REPLIES 8
v-litu-msft
Community Support
Community Support

Hi @jgh40,

 

To avoid duplicated event create, you could use Get events action to get events to filter out events list whether exist an event subject equals the new Email's subject. If the length of the Get events action equals to 0, create a new event, or do nothing:

Annotation 2020-06-01 140414.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This looked like it was going to work, but I received an 'invalid filter clause' on the condition.

 

{
  "status"400,
  "message""Invalid filter clause\r\nclientRequestId: 69cbdbbc-ae86-492c-bc8d-4321508676fd\r\nserviceRequestId: 5a0bf8aa-3691-4239-a2ca-1567ff65f883",
  "error": {
    "message""Invalid filter clause",
    "code""BadRequest",
    "originalMessage""Invalid filter clause"
  },
  "source""office365-wus.azconn-wus-01.p.azurewebsites.net"
}
 
I am unable to show the entire expression, however here is the string I have for it: 
length(body('Get_events_(V4)')?['value'])
Screen Shot 2020-06-01 at 7.13.36 PM.png
v-litu-msft
Community Support
Community Support

Hi @jgh40,

 

Please notice that syntax is Subject eq 'dynamic content', so you should add the string "Subject eq " into the Filter query, and please not forget to add blank space after "eq".

Annotation 2020-06-02 172311.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ah, ok! I didn't see that. I will try again later and get back to you. Thanks, again!

If I have it in yes, it fails.
Opera Snapshot_2020-06-02_162024_us.flow.microsoft.com.png
 
If I put create events if yes, it fails, but if i slide to over at no it will create multiple events. Does the condition need to equal a value? I tried putting a value in there, but ultimately left it out. I was also asked for value of the condition when I started to put a value in for the expression.Opera Snapshot_2020-06-02_161306_us.flow.microsoft.com.png
 
v-litu-msft
Community Support
Community Support

Hi @jgh40,

 

Please notice that in the right of Condition there have a "0":Annotation 2020-06-03 183102.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

jgh40
Helper I
Helper I

Thank you, and that did it!

 

Screenshots are tough to find little bits in it. I thought the '0' was an emoji 🙂

 

Is there a similar tweak to this this automation that would remove duplicates if they are found in the calendar? Say someone manually puts something in the calendar with same subject, and perhaps same date. I will mark this as solved, though! Thanks, again!!!

jgh40
Helper I
Helper I

Hi. I was wondering if @v-litu-msft  could help me with an edge case on this, or anyone? 'GetEvents' is picking up past events matching same subject. For context, this is an event that is reoccurring monthly, but dates are always different.

 

Is there a way to look for events only in the current month?

 

Thanks, again!

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (19,016)