Tips on trimming URLs out of an email body?

Ahoyhoy!

I’m attempting to make a simple digest of email newsletters that I get. I want to send it through OpenAI to summarize each newsletter, and then store and send in a digest.

I’ve built the scenario out, but the problem is that the body of most email newsletters includes a ton of URLs. They’re often super long, and all of the characters end up maxing out GPT-3 token max and erroring.

Is there any way I could add a formatting step to just pull out the plain text with all links etc removed?

Hi @Derek

This can be done but not straightforward. You can use the Text Parser module “Get Elements” to get all URLs.

Now you need to remove each URL from the original content using the replace Function.

Please try and let me know the result.

If you need assistance, don’t hesitate to contact me.

Regards,
Mohamed Jahar

2 Likes