How to Extract AMP4email Markup from Gmail
Borne from a thread in #EmailGeeks, I’ve decided to collect my thoughts into a guide on how to grab valid AMP4email markup code from your Gmail inbox so that you can play around with it yourself.
Step 1: Open the kebab menu and choose “Show original”.
Step 2: On the “Original Message”, copy and paste everything between…
Content-Type: text/x-amp-html; charset="UTF-8"
Content-Type: text/html; charset="UTF-8"
*Please note: There will be a different series of numbers above Content-Type: text/html; charset=”UTF-8", but it will always look similar.
Step 3: Decode the Quoted-Printable format
Because what you’ve just copied and pasted looks a bit like a jumbled mess to anyone who can read HTML, you’re going to need to convert it to valid HTML markup.
Webatic’s Quoted Printable Converter is a tool that I’ve used, but I’m certain there are others out there that work just fine.
Pro-Tip: Decoding Quoted-Printable encoding also works for any normal HTML email you might see in Gmail too! Just copy everything below Content-Type: text/html; charset=”UTF-8" instead. However, there are easier ways to do that — like using a Litmus Scope bookmarklet to save you a few clicks.
Step 4: Test it out!
Once you’ve grabbed your converted AMP4email markup, you should test it out to see if it functions as expected.
If you don’t have access to an Email Service Provider that has the ability to send out the AMP MIME type (Salesforce, SparkPost, SendGrid, AmazonSES), here are a few alternative ways to test the interactivity.
- Paste the markup into an HTML file and open it up in a browser. This may not be as true-to-life as receiving it in your inbox, the functionality should all be there and you can play around with the markup with the developer tool of your choice.
- Paste the markup into Gmail AMP for Email Playground and send it to your own Gmail inbox. Make sure you have your Developer Settings enabled in your Gmail to receive Dynamic emails, first!