Sitelet https://roxyapi.com/docs/integrations/n8n
Skip to content
  1. Docs
  2. Integrations
  3. n8n

n8n astrology node for workflows and AI agents

Ship a daily horoscope email, a natal chart on form submit, or an AI agent that calls live calculations as tools, on n8n in about 15 minutes, on Cloud or self-hosted.

The official RoxyAPI node is the shortest path: install it once, save your key once, and every one of the 261+ endpoints is a Resource and an Operation to pick, with the inputs as form fields. The HTTP Request node reaches the same API with nothing to install, and the MCP Client Tool node gives an AI Agent a whole domain of tools at once.

Want a working agent before reading on? The n8n astrology AI agent template is a chat companion ready to import: it finds the birth city, calculates the natal chart, reads the daily horoscope and draws a tarot card, with memory across turns. Watch it built from an empty canvas in the video tutorial, under three minutes long.

The n8n astrology AI agent template: a chat trigger into an AI Agent with a chat model, conversation memory and four RoxyAPI tools for city search, natal chart, daily horoscope and tarot

The call that proves it

Run this in a terminal before you build anything. A 200 here means the key is good, so anything that fails next is wiring.

curl "https://roxyapi.com/api/v2/astrology/horoscope/aries/daily" \
  -H "X-API-Key: $ROXY_API_KEY"

No key yet? One key covers every domain and checkout is instant: pricing.

Install the RoxyAPI node

  1. Open Settings → Community Nodes → Install.
  2. Enter @roxyapi/n8n-nodes-roxyapi, tick the risk acknowledgement n8n shows for every community node, and install.
  3. Add a node to any workflow and search for RoxyAPI.
  4. In Credential to connect with, pick Create new credential and paste your key from your account into API Key. n8n checks the key when you save.
  5. Pick Resource Western Astrology, Operation Get Daily Horoscope, Sign Aries, and run it. The response is the same JSON as the curl above.

Required inputs show as fields. Everything optional, including Language and Timezone, sits under Options → Add Option.

The key goes in the credential, nowhere else

Never paste the key into a node field or an expression. The credential is encrypted by n8n and stays out of exported workflows; a field value travels with every workflow you export or share.

The node installs from Settings → Community Nodes on self-hosted n8n. n8n Cloud installs only community nodes that n8n has verified, so on Cloud use the HTTP Request path below until RoxyAPI appears in the nodes panel.

Or call any endpoint with the HTTP Request node

No install, and the same API:

  1. Add an HTTP Request node.
  2. Method GET. URL https://roxyapi.com/api/v2/astrology/horoscope/aries/daily.
  3. Authentication, pick Generic Credential Type, then Header auth.
  4. Create the credential: Name X-API-Key, Value your key from your account. Rename the credential itself RoxyAPI key so it reads well in the dropdown.
  5. Run the node. You get clean JSON with no wrapper: sign, date, overview, love, career, health, finance, advice, column, events, luckyNumber, luckyColor, compatibleSigns, activeTransits, moonSign, moonPhase, energyRating.

Every later node picks that same credential from a dropdown. n8n encrypts credentials in its own database, so the value stays out of the node fields and out of an exported workflow, which carries only the credential name.

Faster start from the reference

The API reference gives you a ready curl for any endpoint. Paste it into Import cURL on the HTTP Request Parameters tab and n8n fills in method, URL, and headers. One catch from the n8n docs: cURL import brings every value in as a string, so for a body with real numbers switch Specify Body to Using JSON afterwards. Then move the key out of the pasted header and onto the credential.

What you can build with the RoxyAPI node

Every workflow below is one RoxyAPI node: pick the Resource and Operation, fill the required fields (map them from a form, a sheet or a webhook with expressions), and pass the JSON to any next node. The rows lead each domain with its most used calculation.

Build thisResource → OperationRequired fields
Daily horoscope email, post or pushWestern Astrology → Get Daily HoroscopeSign
Natal chart when a form is submittedWestern Astrology → Generate Natal ChartDate, Time, Latitude, Longitude, Timezone
Love compatibility for a dating flowWestern Astrology → Calculate Synastry or Calculate CompatibilityPerson1, Person2
Vedic birth chart (kundli)Vedic Astrology → Generate Birth ChartDate, Time, Latitude, Longitude
Daily panchang for a cityVedic Astrology → Get Detailed PanchangDate, Latitude, Longitude
Kundli matching (gun milan)Vedic Astrology → Calculate Gun MilanPerson1, Person2
Upcoming transits for a userForecast → Forecast TransitsBirth Data
Human Design bodygraphHuman Design → Generate BodygraphDate, Time, Timezone
Chinese BaZi four pillarsChinese Astrology → Generate Bazi ChartDate, Time, Timezone
Feng shui Kua numberFeng Shui → Calculate Kua NumberDate, Gender
Life Path numberNumerology → Calculate Life PathYear, Month, Day
Tarot reading botTarot → Cast Three Card or Get Daily Cardnone
Daily biorhythmBiorhythm → Get ReadingBirth Date
I Ching readingI-Ching → Cast Readingnone
Birthstones and crystals by signCrystal and Healing Stone → Get Crystals by ZodiacSign
Dream symbol lookupDream → Get Dream SymbolID
Angel number meaningAngel Number → Get Angel NumberNumber

