Go to an Email sending service of your choice i.e.: Brevo (formerly known as SendInBlue), sign up, select free version, then

Save the API key in a textfile.

Go to www.cloudflare.com, Sign Up, Select Free Version and look in the navigation for the “Workers & Pages”.

Click on the “Create” button, on the next page click on the “Create Worker” button.

Give you worker a funny name and click “Save”.

On the next page click “Finish”.

Now click the “Edit code” button and you are finally where you should be.

This is the code editor. Here we will in a second put in the glue that connects your mail sender service API to your Custom GPT.

Now we need a worker script. Open ChatGPT in the 4o version. (Do not try to code with the 3.5 version.)

Now you also need to go and look for the Email Sending API Documentation page of the email sending service. I fond Brevos one here https://developers.brevo.com/docs/send-a-transactional-email. Copy that URL then.

In ChatGPT you write something like this.

I want to create a customGPT that sends emails via their OpenAPI integration.

First I now need a cloudflare worker script that takes the API described here https://developers.brevo.com/docs/send-a-transactional-email and takes whatever request is then gets from the CustomGPT to send the email via the Email Services API. We only want to send text emails with subject and body. Easiest implementation possible.

My verified sender email is hudri.wudri@example.com

This is my API key: xkeysib-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Note: in xkeysib-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX you should copy&paste the API key of the email service you created previously. Also use your email in the text.

The code that you then get you copy.

👆This code you copy into the Cloudflare editor👇.

Click on the “Deploy” button and then on “workers.dev” blue underlined link.

You will get something like “Method not allowed” but that is ok, just copy the URL of that page.

Type something like that into the existing ChatGPT thread.

Thank you for the worker code. The worker is now deployed under https://hudri-wudri-7e76.XXXXXXXXXXXX.workers.dev/

I now need the simplest possible OpenAPI 3.1.0 specification file so that the CustomGPT can access the API and trigger the event.

The OpenAPI specification must fit the provided worker code perfectly. Include OperaterIDs

(I added the note with the OperatorId cause this is something that ChatGPT sometimes forgets.) Whatever code comes out copy it.

Now go to the “Create new Custom GPT” page.

Set the necessary fields to values you like.

👆And then click on “Create new action”.

Copy & paste the ChatGPT created OpenAPI specification in there.

If you plan to publish this GPT on the open web you also need to include a link to your privacy policy.

Click the second back button from the top. (This is bad UX from the OpenAI team🤦‍♂️🤦‍♂️)

Test it. When asked, click the “Confirm” button.

Test it continues.

Enjoy it.

If you are happy with the result (the integration, not the jokes) click on “Create” to publish you CustomGPT with Email superpowers.

The same approach can be used for any other API integration with custom GPTs. Lots of copy & paste, lots of clicking. The AI does the rest.