Cloudflare Email Service: The Wait is Over.
最初直播時間:11月4日,下午12:30 - 下午1:00 [EST]
English
文字記錄 (測試版)
We heard you. Today we're announcing the public beta of Cloudflare's email service. You and your agents can now send transactional emails directly from Cloudflare.
Things like one-time passwords, order confirmations, shipping notifications, password reset links.
No third party required. Let me show you two ways how to send email.
The easiest way is going to be using a worker binding. Here you can see I have a send email worker binding named email.
Then once my domain is onboarded, I can go ahead and send an email with a single email.send.
Here I'm using my email demo.ELS.FYI.
I'll use my email address and press send. All right. Sent.
Now let's see the inbox. Yes.
All right. Let's open it up. Hello. This email was sent using the Cloudflare email service directly from a worker.
That's nice. If you're not building on the worker's platform, you're missing out, but you can still benefit from the email service.
You can also use the REST API. This will work if your application is hosted anywhere other than Cloudflare.
So that's sending. But what about the other direction?
What if someone sent you an email or you want to handle an arriving email?
That's where email routing comes in. You can receive emails and then decide how you want to handle them.
You can forward them, or my favorite, you can handle them with a worker.
Let me show you an example of how I use a worker's AI to figure out next actions based on an email I receive.
Back to our demo. So I'm going to send an email to this domain.
Demo at email demo. Very original. At the same time, I'll tell the logs and you'll see the output.
First let me show you the code.
Inside of our worker, I added this email. So I'm getting the sender, the recipient, the subject, and then I have to parse the email in order to access the body.
Once I have the body, I log it. Finally, I make a request to worker's AI, the new Google Jemma model, which is, and ask it to triage the message.
Then AI will give me a response and I'll log it out.
Let's give it a try. Wrangler tail. Okay. Now it's connected to my worker.
Let me grab this email again. Copy, compose this demo at email demo.
Deliverless. What a great launch. This is awesome. Don't forget to post the video on X.
Send. We wait for the logs. Here's our email. The subject, the body, and here's AI.
It categorizes feedback and engagement and there's an action plan.
I have to acknowledge the positive sentiment and pass the suggestion to the social media team to coordinate the video to post on X.
Now this is cool.
All of this is running on Cloudflare. Like I said, no third party required.
Before I end this video, let me show you a few steps I had to take in order to get this to work.
In order to send emails, I had to onboard the domain under email sending.
It's just as easy as searching your zone and adding it. That's for sending.
Super simple. For receiving emails, there's a few more steps. There's email routing.
Again, your domain needs to be onboarded. You can click under destination workers.
I chose my email sending worker here. That's the one I showed you earlier.
This is all you need to send, receive, and handle emails on Cloudflare.
This unlocks tons of opportunities for you, for your agents. I feel like this was the missing piece.
The Cloudflare email service is available today on all paid plans.
Out of the box, you get 3,000 emails, and then it's 35 cents per thousand.
See the links in the description, tweets, replies, and all that.
Happy Agents Week.
