- Docs
- Integrations
- 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
- A Roxy API key. Get one on the pricing page.
- An n8n instance. Cloud, Docker self-host, Railway, Render, or npm install all work identically.
- 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.
- Drop an HTTP Request node on the canvas.
- Click Import cURL on the Parameters tab.
- Paste:
curl "https://roxyapi.com/api/v2/astrology/horoscope/aries/daily" \ -H "X-API-Key: YOUR_KEY" - Click Import. n8n fills in method, URL, and headers.
- 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.
- Drop an HTTP Request node, scroll to Authentication.
- Pick Generic Credential Type, then Header Auth.
- Click Create New Credential.
- Name
X-API-Key. Value paste your key from your account. - Rename the credential itself to
RoxyAPI keyfor readability. - Save. The key is encrypted inside n8n and never appears in node UI, execution logs, or exported workflow JSON.
- 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.
- Drop an AI Agent node. Connect a chat model (OpenAI, Anthropic, Groq, Ollama, whatever).
- Connect an HTTP Request node to the Tools input on the AI Agent.
- In that node, set the URL with a
$fromAIexpression:https://roxyapi.com/api/v2/astrology/horoscope/{{ $fromAI("sign") }}/daily - Use the
RoxyAPI keycredential. - Give the tool a clear Name and Description so the agent knows when to call it.
- 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.
- Schedule Trigger at 08:00 daily.
- HTTP Request node with URL
https://roxyapi.com/api/v2/astrology/horoscope/aries/daily, Header Auth credential. - Gmail Send with subject
Your daily horoscopeand body{{ $json.overview }}plus{{ $json.luckyNumber }}.
For a POST endpoint that takes birth data:
- Method
POST. - URL
https://roxyapi.com/api/v2/astrology/natal-chart. - Turn on Send Body, Body Content Type
JSON, Specify BodyUsing JSON. - 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.
curl -X POST "https://roxyapi.com/api/v2/astrology/natal-chart" \
-H "X-API-Key: $ROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date": "1990-05-12",
"time": "14:30:00",
"latitude": 40.7128,
"longitude": -74.0060,
"timezone": "America/New_York"
}'
If you later move logic to a Code node or a custom n8n Node:
import { createRoxy } from '@roxyapi/sdk';
const roxy = createRoxy(process.env.ROXY_API_KEY!);
const { data } = await roxy.astrology.generateNatalChart({
body: {
date: '1990-05-12',
time: '14:30:00',
latitude: 40.7128,
longitude: -74.0060,
timezone: 'America/New_York',
},
});
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:
- API reference has a pre-filled test key. Try a call in the browser, copy the curl, paste into the Import cURL button in n8n for a configured node in seconds.
- Domain guides for which endpoints to call in what order:
- Most-used endpoints that fit n8n workflows:
GET /astrology/horoscope/{sign}/daily,POST /astrology/natal-chart,POST /vedic-astrology/birth-chart,POST /vedic-astrology/panchang/detailed,POST /tarot/spreads/three-card,POST /numerology/life-path,POST /biorhythm/daily.
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-5are 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-Keyas 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
allowarray listing valid methods. Switch the method and retry.
What to build next
- The astrology guide and Vedic astrology guide cover endpoint ordering for chatbot and kundli workflows.
- The Make integration and Zapier integration cover similar patterns on adjacent platforms.
- The AI chatbot tutorial is the reference for wiring multiple domains into an AI Agent.
- Browse the API reference for every endpoint across 12 domains.