Limited time discount Book Smarter This Christmas
Up to 50%Off

How can I use WordPress hooks for Outlook Calendar in Amelia

Amelia provides a set of Outlook Calendar hooks that allow you to modify authentication data, adjust event information before it syncs, or trigger your own logic when a calendar is added, updated, or removed. These hooks help you extend Outlook integration safely without editing Amelia’s core plugin files.

Info Please note

Hooks require programming knowledge, and support is limited to general guidance.

Get authentication URL

How do I modify the Outlook authentication URL?

amelia_get_outlook_calendar_auth_url_filter

Type: filter

Use this filter to change the authentication URL for an employee connecting Outlook Calendar.

				
					function example($authUrl, $employeeId) {
    return $authUrl;
}
add_filter('amelia_get_outlook_calendar_auth_url_filter', 'example', 10, 2);
				
			

How do I run custom logic before the authentication URL is returned?

amelia_get_outlook_calendar_auth_url

Type: action

Use this action to run custom code before the authentication URL is returned.

				
					function example($authUrl, $employeeId) {
    // do action
}
add_action('amelia_get_outlook_calendar_auth_url', 'example', 10, 2);
				
			

Outlook calendar added

How do I modify Outlook calendar data before it is saved?

amelia_before_outlook_calendar_added_filter

Type: filter

Use this filter to modify calendar data before it is stored after authentication.

				
					function example($accessToken, $employeeId) {
    return $accessToken;
}
add_filter('amelia_before_outlook_calendar_added_filter', 'example', 10, 2);
				
			

How do I run an action before the calendar is saved?

amelia_before_outlook_calendar_added

Type: action

Use this action to trigger code before the calendar is saved.

				
					function example($outlookCalendar, $employeeId) {
    // do action
}
add_action('amelia_before_outlook_calendar_added', 'example', 10, 2);
				
			

How do I run an action after the calendar is saved?

amelia_after_outlook_calendar_added

Type: action

Use this action to run code right after the calendar is saved.

				
					function example($outlookCalendar, $employeeId) {
    // do action
}
add_action('amelia_after_outlook_calendar_added', 'example', 10, 2);
				
			

Outlook calendar deleted

How do I run code before the calendar is deleted?

amelia_before_outlook_calendar_deleted

Type: action

Use this action to run custom logic before an employee disconnects their Outlook Calendar.

				
					function example($outlookCalendar, $employeeId) {
    // do action
}
add_action('amelia_before_outlook_calendar_deleted', 'example', 10, 2);
				
			

How do I run code after the calendar is deleted?

amelia_after_outlook_calendar_deleted

Type: action

Use this action to run custom logic once the calendar is removed from the database.

				
					function example($outlookCalendar, $employeeId) {
    // do action
}
add_action('amelia_after_outlook_calendar_deleted', 'example', 10, 2);
				
			

Event added

How do I modify event data before it is added to Outlook?

amelia_before_outlook_calendar_event_added_filter

Type: filter

Use this filter to modify event data before Amelia inserts it into Outlook Calendar.

				
					function example($event, $appointment, $provider) {
    return $event;
}
add_filter('amelia_before_outlook_calendar_event_added_filter', 'example', 10, 3);
				
			

How do I run code before an event is added to Outlook?

amelia_before_outlook_calendar_event_added

Type: action

Use this action to run logic before the event is added.

				
					function example($event, $appointment, $provider) {
    // do action
}
add_action('amelia_before_outlook_calendar_event_added', 'example', 10, 3);
				
			

How do I run code after an event is added to Outlook?

amelia_after_outlook_calendar_event_added

Type: action

Use this action to run logic after the event is added.

				
					function example($event, $appointment, $provider) {
    // do action
}
add_action('amelia_after_outlook_calendar_event_added', 'example', 10, 3);
				
			

Event updated

How do I modify event data before it is updated?

amelia_before_outlook_calendar_event_updated_filter

Type: filter

Use this filter to change event data before updating it in Outlook.

				
					function example($event, $appointment, $provider) {
    return $event;
}
add_filter('amelia_before_outlook_calendar_event_updated_filter', 'example', 10, 3);

				
			

How do I run code before an event update?

amelia_before_outlook_calendar_event_updated

Type: action

Use this action to run logic before updating the event.

				
					function example($event, $appointment, $provider) {
    // do action
}
add_action('amelia_before_outlook_calendar_event_updated', 'example', 10, 3);
				
			

How do I run code after the event is updated?

amelia_after_outlook_calendar_event_updated

Type: action

Use this action to run logic after the event is updated in Outlook.

				
					function example($event, $appointment, $provider) {
    // do action
}
add_action('amelia_after_outlook_calendar_event_updated', 'example', 10, 3);

				
			

Event deleted

How do I run code before an event is deleted from Outlook?

amelia_before_outlook_calendar_event_deleted

Type: action

Use this action to run code before deleting an event from Outlook Calendar.

				
					function example($appointment, $provider) {
    // do action
}
add_action('amelia_before_outlook_calendar_event_deleted', 'example', 10, 2);

				
			

How do I run code after an event is deleted from Outlook?

amelia_after_outlook_calendar_event_deleted

Type: action

Use this action to run code after an event is removed.

				
					function example($appointment, $provider) {
    // do action
}
add_action('amelia_after_outlook_calendar_event_deleted', 'example', 10, 2);