@@ -18,8 +18,6 @@ The package is published as `@directus/n8n-nodes-directus` on npm.
1818npm install @directus/n8n-nodes-directus
1919```
2020
21- ** Note** : This package is not yet published to npm. For development and testing, see the [ Development] ( #development ) section below.
22-
2321## Usage
2422
2523### Getting Started
@@ -143,64 +141,8 @@ npm run build
143141
1441424 . ** Create workflows** : Use the Directus nodes in your workflows
145143
146- ### Project Structure
147-
148- ```
149- ├── credentials/ # Directus API credentials
150- ├── nodes/ # n8n nodes (Directus and DirectusTrigger)
151- ├── __tests__/ # Test files
152- ├── dist/ # Built/compiled files (generated)
153- └── package.json # Package configuration
154- ```
155-
156- ### Available Commands
157-
158- ``` bash
159- # Development
160- npm run build # Build the project (TypeScript compilation + assets)
161- npm run dev # Watch mode for TypeScript compilation
162- npm run dev:n8n # Start n8n with your node loaded for testing
163- npm run build:n8n # Build nodes and credentials using n8n-node CLI
164-
165- # Code Quality
166- npm run lint # Check code style (repo root; tests are ignored by config)
167- npm run lintfix # Fix code style issues
168- npm run format # Format code using Prettier
169-
170- # Testing
171- npm run test # Run test suite
172- npm run test:watch # Run tests in watch mode
173- npm run test:coverage # Run tests with coverage report
174-
175- # Publishing
176- npm run release # Publish to npm using n8n-node CLI
177- ```
178-
179144### Testing
180145
181- #### Basic Node Testing
182-
183- 1 . ** Start n8n with your node loaded** :
184-
185- ``` bash
186- npm run dev:n8n
187- ```
188-
189- 2 . ** Access n8n** : Open http://localhost:5678 in your browser
190-
191- 3 . ** Configure credentials** :
192- - Go to ** Credentials** → ** Add Credential**
193- - Search for "Directus API" and add your credentials
194- - Test the connection
195-
196- 4 . ** Test operations** :
197- - Create a new workflow
198- - Add a Directus node
199- - Test various operations:
200- - ** Items** : Create, Get, Update, Delete items in collections
201- - ** Users** : Invite, Get, Update, Delete users
202- - ** Files** : Upload (requires binary data from previous node), Import (from URL), Get, Update, Delete files
203-
204146#### Webhook Testing (Requires ngrok)
205147
206148For testing the ** Directus Trigger** node, you need to expose n8n via a public URL since Directus cannot reach localhost:
@@ -246,32 +188,7 @@ For testing the **Directus Trigger** node, you need to expose n8n via a public U
246188
247189** Note** : The manual URL replacement step is required because Directus cannot reach localhost URLs directly.
248190
249- ### Troubleshooting
250-
251- #### Common Issues
252-
253- 1 . ** n8n not starting** :
254- - Ensure Node.js 22+ is installed
255- - Run ` pnpm install ` to install dependencies
256- - Check if port 5678 is available
257-
258- 2 . ** Node not appearing in n8n** :
259- - Run ` npm run build ` first
260- - Restart ` npm run dev:n8n `
261- - Check the terminal for any error messages
262-
263- 3 . ** Webhook not triggering** :
264- - Ensure ngrok is running and accessible
265- - Verify the webhook URL in Directus flows
266- - Check n8n workflow is activated
267- - Test the ngrok URL directly in browser
268-
269- 4 . ** Build errors** :
270- - Run ` npm run lint ` to check for code issues
271- - Run ` npm run lintfix ` to auto-fix issues
272- - Ensure TypeScript compilation passes
273-
274- #### Getting Help
191+ ### Getting Help
275192
276193- Check the [ GitHub Issues] ( https://github.com/directus/n8n-nodes-directus/issues ) for known problems
277194- Run ` pnpm test ` to verify everything works
0 commit comments