Charts need coordinates, so put Location and Timezone → Search Cities (field Query) in front of them and map latitude, longitude and timezone from its first city. Every Resource holds more operations than this table: open the node and they are listed by domain.

Send birth data with a POST

Charts, panchang, dasha, compatibility and synastry all take a birth moment.

  1. Resource Western Astrology, Operation Generate Natal Chart.
  2. Map the five required fields with expressions: Date {{ $json.birth_date }}, Time {{ $json.birth_time }}, Latitude {{ $json.latitude }}, Longitude {{ $json.longitude }}, Timezone {{ $json.timezone }}.
  3. House System, Node Type and Language are under Options when you need them.

The node sends Latitude and Longitude as numbers, and a Timezone that looks like a number (-5, 5.5) as a number too, so there is no JSON body to get wrong.

Resolve the city first, never ask for coordinates

No visitor knows their birth latitude. Put a HTTP Request node on GET https://roxyapi.com/api/v2/location/search?q=berlin ahead of the chart node and read cities[0].latitude, cities[0].longitude and cities[0].timezone from it. The timezone it returns is an IANA name, which is what you want: the server resolves it to the correct offset for the birth date, so a summer birth and a winter birth are both right. A decimal offset like 5.5 is accepted but cannot know about daylight saving.

The response is plain JSON, so every field maps in any downstream node. planets is an array of objects with name, sign, degree, house, isRetrograde, dignity and more, so use a Split Out node to fan it out, or pick one inline:

{{ $json.planets.filter(p => p.name === 'Sun')[0].sign }}

Ship a daily horoscope email

Three nodes, start to finish.

  1. Schedule Trigger at 08:00 daily.
  2. RoxyAPI, Resource Western Astrology, Operation Get Daily Horoscope, Sign Aries. Under Options, add Timezone with the timezone of your readers, such as America/New_York, so the day turns over on their clock. With the HTTP Request node, the same call is https://roxyapi.com/api/v2/astrology/horoscope/aries/daily?timezone=America/New_York.
  3. Gmail send, subject Your daily horoscope, body {{ $json.column }}: the complete column for the day, 120 to 180 words, ready to send. For a push notification or SMS, send the 30 to 60 word {{ $json.overview }} instead.

To cover all twelve signs, add a Loop Over Items node over the sign list and a short Wait between iterations rather than firing twelve calls at once.

Set the Language option on the node, or add ?lang= to any URL, for one of ten languages (en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant). The prose translates, and so does the sign a horoscope returns (?lang=hi returns सिंह for Leo), so branch an IF or Switch node on the sign you sent, never on the one that comes back.

Give an AI agent the tools

This is where breadth on one key pays off: instead of wiring one endpoint per tool, you connect one server and the agent gets a whole domain.

Every domain has a Remote MCP server whose tools are generated from that domain spec, so you wire one node and the agent gets all of them.

  1. Add an AI Agent node and connect a chat model.
  2. Connect an MCP Client Tool node to the agent Tools input.
  3. Endpoint https://roxyapi.com/mcp/astrology. Swap the last segment for any domain slug: vedic-astrology, tarot, numerology, human-design, location.
  4. Server Transport HTTP Streamable. Our servers are Streamable HTTP, not SSE.
  5. Authentication Header Auth, and select the same RoxyAPI key credential from the HTTP call above. Bearer Auth with the key as the token works too.
  6. Tools to Include All to start. Once the agent works, switch to Selected and keep only what the assistant needs, because every exposed tool is a definition the model reads on every turn.

Add one MCP Client Tool node per domain. Include the location server whenever a chart is in play so the agent can turn a city name into coordinates by itself.

Use a secret key here. Publishable pk_ keys are refused on the MCP endpoints.

Cache what does not change

n8n does not cache HTTP responses. A horoscope is the same all day for a given sign, so store it: a Data table (built into n8n) or a Postgres table keyed by sign and date. Read the store, call RoxyAPI only on a miss, write the result back. One fetch per sign per day, however much traffic the workflow serves. The caching guide has the shelf life of every endpoint type.

Gotchas

The key ends up in my exported workflow

