@astro-api/n8n-nodes-astrology 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/dist/nodes/Astrology/Astrology.node.js +2 -1
- package/dist/nodes/Astrology/operations/charts.operation.js +5 -5
- package/dist/nodes/Astrology/operations/data.operation.js +6 -6
- package/dist/nodes/Astrology/operations/horoscope.operation.js +14 -14
- package/dist/nodes/Astrology/operations/resource.options.js +3 -3
- package/dist/nodes/Astrology/shared/birthData.fields.js +4 -4
- package/dist/nodes/Astrology/shared/location.fields.js +5 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -108,9 +108,52 @@ Generate SVG birth charts with **Charts → Natal**. Supports 23+ house systems
|
|
|
108
108
|
|
|
109
109
|
Import complete workflow examples from the [`examples/`](examples/) folder:
|
|
110
110
|
|
|
111
|
+
- **[AI Astrologer Assistant](examples/ai-astrologer-assistant.json)** — AI-powered chatbot with multiple Astrology tools. Demonstrates using the node with n8n AI Agent for conversational astrology queries.
|
|
111
112
|
- **[Personal Horoscope Workflow](examples/personal-horoscope-workflow.json)** — Generates personalized horoscopes (day/week/month/year) by comparing natal chart with current transits. Includes AI interpretation.
|
|
112
113
|
- **[Tarot Reading Workflow](examples/tarot-reading-workflow.json)** — Performs tarot card readings influenced by current planetary positions and moon phase. Supports multiple spread types.
|
|
113
114
|
|
|
115
|
+
### Using with AI Agent
|
|
116
|
+
|
|
117
|
+
The Astrology node supports **AI Tool mode** via n8n's `usableAsTool` feature. This allows you to connect the node to an AI Agent for conversational astrology queries.
|
|
118
|
+
|
|
119
|
+
#### How It Works
|
|
120
|
+
|
|
121
|
+
When `usableAsTool: true` is set, n8n automatically generates a companion Tool node:
|
|
122
|
+
|
|
123
|
+
| Node Type | Purpose | Connection Type |
|
|
124
|
+
|-----------|---------|-----------------|
|
|
125
|
+
| `astrology` | Standard workflow node | `main` → `main` |
|
|
126
|
+
| `astrologyTool` | AI Tool for Agent | `ai_tool` → `ai_tool` |
|
|
127
|
+
|
|
128
|
+
#### Creating AI Workflows
|
|
129
|
+
|
|
130
|
+
When building workflows with AI Agent:
|
|
131
|
+
|
|
132
|
+
1. **Use the Tool version** — In workflow JSON, use type `@astro-api/n8n-nodes-astrology.astrologyTool`
|
|
133
|
+
2. **Connect via `ai_tool`** — Connect nodes to AI Agent using `ai_tool` connection type
|
|
134
|
+
3. **Use `$fromAI()` expressions** — Let AI extract parameters automatically
|
|
135
|
+
|
|
136
|
+
**Example node configuration:**
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"parameters": {
|
|
140
|
+
"year": "={{ $fromAI('year', 'Birth year (e.g., 1990)') }}",
|
|
141
|
+
"month": "={{ $fromAI('month', 'Month 1-12') }}",
|
|
142
|
+
"city": "={{ $fromAI('city', 'City name') }}"
|
|
143
|
+
},
|
|
144
|
+
"type": "@astro-api/n8n-nodes-astrology.astrologyTool"
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Example connection:**
|
|
149
|
+
```json
|
|
150
|
+
"Planetary Positions": {
|
|
151
|
+
"ai_tool": [[{"node": "AI Agent", "type": "ai_tool", "index": 0}]]
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
See [AI Astrologer Assistant](examples/ai-astrologer-assistant.json) for a complete working example.
|
|
156
|
+
|
|
114
157
|
## API Documentation
|
|
115
158
|
|
|
116
159
|
Full API documentation is available at:
|
|
@@ -28,8 +28,9 @@ class Astrology {
|
|
|
28
28
|
icon: "file:astrology.svg",
|
|
29
29
|
group: ["transform"],
|
|
30
30
|
version: 1,
|
|
31
|
+
usableAsTool: true,
|
|
31
32
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
32
|
-
description: "
|
|
33
|
+
description: "Professional astrological calculations: planetary positions, house cusps, aspects, lunar metrics, horoscopes, and natal charts using Astrology API",
|
|
33
34
|
defaults: {
|
|
34
35
|
name: "Astrology",
|
|
35
36
|
},
|
|
@@ -161,7 +161,7 @@ const houseSystemField = {
|
|
|
161
161
|
},
|
|
162
162
|
options: houseSystemOptions,
|
|
163
163
|
default: "P",
|
|
164
|
-
description: "
|
|
164
|
+
description: "House calculation system. Placidus (most common), Whole Sign (traditional), Koch (time-based), Equal (simple), etc.",
|
|
165
165
|
};
|
|
166
166
|
/**
|
|
167
167
|
* Zodiac type selector
|
|
@@ -179,16 +179,16 @@ const zodiacTypeField = {
|
|
|
179
179
|
{
|
|
180
180
|
name: "Tropical (Western)",
|
|
181
181
|
value: "Tropic",
|
|
182
|
-
description: "Equinox-based zodiac used in Western astrology",
|
|
182
|
+
description: "Equinox-based zodiac used in Western astrology (signs aligned to seasons)",
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
name: "Sidereal (Vedic)",
|
|
186
186
|
value: "Sidereal",
|
|
187
|
-
description: "Constellation-based zodiac used in Vedic astrology",
|
|
187
|
+
description: "Constellation-based zodiac used in Vedic/Indian astrology (signs aligned to stars)",
|
|
188
188
|
},
|
|
189
189
|
],
|
|
190
190
|
default: "Tropic",
|
|
191
|
-
description: "Zodiac calculation method",
|
|
191
|
+
description: "Zodiac calculation method: Tropical (Western, season-based) or Sidereal (Vedic, star-based)",
|
|
192
192
|
};
|
|
193
193
|
/**
|
|
194
194
|
* Active points preset selector
|
|
@@ -448,7 +448,7 @@ const simplifyField = {
|
|
|
448
448
|
},
|
|
449
449
|
},
|
|
450
450
|
default: true,
|
|
451
|
-
description: "Whether to return
|
|
451
|
+
description: "Whether to return simplified response with key data only. Disable for full API response with all metadata.",
|
|
452
452
|
};
|
|
453
453
|
/**
|
|
454
454
|
* Combined charts operations export
|
|
@@ -19,31 +19,31 @@ const dataOperationField = {
|
|
|
19
19
|
{
|
|
20
20
|
name: "Aspects",
|
|
21
21
|
value: "aspects",
|
|
22
|
-
description: "Calculate angular relationships between
|
|
22
|
+
description: "Calculate angular relationships (conjunctions, squares, trines, oppositions) between planets and points for astrological interpretation",
|
|
23
23
|
action: "Get aspects data",
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
name: "Current Time",
|
|
27
27
|
value: "now",
|
|
28
|
-
description: "Get current UTC time
|
|
28
|
+
description: "Get current UTC time with Julian Day number for real-time astrological calculations",
|
|
29
29
|
action: "Get current time data",
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
name: "House Cusps",
|
|
33
33
|
value: "houseCusps",
|
|
34
|
-
description: "Calculate astrological house boundaries",
|
|
34
|
+
description: "Calculate the 12 astrological house boundaries (cusps) using specified house system (Placidus, Whole Sign, Koch, etc.)",
|
|
35
35
|
action: "Get house cusps data",
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
name: "Lunar Metrics",
|
|
39
39
|
value: "lunarMetrics",
|
|
40
|
-
description: "
|
|
40
|
+
description: "Get current Moon phase, illumination percentage, and lunar cycle position",
|
|
41
41
|
action: "Get lunar metrics data",
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
name: "Planetary Positions",
|
|
45
45
|
value: "positions",
|
|
46
|
-
description: "Calculate
|
|
46
|
+
description: "Calculate positions of planets and points showing zodiac sign, degree, minute, retrograde status",
|
|
47
47
|
action: "Get planetary positions data",
|
|
48
48
|
},
|
|
49
49
|
],
|
|
@@ -69,7 +69,7 @@ const simplifyField = {
|
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
default: true,
|
|
72
|
-
description: "Whether to return
|
|
72
|
+
description: "Whether to return simplified response with key data only. Disable for full API response with all metadata.",
|
|
73
73
|
};
|
|
74
74
|
exports.dataOperations = [
|
|
75
75
|
// Operation selector
|
|
@@ -178,7 +178,7 @@ exports.horoscopeOperations = [
|
|
|
178
178
|
{ name: "Virgo", value: "virgo" },
|
|
179
179
|
],
|
|
180
180
|
default: "aries",
|
|
181
|
-
description: "
|
|
181
|
+
description: "Select the zodiac sign (Aries through Pisces) to get horoscope predictions for",
|
|
182
182
|
required: true,
|
|
183
183
|
},
|
|
184
184
|
// Birth data fields (for personal operations and Chinese Bazi)
|
|
@@ -194,7 +194,7 @@ exports.horoscopeOperations = [
|
|
|
194
194
|
},
|
|
195
195
|
default: 1990,
|
|
196
196
|
placeholder: "e.g. 1990",
|
|
197
|
-
description: "Birth year",
|
|
197
|
+
description: "Birth year in 4-digit format (e.g., 1990)",
|
|
198
198
|
required: true,
|
|
199
199
|
},
|
|
200
200
|
{
|
|
@@ -213,7 +213,7 @@ exports.horoscopeOperations = [
|
|
|
213
213
|
minValue: 1,
|
|
214
214
|
maxValue: 12,
|
|
215
215
|
},
|
|
216
|
-
description: "Birth month
|
|
216
|
+
description: "Birth month as number 1-12 (January=1, December=12)",
|
|
217
217
|
required: true,
|
|
218
218
|
},
|
|
219
219
|
{
|
|
@@ -232,7 +232,7 @@ exports.horoscopeOperations = [
|
|
|
232
232
|
minValue: 1,
|
|
233
233
|
maxValue: 31,
|
|
234
234
|
},
|
|
235
|
-
description: "Birth day (1-31)",
|
|
235
|
+
description: "Birth day of month (1-31)",
|
|
236
236
|
required: true,
|
|
237
237
|
},
|
|
238
238
|
{
|
|
@@ -251,7 +251,7 @@ exports.horoscopeOperations = [
|
|
|
251
251
|
minValue: 0,
|
|
252
252
|
maxValue: 23,
|
|
253
253
|
},
|
|
254
|
-
description: "Birth hour (0-23)",
|
|
254
|
+
description: "Birth hour in 24-hour format (0-23, where 0=midnight, 12=noon)",
|
|
255
255
|
required: true,
|
|
256
256
|
},
|
|
257
257
|
{
|
|
@@ -297,7 +297,7 @@ exports.horoscopeOperations = [
|
|
|
297
297
|
},
|
|
298
298
|
],
|
|
299
299
|
default: "city",
|
|
300
|
-
description: "
|
|
300
|
+
description: "Choose how to specify birth location: by city name (auto-detects coordinates) or exact latitude/longitude",
|
|
301
301
|
},
|
|
302
302
|
// City-based location
|
|
303
303
|
{
|
|
@@ -313,7 +313,7 @@ exports.horoscopeOperations = [
|
|
|
313
313
|
},
|
|
314
314
|
default: "",
|
|
315
315
|
placeholder: "London",
|
|
316
|
-
description:
|
|
316
|
+
description: 'Birth city name (e.g., "London", "New York", "Kyiv")',
|
|
317
317
|
required: true,
|
|
318
318
|
},
|
|
319
319
|
{
|
|
@@ -329,7 +329,7 @@ exports.horoscopeOperations = [
|
|
|
329
329
|
},
|
|
330
330
|
default: "",
|
|
331
331
|
placeholder: "GB",
|
|
332
|
-
description: "
|
|
332
|
+
description: "2-letter ISO country code for the birth city (e.g., US, GB, UA, DE, FR)",
|
|
333
333
|
required: true,
|
|
334
334
|
},
|
|
335
335
|
// Coordinate-based location
|
|
@@ -350,7 +350,7 @@ exports.horoscopeOperations = [
|
|
|
350
350
|
minValue: -90,
|
|
351
351
|
maxValue: 90,
|
|
352
352
|
},
|
|
353
|
-
description: "
|
|
353
|
+
description: "Geographic latitude of birth location in decimal degrees (-90 to 90, positive=North)",
|
|
354
354
|
required: true,
|
|
355
355
|
},
|
|
356
356
|
{
|
|
@@ -370,7 +370,7 @@ exports.horoscopeOperations = [
|
|
|
370
370
|
minValue: -180,
|
|
371
371
|
maxValue: 180,
|
|
372
372
|
},
|
|
373
|
-
description: "
|
|
373
|
+
description: "Geographic longitude of birth location in decimal degrees (-180 to 180, positive=East)",
|
|
374
374
|
required: true,
|
|
375
375
|
},
|
|
376
376
|
// Target date (for all horoscope operations)
|
|
@@ -388,7 +388,7 @@ exports.horoscopeOperations = [
|
|
|
388
388
|
},
|
|
389
389
|
default: "",
|
|
390
390
|
placeholder: "2024-01-15",
|
|
391
|
-
description: "
|
|
391
|
+
description: "Date for prediction in YYYY-MM-DD format. Leave empty for current date predictions.",
|
|
392
392
|
},
|
|
393
393
|
// Bazi Year (for Chinese Bazi)
|
|
394
394
|
{
|
|
@@ -416,7 +416,7 @@ exports.horoscopeOperations = [
|
|
|
416
416
|
},
|
|
417
417
|
default: "en",
|
|
418
418
|
placeholder: "en",
|
|
419
|
-
description: "
|
|
419
|
+
description: "Language code for horoscope text output (en=English, uk=Ukrainian, ru=Russian, es=Spanish, de=German)",
|
|
420
420
|
},
|
|
421
421
|
// Tradition (for all horoscope operations)
|
|
422
422
|
{
|
|
@@ -440,7 +440,7 @@ exports.horoscopeOperations = [
|
|
|
440
440
|
{ name: "Vedic", value: "vedic" },
|
|
441
441
|
],
|
|
442
442
|
default: "universal",
|
|
443
|
-
description: "Astrological tradition
|
|
443
|
+
description: "Astrological tradition affecting interpretation style and emphasis",
|
|
444
444
|
},
|
|
445
445
|
// Text format (for text operations)
|
|
446
446
|
{
|
|
@@ -461,7 +461,7 @@ exports.horoscopeOperations = [
|
|
|
461
461
|
{ name: "Structured", value: "structured" },
|
|
462
462
|
],
|
|
463
463
|
default: "paragraph",
|
|
464
|
-
description: "
|
|
464
|
+
description: "Output format for text predictions: short (1-2 sentences), paragraph (flowing text), bullets (key points), structured (categorized sections)",
|
|
465
465
|
},
|
|
466
466
|
// Include emoji (for text operations)
|
|
467
467
|
{
|
|
@@ -14,17 +14,17 @@ exports.resourceField = {
|
|
|
14
14
|
{
|
|
15
15
|
name: "Chart",
|
|
16
16
|
value: "charts",
|
|
17
|
-
description: "Generate
|
|
17
|
+
description: "Generate natal (birth) charts with planetary positions, houses, and aspects for a given birth time and location",
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
name: "Data",
|
|
21
21
|
value: "data",
|
|
22
|
-
description: "
|
|
22
|
+
description: "Get raw astrological calculations: planetary positions, house cusps, aspects between planets, and lunar phase data",
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
name: "Horoscope",
|
|
26
26
|
value: "horoscope",
|
|
27
|
-
description: "
|
|
27
|
+
description: "Generate horoscope predictions by zodiac sign or personalized by birth data (daily, weekly, monthly, yearly)",
|
|
28
28
|
},
|
|
29
29
|
],
|
|
30
30
|
default: "data",
|
|
@@ -30,7 +30,7 @@ function createBirthDataFields(resourceName, showForOperations, hideForOperation
|
|
|
30
30
|
displayOptions: { ...baseDisplayOptions },
|
|
31
31
|
default: 1990,
|
|
32
32
|
placeholder: "e.g. 1990",
|
|
33
|
-
description: "Birth year",
|
|
33
|
+
description: "Birth year in 4-digit format (e.g., 1990)",
|
|
34
34
|
required: true,
|
|
35
35
|
},
|
|
36
36
|
{
|
|
@@ -44,7 +44,7 @@ function createBirthDataFields(resourceName, showForOperations, hideForOperation
|
|
|
44
44
|
minValue: 1,
|
|
45
45
|
maxValue: 12,
|
|
46
46
|
},
|
|
47
|
-
description: "Birth month
|
|
47
|
+
description: "Birth month as number 1-12 (January=1, December=12)",
|
|
48
48
|
required: true,
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -58,7 +58,7 @@ function createBirthDataFields(resourceName, showForOperations, hideForOperation
|
|
|
58
58
|
minValue: 1,
|
|
59
59
|
maxValue: 31,
|
|
60
60
|
},
|
|
61
|
-
description: "Birth day (1-31)",
|
|
61
|
+
description: "Birth day of month (1-31)",
|
|
62
62
|
required: true,
|
|
63
63
|
},
|
|
64
64
|
{
|
|
@@ -72,7 +72,7 @@ function createBirthDataFields(resourceName, showForOperations, hideForOperation
|
|
|
72
72
|
minValue: 0,
|
|
73
73
|
maxValue: 23,
|
|
74
74
|
},
|
|
75
|
-
description: "Birth hour (0-23)",
|
|
75
|
+
description: "Birth hour in 24-hour format (0-23, where 0=midnight, 12=noon)",
|
|
76
76
|
required: true,
|
|
77
77
|
},
|
|
78
78
|
{
|
|
@@ -63,7 +63,7 @@ function createLocationFields(resourceName, showForOperations, hideForOperations
|
|
|
63
63
|
},
|
|
64
64
|
],
|
|
65
65
|
default: "city",
|
|
66
|
-
description: "
|
|
66
|
+
description: "Choose how to specify birth location: by city name (auto-detects coordinates) or exact latitude/longitude",
|
|
67
67
|
},
|
|
68
68
|
// City-based location fields
|
|
69
69
|
{
|
|
@@ -73,7 +73,7 @@ function createLocationFields(resourceName, showForOperations, hideForOperations
|
|
|
73
73
|
displayOptions: cityDisplayOptions,
|
|
74
74
|
default: "",
|
|
75
75
|
placeholder: "London",
|
|
76
|
-
description:
|
|
76
|
+
description: 'Birth city name (e.g., "London", "New York", "Kyiv")',
|
|
77
77
|
required: true,
|
|
78
78
|
},
|
|
79
79
|
{
|
|
@@ -83,7 +83,7 @@ function createLocationFields(resourceName, showForOperations, hideForOperations
|
|
|
83
83
|
displayOptions: cityDisplayOptions,
|
|
84
84
|
default: "",
|
|
85
85
|
placeholder: "GB",
|
|
86
|
-
description: "
|
|
86
|
+
description: "2-letter ISO country code for the birth city (e.g., US, GB, UA, DE, FR)",
|
|
87
87
|
required: true,
|
|
88
88
|
},
|
|
89
89
|
// Coordinate-based location fields
|
|
@@ -98,7 +98,7 @@ function createLocationFields(resourceName, showForOperations, hideForOperations
|
|
|
98
98
|
minValue: -90,
|
|
99
99
|
maxValue: 90,
|
|
100
100
|
},
|
|
101
|
-
description: "
|
|
101
|
+
description: "Geographic latitude of birth location in decimal degrees (-90 to 90, positive=North)",
|
|
102
102
|
required: true,
|
|
103
103
|
},
|
|
104
104
|
{
|
|
@@ -112,7 +112,7 @@ function createLocationFields(resourceName, showForOperations, hideForOperations
|
|
|
112
112
|
minValue: -180,
|
|
113
113
|
maxValue: 180,
|
|
114
114
|
},
|
|
115
|
-
description: "
|
|
115
|
+
description: "Geographic longitude of birth location in decimal degrees (-180 to 180, positive=East)",
|
|
116
116
|
required: true,
|
|
117
117
|
},
|
|
118
118
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astro-api/n8n-nodes-astrology",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "n8n community node for Astrology API - professional astrological calculations, charts, horoscopes, and interpretations",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
]
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"n8n-workflow": "1.
|
|
73
|
+
"n8n-workflow": "1.120.7"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@changesets/cli": "^2.29.8",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"eslint-plugin-n8n-nodes-base": "^1.16.5",
|
|
82
82
|
"husky": "^9.1.7",
|
|
83
83
|
"lint-staged": "^16.2.7",
|
|
84
|
-
"n8n-workflow": "1.
|
|
84
|
+
"n8n-workflow": "1.120.7",
|
|
85
85
|
"prettier": "3.4.1",
|
|
86
86
|
"typescript": "5.5.4"
|
|
87
87
|
}
|