Outlook automation triggers
  • 27 Sep 2022
  • 6 Minutes to read
  • Dark
    Light

Outlook automation triggers

  • Dark
    Light

When building an Automation we offer several triggers that can be used with Outlook including:

  1. When a new email is received in Outlook Email
  2. When an event is created in Outlook Calendar
  3. When an event is changed in Outlook Calendar

In this article, we will be setting up an automation that creates an Airtable record for any newly created Outlook events that are created. We also have Automation actions for Outlook which you can read more about in this article.

NOTE

If your organization uses Microsoft Exchange email servers, only the cloud-based version of that service will work with our Automations feature. On-prem Microsoft Exchange servers are currently not able to integrate with Airtable.

Setup

After you have configured your base in the manner you choose, you can then begin configuring your automation. To start, click on “Automations” in the upper right corner of your base. Then, click “Create an automation” to begin the setup process.

There are three Outlook triggers you can choose from. The setup for each individual trigger is detailed below.

Account authorization

As a prerequisite, you will need to already have a Microsoft account. This account will need to be connected to the Airtable base that you are working in. After choosing which trigger you would like to set up, you will have the options to "Manage connected accounts" or "Connect new account". This authorization process is scoped to each individual Outlook service, so you will need to perform this process multiple times, at least once for each Outlook trigger, and also reauthorizations in the future as needed. Jump down to the section below for more information on security and OAuth scopes.

When a new email is received in Outlook Email

This trigger fires whenever a new email is received in an Outlook Email account’s inbox. To start, select the “When email is received” trigger from the list of available triggers.

6615522461719outlookemailwhenemailreceivedtriggerempty.jpg

Connect your Outlook account (or select an already connected account) and then run a test to make sure the integration is successful.

your title goes here

Basic details about the email such as its ID, sender, to/cc/bcc recipients, reply to addresses, message body, received date, importance, and its permalink are included in the output of the trigger. Attachments are not included in the output.

Lastly, you have the option to receive the email message in plain text format or in HTML format. You can toggle this option on or off by clicking the “Show more options” dropdown below where your Outlook account is listed.

6615546536855outlookemailwhennewmessagereceivedtriggerconfigfilled.gif

When an event is created in Outlook Calendar

The trigger fires whenever an event is created in a specified Outlook Calendar. To start, select the “When event created” trigger from the list of available triggers.

6615523689111outlookcalendarwheneventcreatedtriggerconfigfilled.jpg

Then, connect your Outlook account (or select an already connected account), select the calendar you want to use, and run a test to make sure the integration is successful. At least one calendar event will need to be created in order for the test to run successfully.

your title goes here

The trigger’s output includes information about the created event such its ID, title, description, start time, end time, location, creator, importance, when it was created, when it was last updated, the email addresses of its attendees, its video conferencing link if it has one, and it’s permalink.
A reference to an Outlook Calendar's Event ID is necessary for the “Update event” Outlook Calendar action. If you plan to create an automation to update Outlook Calendar events at any point in the future we strongly recommend creating and storing a separate field on your table to keep track of the Outlook Calendar Event ID for any events you intend to update from Airtable.

4415942323863storeeventidfromoutlook.jpg

Once you’ve selected the calendar and run a successful test, there are no additional configuration steps for this trigger.

When an event is changed in Outlook Calendar

This trigger fires whenever an Outlook Calendar event has any saved changes to the event details. To demonstrate this trigger, let’s assume that you are automatically creating Airtable records for every new event in Outlook Calendar.

1500007062201outlookevents.png

your title goes here

For this trigger to find and match an Outlook Calendar event in your table, you’ll need to include the Outlook Event ID in your Airtable record (or in whatever source you’re using to store calendar events).

To set up this trigger, start by selecting it from the list of available automation triggers.

6615555879447outlookcalendarwheneventcreatedtriggersetupspotlight.jpg

Then, connect your Outlook account (or select an already connected account), select the calendar you want to use, and run a test to make sure the integration is successful. At least one calendar event will need to be created in order for the test to run successfully.

6615524476311outlookcalendarwheneventchangedtriggerconfigfilled.jpg

Once you’ve selected the calendar and ran a successful test, there are no additional configuration steps for this trigger.

Add an action

Now that your triggers are configured you can add one or more actions using any automation action. Below we'll provide a more robust example, to demonstrate using the Outlook integration with two separate automations.

  • Automation 1 : create Airtable records for any newly created Outlook events
  • Automation 2 : update those records anytime the Outlook event changes.

Automation 1

Step 1: Choose the “When event is created” trigger

Configure the trigger using the instructions provided above.

Step 2: Add the “Create record” action

To start, select “Add an action” below your automation trigger, and then select “Create record”. Afterwards select the table where you want the record to be created.

6615571632151createrecordactionconfigempty.jpg

Next, choose what data from the Outlook Calendar event you want to include in the created record, mapping the information in the calendar event to fields in your table.

1500007063121mapfields.jpg

your title goes here

The “When event is created” trigger outputs information about the created event such as its Event ID, title, description, start time, end time, location, creator, importance, when it was created, when it was last updated, the email addresses of its attendees, its video conferencing link if it has one, and it’s permalink.

6615558980119createrecordactionconfigfilledoutlookcalendarexample.gif

Finally, run a test to make sure the calendar data is being populated correctly in the fields you've configured.

6615549027991turnautomationon.gif

Automation 2

Step 1: Choose the “When an event is changed” trigger

Configure the trigger using the instructions provided above.

Step 2: Add the “Find records” action

For this step, we’ll need to identify the Airtable record id that was created in the previous automation and match it to the Outlook event ID for the changed event. To do this, we’ll use the “Dynamic variable” option to configure the conditions for this action.

First, we'll use the "Find Records" action to find the record where the stored Outlook Event ID is equal to the one from our trigger. Note the Outlook Event ID should have previously been stored in your table in the steps above, it is not an Airtable record ID.

4410212975127findrecordusingdynamiccalendarid.gif

Step 3: Add the “Update record” action

Once you’ve successfully tested the previous “Find record” action, you’ll add a final “Update record” action to your automation.

Select the same table where you’re creating records for Outlook events (the “Client Meetings” table in the example below), and insert the Airtable Record ID you found in the previous “Find records” action step (from Step 2).

4410204366999dynamicaddrecordidoutlook.gif

Then, add in the Airtable fields that you want to update, and insert the related Outlook event data (found in step 1 using the “When an event changed” trigger) into those fields.

Once each of the triggers and actions is successfully configured and tested, it’s time to turn your automation on.

6615549027991turnautomationon1.gif

Security and OAuth scopes

Authentication

We request the minimum read/write scopes necessary to make the external source sync work. The OAuth consent screen will look like this:

4408092318871outlookMicrosoftAuthentication.png

The access approval screen will vary depending upon the automation you are creating. Clicking "Yes" means that you will allow us to access the necessary scopes to allow the automation to work.

Outlook Calendar app access
Outlook Email app access

Outlook scopes

Scope nameScope purpose
offline_accessFor refresh token
profileFor user metadata
openidFor sign-in
Mail.ReadWriteFor reading/writing emails (Only for Outlook Email automations)
Mail.SendFor sending mail (Only for Outlook Email automations)

We use delegated permissions for all of our Outlook integrations and tokens are transmitted between Airtable and Microsoft’s servers securely via HTTPS. On Airtable’s side, the tokens are stored in databases that are encrypted at rest. For more information on Outlook scopes, check out Microsoft's documentation here.


FAQs

Do Outlook Calendar events support sending attachments?

Not at this time.


Was this article helpful?