My agency is shutting down any SMTP emails that just use a username and password since it's now legacy protocol in Office 365. Because of this I won't be able to use the SMTP output as it is in ArcGIS Velocity because it doesn't support Oauth2. So looking for someway to integrate Oauth2 for the email and password for office 365 piece of SMTP email output. I don't really understand how all of that works or if it's even possible. 😅
https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-...
Not sure if this would work for you, but instead of sending Mail, use the HTTP capability to post to a Webhook/RestAPI endpoint. Then use that tool to send your emails.
SendGrid and Power Automate are two possible tools to consider.
Another option is to use something like mxRoute as an intermediate mail routing tool.
Power Automate is definitely an option. What might be the way I'd set that up?
I've got these two RTAs right now, first is sending just me an email when new incidents appear in the last 5 minutes. The second is a dynamic email that is sending an email to the email attribute from all the points that were queried from a specific buffer of a another point (donation location).
Would I essentially be moving these flows completely over to power automate or just pushing the results before the email to a table or something and power automate would watch that??
"Sending email with the Graph API " is something my IT suggested, but maybe would need support on how to populate the details with the way that arcgis velocity would have filled out the SMTP stuff.
Well,
Obviously you approach may be differement.
But I just use Output --> Web and Messaging --> HTTP, where you have the send email node.
Depending on what you target built the payload in Arcade.
So you have to set up an HTTP poller to send to PowerAutomate?
I pretty much know nothing about webhooks and payloads full disclosure.
No, you are setting up an output node, not an input node.
Correct, so I'm asking if you set up an output node for power automate?
Or you're just saying that to do a web hook email, you used the HTTP output?
Our IT wants to avoid having to build an external webhook.
April 1st Microsoft is turning for sure turning off SMTP. So now I'm looking at using power automate to do send an email, but I'm not sure at what point I would involve power automate. Does the RTA still need to run to a certain point before power automate is used, or am I completely discarding the RTA/ArcGIS Velocity and just using powerautomate.
I would simply change out your output to the HTTP node and Post to Power Automate or some other tool of your choice. There are many options. You could do it in parallel with what you already have, and then remove the email from the RTA.
---
Cool. Ok so on the same page.
What would posting to power automate look like? What are the things I have to do to enable that?
Good Morning,
So from the Power Automate side, I can only talk in theory as I don't use the tool myself. But a quick Google search finds a number of how-tos.
On the Velocity side, you will need to build the body of the message as a JSON object in Arcade and return it for the Node to send. I can help you get started, as I have done many of them. Basically, build up your variables and then return the JSON string --
var to = 'user@email.com';
var subject = 'This is a test Email';
var message = 'The test message is meant to get the API working';
return '{"to":["' + to + '"], "subject":"' + subject + '", "message":"' + message + '"}';
I just thought I would check back with you to see if you were able to implement a working solution.
----
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.