1. Docs
  2. Integrations
  3. n8n

n8n

Connect RoxyAPI to n8n in under three minutes and build automated astrology, tarot, numerology, I-Ching, dream, crystal, angel number, and biorhythm workflows on any schedule. One API key, 10 domains, 130+ endpoints, and if you can drag nodes on a canvas you can ship a daily horoscope bot, a Life Path calculator on form submit, or a Vedic kundli explainer that runs on autopilot. This page walks you through every click. No backend code, no framework, no "clone this repo" step.

n8n is a visual workflow builder for automating anything that talks to an API. It is the open source alternative to Zapier and Make, with a proper HTTP Request node, a growing AI Agent system, and self-hosted and cloud options. If you are a vibe coder who wanted Zapier but hit the "no custom code" wall, n8n is probably what you actually wanted.

The fastest path: import curl

n8n has a secret weapon for anyone who has ever copy-pasted a curl command: the Import cURL button on the HTTP Request node. You literally paste our curl example and n8n builds the entire node for you, headers and all. This is the fastest way to go from zero to a working RoxyAPI call on n8n.

Step 1: add an HTTP Request node

  1. Open your n8n workflow (cloud or self-hosted, does not matter)
  2. Click the + on the canvas to add a node
  3. In the node picker, search for HTTP Request
  4. Click it

An empty HTTP Request node opens.

Step 2: click Import cURL and paste

  1. Look for the Import cURL button on the Parameters tab of the node
  2. Click it
  3. Paste this curl command, replacing YOUR_KEY with your RoxyAPI key from your account page:
curl "https://roxyapi.com/api/v2/astrology/horoscope/aries/daily" \
  -H "X-API-Key: YOUR_KEY"
  1. Click Import

