API example Activity Feed
Table of Contents
It is possible to receive extra notifications on, for example, receiving emails from your manager, emails which contain certain topics or maybe notifications about high priority emails. In this article, we demonstrate how to create a new activity from scratch using the Workspace 365 Activity Feed API.
- You can easily create these notifications using Microsoft Power Automate.
- An API key can be created in the Workspace settings under "Integrations" > "API settings".
A visual presentation
A video which demonstrates everything you need to know about the Activity Feed, including an Activity Feed API example, can be found here.
Receive activity notification when receiving email from X
- For this, we use Microsoft Power Automate.
- The first step is to connect Outlook and use a trigger on a new email event. You can choose to select a certain folder which the email is delivered. In this case we choose the Inbox.
- Add New action, Control. Here you will specify what will happen if a certain condition is met.
- Within this condition we want to check if the email that is being received contains certain words (e.g. 'leave requests'), phrases or if it is from a certain person. In this example we check if we have received emails from Sarah.
- You can use dynamic values from the previous steps. So, we can select the body from step 1 "On new email". In this case we will perform the next actions, but only if the conditions are met.
- Here, you will have to use the Activity Feed API endpoint (see example request). The schemas state which properties are optional and which are required to fill in the body.
- Now you can save and test the above to check whether the activity has been successfully created in the Workspace.