# Groundmail for Activepieces

Send transactional email from [Activepieces](https://www.activepieces.com) flows, and start flows when an email is delivered, bounces or gets opened, with the Groundmail piece.

---

## Install the piece

The piece is published on npm as `@groundmail/piece-groundmail`.

1. In Activepieces, open **Settings → My Pieces → Install Piece**.
2. Enter `@groundmail/piece-groundmail` and install it.

It needs Activepieces 0.82 or later. Self-hosted Activepieces can install it on any edition; on Activepieces Cloud, installing your own pieces depends on your plan.

---

## Connect your account

When you add a Groundmail step, create a connection with an API key from **API keys** in the dashboard.

- **Send Email** works with a sending-only key.
- **Get Email**, **New Email Event** and most **Custom API Call** requests need a full-access key.

Send from an address on a [verified domain](https://docs.groundmail.dev/domains).

---

## Actions

| Action | What it does |
|--------|--------------|
| **Send Email** | Sends one email: sender name and address, to, cc, bcc, reply-to, subject, HTML or plain text, up to 10 attachments, tags, custom headers and an optional scheduled time. Set **Idempotency Key** so a retried flow sends one email. |
| **Get Email** | Returns an email's details and delivery status by its id. |
| **Custom API Call** | Calls any other [API endpoint](https://docs.groundmail.dev/api/emails) with your connection's key. |

---

## Trigger: New Email Event

Pick the events to listen for: sent, delivered, delivery delayed, bounced, complained, opened, clicked, failed, held or suppressed (delivered and bounced are selected by default). When you publish the flow, Groundmail creates a [webhook](https://docs.groundmail.dev/api/webhooks) pointing at it, and verifies each delivery's signature. Turning the flow off deletes the webhook.

Each run carries one event: its type, time and the email's data (id, recipients, subject, status and bounce details).
