# Email to Slack

Send incoming emails to Slack as images with Zapier.

In this guide, we will learn how to post screenshots of emails into Slack. It’s super simple with using Zapier + the HTML/CSS to Image integration.

![Email screenshot shared in Slack](/assets/images/slack-email.png)

Sharing a full image of the email makes it possible to show things like charts or graphs with your team. Adding a nice visual to every message.

## How it works

We’ll be accomplishing this with 3 steps.

1.  Listen for inbound emails to Zapier.
2.  Create an image from the email using HTML/CSS to Image.
3.  Post that image into a Slack channel.

![Zapier workflow: receive email, render image, send Slack message](/assets/images/slack-email-1.png)

## Step by step guide

1\. First, you’ll need to create a new Zap and use the “Email” trigger. This will allow you to send an email to a special address and it will instantly trigger the Zap to start.

![Set up the email trigger](/assets/images/slack-email-2.png)

2\. Once that is setup, give it a try by sending a test email to your new address. After a few moments, you should see your email in Zapier.

![Send a test email to Zapier](/assets/images/slack-email-3.png)

3\. Next, you’ll want to generate an image of the email. For that you can use the HTML/CSS to Image plugin. This is how we’ll convert our email into an image.

![Set up the HTML/CSS to Image integration](/assets/images/slack-email-4.png)

4\. For authentication, you’ll need to grab your API key details from the dashboard. The free account will allow you 50 screenshots per month.

5\. Next, you’ll use the “Create image” action. See the screenshot for how to set it up.

*   Set HTML to the `Body HTML` from your email.

![Map the email body to the image HTML field](/assets/images/slack-email-5.png)

6\. Give that a test, you’ll get back a URL to your image. This is the image you’ll then be able to share in Slack.

7\. Next, you’ll need to connect the Zap to Slack. Use the Slack plugin and connect your account.

![Connect Zapier to Slack](/assets/images/slack-email-6.png)

8\. Choose the “Send Channel Message” action and start configuring it. The key here is setting the “Attach image by url” field to the URL returned to you by HTML/CSS to Image.

Customize the message

Add the sender and subject to **Message Text** to give your team context.

![Configure the Slack message](/assets/images/slack-email-7.png)

9\. Now you can give it a test run. The message, with your test email should get posted into Slack. Save your Zap and test it for real by sending another email to your address.

![Email screenshot appearing in Slack](/assets/images/slack-email-8.gif)

## That’s it!

Now each time an email is sent to the Zapier address, it will quickly appear in your Slack channel as an image.

You can customize this further by pulling emails from different sources. Such as from gmail directly if you’d like. You can also do things like include the text of the email in the message so that people can copy and paste it, or click any links.

## Need help?

Talk to a human. Email [support@htmlcsstoimage.com](mailto:support@htmlcsstoimage.com) and we’ll help you get started.
