# Zapier

A Zap that takes a birth date, time, zone and coordinates from its trigger, asks the API for the chart and turns the Ascendant into a sign name. The request below was sent to production exactly as the step builds it; the Zapier steps follow Zapier's own help center as of 2026-09-17.

<Aside type="caution" title="This needs a paid Zapier plan">
API by Zapier, Webhooks by Zapier and Formatter are premium apps. Zapier's help center marks all three as unavailable on the Free plan, and the Lookup Table step needs Professional or higher. On Free, use [Make](/en/integrations/make/) or [n8n](/en/integrations/n8n/) instead.
</Aside>

Before you start, create a key as described in [A key for an automation](/en/integrations/#a-key-for-an-automation), scoped to `chart`.

## 1. Put the key in a connection

Header values typed into a Webhooks by Zapier step are stored in the step, where anyone with access to the Zap can read them. API by Zapier keeps them in a connection instead.

1. On the **Apps** page press **+ Add connection** and pick **API by Zapier**.
2. **Authentication type**: Static Headers (API key).
3. **Headers**: `X-Api-Key: ` followed by your key, on one line.
4. **Domain filter**: `api.astroway.info`, so the connection cannot be pointed anywhere else.

## 2. Call the chart

Add an action, pick **API by Zapier**, event **API Request**, and choose the connection.

- **Method**: `POST`.
- **URL**:

  ```
  https://api.astroway.info/v1/chart
  ```

- **Body**: the JSON below, with the trigger's fields mapped in.

```json
{
  "date": "1990-05-15",
  "time": "14:30:00",
  "timezone": "Europe/Kyiv",
  "latitude": "50.45",
  "longitude": "30.52"
}
```

Replace each value with the matching field from your trigger and keep the quotes around every one of them, numbers included. Zapier inserts a mapped field as plain text and does not add quotes for you, and the API accepts `"50.45"` as a number. Do not add the key in the step's Headers: the connection supplies it.

Test the step. A good answer starts with `"ok": true`, and `data.input.timezoneOffset` is `4` for the example: the offset Kyiv kept on that date.

## 3. Turn the Ascendant into a sign

Two Formatter steps.

**Formatter, event Numbers, transform Spreadsheet-Style Formula.** Formula:

```
FLOOR(ASCENDANT / 30)
```

with `ASCENDANT` replaced by the mapped `data.houses.ascendant` from step 2. For the example it gives `5`.

**Formatter, event Utilities, transform Lookup Table.** Lookup Key is the result of the formula. The table:

| Key | Value |
|---|---|
| 0 | Aries |
| 1 | Taurus |
| 2 | Gemini |
| 3 | Cancer |
| 4 | Leo |
| 5 | Virgo |
| 6 | Libra |
| 7 | Scorpio |
| 8 | Sagittarius |
| 9 | Capricorn |
| 10 | Aquarius |
| 11 | Pisces |

The result for the example is `Virgo`.

The Sun and the Moon work the same way. They are the first and second entries of `data.planets`, each with its own `longitude`: 54.34 (Taurus) and 296.39 (Capricorn) for the example.

## If you use Webhooks by Zapier instead

It works, with the key in the step rather than in a connection. For the chart choose the **Custom Request** event: it sends the Data field exactly as typed, so the JSON above goes out unchanged. Set **Method** to `POST`, and in **Headers** add both `X-Api-Key` with your key and `Content-Type` with `application/json`.

## When the step fails

- **`400 INVALID_FIELD` with `timezone` in `details`**: the mapped zone is empty, an abbreviation such as `EST`, or not a zone name.
- **`400` with `date` or `time` in `details`**: the trigger's format is not `YYYY-MM-DD` / `HH:MM:SS`; add a Formatter date step before the call.
- **`403 ENDPOINT_NOT_IN_SCOPE`**: the key's scope does not include `chart`.
- **`429 KEY_BUDGET_EXHAUSTED`**: the key reached its own budget; raise it in the dashboard.

The API does not geocode. If your trigger only has a place name, the coordinates need to come from the trigger itself or from a geocoding service you hold a key for.
