READ o365 email box

Hi, we have a requirement to constantly read an email box and process incoming messages.

Is there a Novacura connector that can do this?

right now, this is all done in C# with a Windows service that runs and connects via IMAP or something (a lot of the details are over my head).

But I wanted to know can I do this in Novacura without some external program.

Hi,

Without having a solution to back this up; but have you explored the O365 REST APIs for this purpose? As an example we no longer developed a specific connector for excel, instead we use REST to integrate excel files via O365 APIs.

Br

Hi,

as Albin mentioned, we usualy do this by using the REST connector and seting it up to use MS Graph api endpoints.
There is an example/template in the Marketplace Outlook Attachment Component - Marketplace Documentation (novacura.com)
that uses Authorization Code Flow
Microsoft identity platform and OAuth 2.0 authorization code flow - Microsoft identity platform | Microsoft Learn

But it is also possible to set it up to work with Client authentication by creating an app in Azure and using client id and secret.
There are also some explanations here on limiting Client acces to certain mailboxes (if you can reach it)
Limit Permissions to a Specific Mailbox - Extensibility and Integration (novacura.com)

Hope this helps!

B R
Ivan

2 Likes

Thank you both, I’ll revert back when I have more questions. But it sounds like my hopes are possible. Although I didn’t find the documentation for the Excel. But I found some ideas for Outlook.

Hi,
stumbled upon my old flow and connector config in the meantime.

Its a test/debug connector so its a bit of a mess but i remember being able to get mail attachments using Client auth (I used Get Token, List Messages and List Attachments operations)

(First rename 1 Rest.ncrcp to 1 Rest.json , import 1 Rest in Connectors and then go into Edit of that newly created connector and import 2 Content)

Hope this helps!

B R
Ivan
Test read mail by MS GRAPH 2.flow (191.5 KB)
2 Content.ncrcp (17.4 KB)
1 Rest.ncrcp (1.8 KB)

Man, that’s awesome. I am trying it right now. Thanks alot!

Alright, I need some more help, please.

I cannot figure out how to configure the connector. I imported what you provided Ivan and I don’t know where to put “my” information to be able to open my mailbox.

I had the first part of the following completed for me, and I have a client id and client secret, but when I open the connector there is no place to put those…any ideas?

Create App Registration | Extensibility and Integration (novacura.com)

Hi,

in the uploaded example client_id and client_secret are not set as Global Params but are specified as constant value in the Get Token operation (its an old flow and thats just how we did it back in the day :slight_smile: )

You can uncheck the constant value check box and then the Get Token operation will want you to input them manually


image

You can also define global parameters

(but i cant remember how to connect global configuration parameter to global form parameter)

B R
Ivan

Ok, this is kinda awesome. I got connected, thanks to you Ivan. And I am reading messages.

Now I need to use many more of the functions of MS Graph…do you know of a swagger file I can import so I don’t have to create these things one at a time?

Hi,

(great idea…don’t create stuff manually…import stuff…brilliant! :slight_smile: )

think this should do it

(But it seems to be big, keeps crashing my connector while saving after import…so maybe delete the operations you dont need before saving (thats what i am gonna try next :slight_smile: ))

B R
Ivan

I tried importing the swagger file and it works ok if you break it down to smaller portions (e.g. from presliced swagger files) BUT seems like the Flow rest connector cannot really handle the generic 2xx reponses.
image
It will instead always convert it to Response Default, which results in multiple responses with the same name and thus an Error.
image

To only handle 200 responses and Errors it would work if the 2xx: in the swagger file is replaced by 200, but that would only cover responses with status code 200. Otherwise it would always go to the default. Might figure out a workaround by scripting to manually create the entries in the file per status code you want enabled.