Share via

Help with Outlook and Salesforce Calendar Bidirectional Sync - Mulesoft

Devi Venkata Kunchala 0 Reputation points
2026-02-16T19:06:10.01+00:00

I am trying to achieve Outlook and Salesforce Calendar Bidirectional Sync using Mulesoft.  

Salesforce Relay Channel Listener Connector for Salesforce --> Outlook Sync 

Azure EventHub Listener Connector for Outlook --> Salesforce Sync 

 I am facing issues with EventHub as it logs multiple events for a single create/update/delete operation instead of a single event. How to filter the duplicate events from the list? Any ideas on best way to implement this usecase?

Looking for some best practices on How to implement this in a technical point of view? Open to ideas please? 

Azure Event Hubs
0 comments No comments

2 answers

Sort by: Most helpful
  1. Manoj Kumar Boyini 11,600 Reputation points Microsoft External Staff Moderator
    2026-02-16T21:28:50.19+00:00

    Hi Devi Venkata Kunchala,

    What you’re seeing is actually expected behavior when using Azure Event Hubs, and it’s not an issue with the platform itself.

    Azure Event Hubs is designed as an append-only event streaming service and it guarantees at-least-once delivery, not exactly-once delivery. In simple terms, this means that the same logical action (for example, creating or updating one Outlook calendar item) can result in multiple event messages being delivered to MuleSoft.

    On top of that, Microsoft Graph calendar notifications often generate multiple low-level change events for a single update. A calendar edit might trigger separate notifications for metadata changes, body updates, reminder updates, or attendee changes. Event Hubs faithfully captures and forwards all of those notifications. If there are retries, batching, or checkpoint delays, the same event may also be delivered again. This is all normal behavior in event streaming systems.

    Because Event Hubs does not perform deduplication, the responsibility for filtering duplicates sits with the consumer in your case, MuleSoft.

    The recommended approach is to implement idempotent processing in MuleSoft. Instead of assuming each message is unique, your flow should check whether a given version of an Outlook event has already been processed. You can use metadata such as the Outlook event ID, the changeKey, and the lastModifiedDateTime to determine whether the event is new or a duplicate. If it has already been handled, simply skip it.

    It’s also good practice to maintain a small deduplication store. For example, you could store a short-lived key made up of the Outlook Event ID and changeKey in MuleSoft Object Store, Redis, or Cosmos DB with a time-to-live. If the same key appears again, it can safely be ignored.

    For batch processing scenarios, another clean approach is to group events by calendar item ID and only process the most recent version based on lastModifiedDateTime. This helps ensure you only apply the final state of the item.

    Checkpointing is also important. Make sure your Event Hub listener is configured properly and commits offsets consistently. If checkpointing is delayed or misconfigured, Event Hubs may replay events that were already processed.

    Finally, since this is a bidirectional sync between Outlook and Salesforce, make sure you maintain a correlation or mapping table between the two systems. This prevents infinite loops where an update in Outlook triggers Salesforce, which then triggers Outlook again.

    Multiple events per logical change are expected with Event Hubs due to its at-least-once delivery model and how Microsoft Graph emits notifications. The correct and supported approach is to handle deduplication and idempotency within MuleSoft.

    Helpful References:
    https://dori-uw-1.kuma-moon.com/azure/event-hubs/event-hubs-features#delivery-guarantees
    https://dori-uw-1.kuma-moon.com/azure/event-hubs/event-hubs-features#event-processing

    Hope this helps, Please let us know if you have any questions and concerns.


  2. Q&A Assist
    2026-02-16T19:06:19.1166667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To achieve a bidirectional sync between Outlook and Salesforce calendars using Mulesoft, you can consider the following best practices and strategies:

    1. Event Filtering: Since you are experiencing multiple events being logged for a single create/update/delete operation in Azure EventHub, implement a deduplication mechanism. This can be done by:
      • Timestamp Comparison: Store the timestamp of the last processed event and compare it with incoming events. If an event's timestamp is older than the last processed event, discard it.
      • Event ID Tracking: Maintain a list of processed event IDs in a cache or database. Before processing a new event, check if its ID exists in the list. If it does, skip processing.
    2. Batch Processing: Instead of processing events one by one, consider batching them. This can help in reducing the number of operations and can be more efficient. You can aggregate events over a short period (e.g., 1-2 seconds) before processing them.
    3. Use of Middleware: Leverage Mulesoft's capabilities to transform and route messages effectively. Utilize DataWeave to format and filter the events before they are sent to Salesforce or Outlook.
    4. Error Handling: Implement robust error handling to manage failures during sync operations. Use Mulesoft's error handling features to log errors and retry failed operations.
    5. Testing and Monitoring: Regularly test your integration to ensure that it behaves as expected. Use Mulesoft's monitoring tools to keep track of event processing and identify any bottlenecks or issues.
    6. Documentation and Version Control: Maintain clear documentation of your integration flows and use version control for your Mulesoft projects to track changes and facilitate collaboration.

    By following these practices, you can enhance the reliability and efficiency of your Outlook and Salesforce calendar bidirectional sync implementation using Mulesoft.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.