Can I send email from Functions?

I would like to dynamically compute a st of users and then them a dynamically computed message body.

Is it possible to send this email from a function (written in a code repository) ?

1 Like

Note that Actions can send an email with a function-backed recipient list and message body. Unless you need to send more than 50 emails at once, this should be your first choice.

If you absolutely need more than 50 recipients, Palantir does have an internal API to send emails. Palantirians reading this-- the name to look for is email-service. For non-Palantirians reading this, talk to your Palantir support team and they may be able to get you set up.

You could also use a third party solution like SendGrid or the Outlook API. As long as egress is approved appropriately you can use any sort of SMTP API.

1 Like

Hi, I want to open this question again.

I would also like to send emails through my Gmail SMTP server, which I have created in a compute transform module using external_systems, but I think it would be better to make it a function and trigger when a new object is created, not by dataset condition checks. I already tried the Actions method for this, unfortunately it uses notifications only within Palantir and our use case requires sending emails outside of Palantir so this was not helpful for us.

Is it possible to make my code work also as a function?

Yes! If you use the Google Cloud API and modify your CSP egest policy, then this should be possible if you make a custom function that uses the Google Cloud API with your org’s keys.

This has been done via compute modules in the past and there are some good examples on the AIP Community Repository.

Hope this helps!

https://github.com/palantir/aip-community-registry/tree/develop/GSuite_Send_Email_Compute_Module

https://github.com/palantir/aip-community-registry/tree/develop/Personal%20Gmail%20and%20Calendar%20Connector

1 Like