That happens with Import cURL, which pastes the header value straight into the node. Move it to a Header auth credential and the export carries only a reference.

I get 400 back and cannot tell which field is wrong

A 400 carries issues[] listing every field problem at once, so read that array rather than guessing one field at a time. All errors are { error, code, doc_url }. Retry only on 429 and on 5xx, never on a 400.

My numbers arrive as strings

cURL import types every imported value as a string. Switch Specify Body to Using JSON and write latitude and longitude unquoted.

ECONNREFUSED on a self-hosted instance

The container cannot reach roxyapi.com. Check outbound HTTPS on port 443, the firewall, and DNS inside the container.

405 with an allow list in the response

Wrong method. The response names the methods that path accepts. Horoscopes and moon phases are GET; charts, spreads and readings are POST.

429 in the middle of a loop

You are through your monthly request allowance. Put a Wait node inside the loop, cache daily content, or move up a plan. See authentication for the quota headers on every response.

The agent tool runs the wrong operation

Adding RoxyAPI from the agent Tool picker inserts it with its first operation. Open the tool and set Resource and Operation to the one the agent should call.

My $fromAI expression fails on every call

The expression editor closes {{ for you, so typing the closing }} as well leaves }} }} and the field never evaluates. Check that the expression ends with exactly one }}.

RoxyAPI does not appear when I search the nodes panel

Install it first, from Settings → Community Nodes → Install with @roxyapi/n8n-nodes-roxyapi. On n8n Cloud, only community nodes that n8n has verified can be installed; until RoxyAPI is one of them, use the HTTP Request node with a Header auth credential, which reaches every endpoint the node does.

Pick the next endpoint

FAQ

Is there an official RoxyAPI node for n8n?

Yes. @roxyapi/n8n-nodes-roxyapi is the official RoxyAPI community node. It covers every endpoint across 18 domains as a Resource and an Operation, stores the key in one encrypted credential, and works as a normal workflow step or as a tool for the n8n AI Agent. Install it from Settings → Community Nodes on self-hosted n8n.

Is there a ready n8n astrology AI agent template?

Yes. The n8n astrology AI agent template is an MIT workflow you import from a file: a chat trigger, an AI Agent with memory, and RoxyAPI tools that find the birth city, calculate the natal chart, read the daily horoscope and draw a tarot card. Add your RoxyAPI key and a chat model key, and it answers birth chart questions from live calculations. A video tutorial shows the same agent built from scratch.

How do I let the n8n AI Agent choose the zodiac sign?

Add the RoxyAPI node to the Tools input of the AI Agent, pick Western Astrology and Get Daily Horoscope, switch the Sign field to Expression, and write {{ $fromAI('sign', 'Zodiac sign in lowercase') }}. The model then fills the sign from the conversation, so asking about Scorpio calls the horoscope for Scorpio.

Can I use the RoxyAPI node on n8n Cloud?

n8n Cloud installs only community nodes that n8n has verified. Self-hosted n8n installs the RoxyAPI node from Settings → Community Nodes today; on Cloud, the HTTP Request node with a Header auth credential reaches every endpoint the node does.

Can n8n call an astrology API without any code?

Yes. The RoxyAPI node turns every endpoint across 18 domains into a form with a Resource, an Operation and input fields. Without installing anything, one HTTP Request node with a Header auth credential named X-API-Key reaches the same endpoints. Neither path needs a Code node.

How do I use RoxyAPI as a tool for an n8n AI Agent?

Two ways. For a whole domain at once, connect an MCP Client Tool node to the Tools input of the AI Agent, set the Endpoint to https://roxyapi.com/mcp/{domain}, set Server Transport to HTTP Streamable, and pick Header Auth with your X-API-Key credential. For a few chosen calculations, connect the RoxyAPI node itself as a tool, pick the Resource and Operation, and let the model fill the fields with Let the model define this parameter or $fromAI().

Where does n8n store my API key?

In a credential, which n8n encrypts in its database. The value stays out of the node fields and out of an exported workflow, which carries only the credential name. Importing a cURL command instead writes the key into the node itself, which is fine for a quick test and wrong for anything you export or share.

How do I turn a birth city into coordinates in n8n?

Call GET /location/search?q={city} in an HTTP Request node before the chart node and read latitude, longitude and timezone off the first city in the cities array. The timezone comes back as an IANA name, which handles daylight saving for the birth date automatically.

Does the free n8n tier work with RoxyAPI?

Yes. Self-hosted n8n is free and there is nothing paid on the RoxyAPI side of the wiring either: the RoxyAPI node is free to install, and the HTTP Request node, credentials, and the MCP Client Tool node are all standard. You need a RoxyAPI key, and one key covers all 18 domains.