# Extract HTML from sent email automatically

**URL:** <https://community.hubspot.com/t/extract-html-from-sent-email-automatically/98682>\
**Category:** CMS Development\
**Tags:** javascript, email, html\
**Created:** [January 25, 2024, 6:01pm UTC](https://community.hubspot.com/t/extract-html-from-sent-email-automatically/98682 "2024-01-25T18:01:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaSchilling](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@SaSchilling](https://community.hubspot.com/u/SaSchilling)\
**Post date:** [January 25, 2024, 6:01pm UTC](https://community.hubspot.com/t/extract-html-from-sent-email-automatically/98682/1 "2024-01-25T18:01:33Z")

</div>

Hi! Maybe anyone has some kind of input on this issue I am trying to solve:

In a Workflow I want to extract the HTML code of an E-Mail I have send in the previous step. This would be needed to attach it to an open case in SF.

Other ideas could be to get the individual ID of this particular automated e-mail somehow and then to use: **GET** /marketing/v3/emails/{emailId}

But for that I also would not know how to access that info.

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 26, 2024, 4:36pm UTC](https://community.hubspot.com/t/extract-html-from-sent-email-automatically/98682/2 "2024-01-26T16:36:36Z")

</div>

Hey, @SaSchilling Thanks for the interesting question. As this is not a built-in function of workflows, you may need to look at other options. Capturing the ID of the email is our most difficult challenge. I don’t see a documented way to do this. from a workflow.

We’ll also leave this post open in case some of our brilliant and creative community members have any suggestions.

Best,

Jaycee