n8n parses the command and fills in the Method (GET), URL (https://roxyapi.com/api/v2/astrology/horoscope/aries/daily), and a header parameter (X-API-Key with your key). Done.

Step 3: click Execute Node

Hit the Execute Node button at the bottom of the node. You should see a JSON response like this in the right panel:

{
  "sign": "Aries",
  "date": "2026-04-13",
  "overview": "Today, your natural leadership shines through...",
  "love": "Venus in your 5th house favours playful encounters...",
  "career": "Mars supports decisive action on a stalled project...",
  "luckyNumber": 7,
  "luckyColor": "Red",
  "moonSign": "Libra",
  "energyRating": 8
}

That is a live RoxyAPI call running inside n8n. Now connect it to a Schedule trigger, a Webhook, or an AI Agent and you have a working automation.

The Import cURL path hardcodes your API key into the node. This is fine for quick tests but not for production. For anything you will actually run on a schedule, switch to the Header Auth credential pattern below. It saves your key once and reuses it across every workflow without ever showing the value in the node UI.

The standard path: save your key as a Header Auth credential

Use this path for anything beyond a quick test. Your RoxyAPI key gets saved once as a reusable credential and every future HTTP Request node can point at it without you pasting the key again.

Step 1: open the HTTP Request node authentication

  1. Drop an HTTP Request node on the canvas (or open an existing one)
  2. Scroll to the Authentication dropdown
  3. Choose Generic Credential Type
  4. A second dropdown appears labelled Generic Auth Type. Choose Header Auth

Step 2: create the credential

  1. A new field appears: Credential for Header Auth
  2. Click Create New Credential
  3. n8n opens a credential editor with two fields:
    • Name — set this to X-API-Key (this is the header name that gets sent)
    • Value — paste your RoxyAPI key from your account page
  4. At the top of the editor, rename the credential to something clear like RoxyAPI key (this is the label n8n shows you in dropdowns later)
  5. Click Save

The credential is stored encrypted on n8n's side (cloud) or in your own n8n database (self-hosted). It never appears as plain text in the node UI, in exported workflow JSON, or in execution logs. Every future RoxyAPI HTTP Request node in any workflow can pick this credential from the dropdown. Rotate the key by editing this one credential and every workflow picks up the new value automatically.

Step 3: configure the request

  1. Back in the HTTP Request node, set Method to GET or POST
  2. Set URL to the endpoint you want. For a daily horoscope:
    https://roxyapi.com/api/v2/astrology/horoscope/aries/daily
  3. For endpoints that need a JSON body (natal chart, synastry, Vedic kundli, KP significators), turn on Send Body, pick JSON as the body content type, and paste your payload
  4. Click Execute Node

You should see the same clean JSON response. The key never appears in the node; it is injected from the credential at call time.

Power path: use RoxyAPI as an AI Agent tool

n8n's AI Agent node can call tools. An HTTP Request node attached to an AI Agent becomes a callable tool for the LLM. This is how you build agents that decide on their own whether to look up a horoscope, a tarot card, a dream symbol, or a numerology number.

Step 1: drop an AI Agent node

  1. Click + on the canvas and search for AI Agent
  2. Add an AI Agent node
  3. Connect a chat model (OpenAI, Anthropic, Groq, Ollama, whatever you use)

Step 2: attach an HTTP Request tool

  1. In the AI Agent node, look for the Tools input on the bottom of the node
  2. Connect an HTTP Request node to the Tools input. n8n treats any HTTP Request node wired to the Tools input as a callable tool for the agent
  3. Inside that HTTP Request node, set the URL with an n8n expression the LLM can fill in, for example:
    https://roxyapi.com/api/v2/astrology/horoscope/{{ $fromAI("sign") }}/daily
  4. Under Authentication, select Generic Credential Type > Header Auth and pick your RoxyAPI key credential
  5. Give the tool a clear Name and Description so the agent knows when to call it. Example description:

    Fetches the daily horoscope for a zodiac sign. Input: sign (string, one of aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius, pisces).

Now ask the agent "what is my horoscope today if I am a Leo" and it calls the RoxyAPI tool with sign=leo on its own.

Add one HTTP Request tool per domain you want the agent to handle (horoscope, natal chart, tarot spread, Life Path lookup, dream search). Write short, specific tool descriptions. A tool description like "calls tarot API" is vague; "pulls a three-card past-present-future tarot reading from a 78-card Rider-Waite deck" tells the LLM exactly when to reach for it.

Use expressions and variables from upstream nodes

n8n's expression syntax lets you reference data from previous nodes inside any HTTP Request field. The syntax is {{ $json.fieldName }} for the current item's JSON.

URL with a variable from a Webhook trigger

https://roxyapi.com/api/v2/astrology/horoscope/{{ $json.sign }}/daily

JSON body with variables (natal chart on form submit)

Turn on Send Body, pick JSON as the body content type, choose Using JSON specification, and paste:

{
  "datetime": "{{ $json.birth_datetime }}",
  "latitude": {{ $json.birth_lat }},
  "longitude": {{ $json.birth_lng }},
  "timezone": "{{ $json.timezone }}"
}

n8n evaluates every expression at runtime. When the workflow runs, {{ $json.birth_datetime }} gets replaced with the actual value from the upstream node (for example a Webhook capturing form data or a Set node hardcoding test values).

Common upstream trigger patterns

  • Schedule Trigger. Runs your workflow on a cron. Perfect for a daily horoscope email that hits /astrology/horoscope/aries/daily every morning at 8:00 and sends to a Gmail or Slack node.
  • Webhook. Exposes a URL you can POST to. The request body becomes $json in downstream nodes. Wire a Webflow form or a no-code app to this.
  • Chat Trigger. Lets a visitor chat with your workflow. Combine with an AI Agent tool setup for a tarot or horoscope chatbot.
  • Form Trigger. n8n's built-in form. Captures birth date, time, and place; feeds straight into the HTTP Request body.

Fallback: API key as a query parameter

If the credential path is somehow blocked for you, every RoxyAPI endpoint also accepts the key as a query parameter:

https://roxyapi.com/api/v2/astrology/horoscope/aries/daily?api_key=YOUR_KEY

Prefer the Header Auth credential whenever you can. Query parameters end up in n8n execution logs, any proxies between n8n and RoxyAPI, and your browser history if you test in the canvas. Headers are the safer home for secrets.

Test your API key outside n8n first

Before you wire anything into a workflow, confirm your key works on its own. Open a terminal and run:

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

If that prints JSON, the key is good and any error you see inside n8n is a node config issue, not a RoxyAPI issue. If it returns 401, either the key is wrong or your subscription is inactive. Double-check at your account page.

Troubleshooting

401 api_key_required

{
  "error": "API key is required. Provide via X-API-Key header or api_key query param",
  "code": "api_key_required"
}

n8n did not attach the header. Open the node and check:

  1. Authentication is set to Generic Credential Type
  2. Generic Auth Type is Header Auth (not Bearer, not Basic)
  3. The credential you picked has Name set to X-API-Key exactly (hyphens required, case does not matter but spelling does)
  4. You are not also manually setting an Authorization: Bearer ... header under Send Headers (that overrides credential headers in some n8n versions)

401 invalid_api_key

The header reached the server but the key value is wrong. Open Credentials in the n8n left sidebar, find your RoxyAPI credential, and paste the key again with no leading or trailing spaces.

429 rate_limited

You hit your plan quota. Every RoxyAPI response carries X-RateLimit-Remaining and X-RateLimit-Reset headers so you can see exactly how many requests you have left. Add a Wait node before high-frequency loops, use n8n's batching on the HTTP Request node, or upgrade on the pricing page.

404 not_found with a suggestion field

{
  "error": "Not found",
  "code": "not_found",
  "suggestion": "Did you mean POST /astrology/natal-chart?",
  "docs": "https://roxyapi.com/products/astrology-api"
}

You hit the wrong path. RoxyAPI returns the closest valid route in the suggestion field. Copy that path into the URL field and retry.

405 method_not_allowed

You hit an endpoint with the wrong HTTP verb, for example a GET on an endpoint that only accepts POST. The response body has an allow array listing the valid methods. Change the Method dropdown in your node and retry.

"Error: connect ECONNREFUSED"

Self-hosted only. Your n8n instance cannot reach roxyapi.com. Check your container has outbound HTTPS, your firewall allows port 443, and DNS is working. This is never a RoxyAPI-side issue.

Extend your integration

You have one endpoint working in n8n. Adding the next 130 is the same pattern: drop another HTTP Request node, change the URL, change the body, the Header Auth credential is reused automatically. Three places to find the next endpoint to wire up:

  • Interactive API reference — Scalar-powered live docs for every endpoint across all 10 domains. Try a call in the browser with the pre-filled test key, copy the curl example, then paste it into n8n's Import cURL button and you have a configured node in seconds.
  • Domain guides — short walkthroughs of which endpoints to call in what order for a given product:
  • AI Agent tools. If you wired up the AI Agent path, every new HTTP Request tool you attach gives the agent another callable endpoint without changing the system prompt. Add a tool per domain, write a clear description, and let the agent pick.

The pattern is the same every time: horoscope today, compatibility tomorrow, kundli next week. One credential, every endpoint unlocked.

What to build first

Copy these into your n8n canvas and tweak. They all ship in under 20 minutes with the Header Auth credential pattern above.

  • Daily horoscope email. Schedule Trigger (8:00 daily) → HTTP Request (/astrology/horoscope/{sign}/daily) → Gmail Send. One workflow per sign, or loop through all 12 with a Split In Batches node. Your subscribers wake up to a personalised reading.
  • Webhook-powered Life Path calculator. Webhook Trigger (receives name and birth date) → HTTP Request (/numerology/life-path) → Respond to Webhook. Point any no-code form builder at the webhook URL and you have a live numerology endpoint with zero backend code.
  • Daily tarot card to Slack. Schedule Trigger (cron) → HTTP Request (POST /tarot/daily) → Slack post. Your team starts the day with a tarot card.
  • AI astrology chatbot. Chat Trigger → AI Agent with two HTTP Request tools (/astrology/horoscope/{sign}/daily and /astrology/natal-chart) → response. The agent picks the right endpoint based on whether the user asks about their day or their chart.
  • Dream journal with auto-interpretation. Form Trigger (dream description) → HTTP Request (GET /dreams/symbols) → PostgreSQL Insert (saves dream + interpretation) → Email with the matching symbols.
  • Vedic kundli on form submit. Form Trigger (birth date, time, place) → HTTP Request (/vedic-astrology/birth-chart) → Google Docs (generates a branded PDF report). Full kundli with nakshatra, Vimshottari Dasha, and panchang delivered automatically.
  • Weekly horoscope roundup. Schedule Trigger (Monday 9:00) → loop through 12 signs → HTTP Request (/astrology/horoscope/{sign}/weekly) → Merge → Mailchimp send. One workflow, one newsletter, every subscriber served.

FAQ

How do I connect n8n to RoxyAPI?

Add an HTTP Request node, set Authentication to Generic Credential Type > Header Auth, create a new credential with Name X-API-Key and your RoxyAPI key as the Value, and point the node URL at any endpoint under https://roxyapi.com/api/v2/. The credential is reusable across every workflow in your n8n instance.

Does n8n cloud work, or do I need self-hosted n8n?

Both work identically. n8n cloud, Docker self-host, npm install, Railway deploy, Render deploy — the HTTP Request node, the Header Auth credential, and the AI Agent tool path are all the same. Pick whichever hosting you prefer.

Can I use the n8n AI Agent node with RoxyAPI?

Yes. Connect an HTTP Request node to the AI Agent's Tools input. The HTTP Request node can use the same Header Auth credential you already created. Write a clear tool name and description so the agent knows when to call it. You can attach multiple HTTP Request tools (one per endpoint) for an agent that routes queries across astrology, tarot, numerology, and more.

Is there a predefined credential type for RoxyAPI in n8n?

Not yet. Use Generic Credential Type > Header Auth with X-API-Key as the name. If you want a native RoxyAPI node in n8n, reply to your onboarding email and tell us. Enough interest and we will ship one.

How do I import RoxyAPI endpoints quickly without reading docs?

Paste any curl example from the API reference into the HTTP Request node's Import cURL button. n8n parses the method, URL, headers, and body. This is the fastest way to go from a published example to a working node.

How accurate are the astrology calculations behind my n8n workflows?

Every position comes from Roxy Ephemeris, verified against NASA JPL Horizons. See the methodology page for accuracy details, including sub-arcsecond planet positions and standard Placidus house calculation.

Can I cache RoxyAPI responses in n8n to save quota?

n8n itself does not have built-in HTTP response caching on the HTTP Request node, but you can fake it cheaply. For daily content like horoscopes and daily tarot cards, store the response in an n8n Data Table (built-in, currently beta) or a simple PostgreSQL table with a date key, and check there first before calling RoxyAPI. Most users run a single daily fetch per sign and read from the store all day.

Will my API key end up in exported workflow JSON?

No. Credentials in n8n are stored separately from workflows. When you export a workflow as JSON, only the credential name (reference) is included, not the value. Share your exported workflows freely, the key stays put.

Where do I get a RoxyAPI key?

Visit the pricing page for paid plans, or try the interactive API reference with a pre-filled test key to explore every endpoint before you buy. Plans start at 5,000 requests per month.

Is there a ready-made n8n template for RoxyAPI?

Not yet as an official template. If you build a public n8n workflow for astrology, tarot, or numerology on RoxyAPI and want it featured on our starters page, reply to your onboarding email with the workflow export. The first community n8n template gets a free month on us.