1. Docs
  2. Integrations
  3. n8n

Use RoxyAPI with n8n

Automate a daily horoscope bot, a Life Path calculator, or a Vedic kundli workflow on n8n in under 20 minutes. Self-hosted or cloud, both work.

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 wanted Zapier but hit the "no custom code" wall, n8n is probably what you wanted.

What you can build on n8n

  • Daily horoscope email from a Schedule trigger to Gmail or Slack
  • Webhook-powered Life Path calculator any no-code form can POST to
  • Tarot card of the day delivered to a Slack or Discord channel
  • AI astrology chatbot where the LLM picks between horoscope and natal chart tools on its own
  • Vedic kundli on Form Trigger submit, rendered to a Google Docs PDF and emailed
  • Dream journal with PostgreSQL storage and auto-interpretation reply
  • Weekly horoscope roundup loop across all 12 signs

What you need, 30 seconds

  1. A Roxy API key. Get one on the pricing page.
  2. An n8n instance. Cloud, Docker self-host, Railway, Render, or npm install all work identically.
  3. Three to five minutes.

If you have a curl command and want a working node in seconds, skip to the Import cURL path below. It is the fastest way from zero to a live Roxy call on n8n.

Step 1, connect your first endpoint

n8n offers two paths. Import cURL for quick tests. A reusable Header Auth credential for anything you run on a schedule.

  1. Drop an HTTP Request node on the canvas.
  2. Click Import cURL on the Parameters tab.
  3. Paste:
    curl "https://roxyapi.com/api/v2/astrology/horoscope/aries/daily" \
      -H "X-API-Key: YOUR_KEY"
  4. Click Import. n8n fills in method, URL, and headers.
  5. Click Execute Node.

warning Import cURL hardcodes the key in the node. Fine for quick tests. For production, switch to the credential path below. :::

Header Auth credential

The standard path for production workflows.

  1. Drop an HTTP Request node, scroll to Authentication.
  2. Pick Generic Credential Type, then Header Auth.
  3. Click Create New Credential.
  4. Name X-API-Key. Value paste your key from your account.
  5. Rename the credential itself to RoxyAPI key for readability.
  6. Save. The key is encrypted inside n8n and never appears in node UI, execution logs, or exported workflow JSON.
  7. Every future HTTP Request node picks the credential from a dropdown.

AI Agent tool

The power path. Any HTTP Request node wired to the Tools input of an AI Agent becomes a callable tool for the LLM.

  1. Drop an AI Agent node. Connect a chat model (OpenAI, Anthropic, Groq, Ollama, whatever).
  2. Connect an HTTP Request node to the Tools input on the AI Agent.
  3. In that node, set the URL with a $fromAI expression:
    https://roxyapi.com/api/v2/astrology/horoscope/{{ $fromAI("sign") }}/daily
  4. Use the RoxyAPI key credential.
  5. Give the tool a clear Name and Description so the agent knows when to call it.
  6. Add one tool per domain you want the agent to handle.

:::

Step 2, ship a useful feature

Here is the full flow for a daily horoscope email. Schedule fires at 8 AM. HTTP fetches the horoscope. Gmail sends the email.

  1. Schedule Trigger at 08:00 daily.
  2. HTTP Request node with URL https://roxyapi.com/api/v2/astrology/horoscope/aries/daily, Header Auth credential.
  3. Gmail Send with subject Your daily horoscope and body {{ $json.overview }} plus {{ $json.luckyNumber }}.

For a POST endpoint that takes birth data:

  1. Method POST.
  2. URL https://roxyapi.com/api/v2/astrology/natal-chart.
  3. Turn on Send Body, Body Content Type JSON, Specify Body Using JSON.
  4. Paste:
    {
      "date": "{{ $json.birth_date }}",
      "time": "{{ $json.birth_time }}",
      "latitude": {{ $json.birth_lat }},
      "longitude": {{ $json.birth_lng }},
      "timezone": "{{ $json.timezone }}"
    }

date is YYYY-MM-DD. time is HH:MM:SS. timezone accepts an IANA identifier ("America/New_York") or a decimal number (5.5). IANA is preferred because the server resolves it to the DST-correct offset for the request date.

Every field of the response (sign, overview, luckyNumber, energyRating) is mappable in any downstream node via the n8n expression editor. The planets field is an array of { name, sign, degree, house, ... } objects: use the Item Lists node to split it out, or an expression like {{$json.planets.filter(p => p.name === 'Sun')[0].sign}} to pick the Sun sign inline.

Step 3, scale to the full surface

Adding the next endpoint is the same pattern: drop another HTTP Request node, change the URL and body, the credential is reused automatically. Three places to pick the next one:

Caching in n8n

n8n does not cache HTTP responses. For daily content use an n8n Data Table (built-in, currently beta) or a PostgreSQL table with a date key. Check the store first, call Roxy on miss, write the response back.

Gotchas

  • Backend-only key. n8n runs on your server or cloud tenant. The key never reaches a browser. Still, use the Header Auth credential path for anything beyond a test, so the value is not in exports or logs.
  • Timezone. Prefer IANA strings ("America/New_York"). Decimal offsets like -5 are accepted but do not handle daylight saving. The server resolves IANA to the DST-correct offset for the request date.
  • Rate limits. Every Roxy plan has daily and monthly caps. Add a Wait node before tight loops, use batching on the HTTP Request node, or cache daily content in a Data Table.
  • No native RoxyAPI node. Use Generic Credential Type, Header Auth, with X-API-Key as the name. If you want a first-class node, reply to your onboarding email.
  • ECONNREFUSED self-hosted. Your n8n container cannot reach roxyapi.com. Check outbound HTTPS, firewall rules for port 443, and DNS.
  • Wrong method. 405 responses include an allow array listing valid methods. Switch the method and retry.

What to build next