Here's the flow pattern to build this.
Connectors you need:
- Office 365 Outlook (trigger + set category)
- SharePoint (get items)
Flow structure:
1. Trigger: When a new email arrives (V3) Office 365 Outlook. Set Include Attachments to No, Only with Attachments to No.
2. Get items (SharePoint) point to your keyword list. Add an OData filter to find matching rows:
substringof('your_keyword_column', triggerOutputs()?['body/subject'])
Or use a contains check on the subject.
3. Condition: check if the Get items returned any results:
length(body('Get_items')?['value']) is greater than 0
4. In the Yes branch: get the category value from the first matching row:
first(body('Get_items')?['value'])?['YourCategoryColumn']
5. Set up on email (V2) — Office 365 Outlook. Use the Message Id from the trigger and set the Categories field to the value from step 4.
For matching on multiple fields (Subject, Body, From), add more Condition checks or add multiple Get items calls each filtered by a different field, then combine the results.
One tip: the OData filter on SharePoint does a server-side contains check which is efficient. Use it rather than looping through all list items.
If you get stuck on a specific step or error, share the details and we can help.
Best regards,
Valantis
✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.
❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).
🏷️ For follow-ups @Valantis.
📝 https://valantisond365.com/