Update docs/integrations/creating-nodes/build/reference/node-file-structure.md

Co-authored-by: Deborah <deborah@n8n.io>
This commit is contained in:
aya 2024-06-10 11:14:26 +02:00 committed by GitHub
parent ee009c09a2
commit 2d481069a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,7 +32,7 @@ A basic pattern is to separate out operations. Refer to the [HttpBin starter nod
For more complex nodes, n8n recommends a directory structure. Refer to the [Airtable node](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/nodes/Airtable){:target=_blank .external-class} or [Microsoft Outlook node](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/nodes/Microsoft/Outlook){:target=_blank .external-link} as examples.
* `actions`: a directories containing sub-directories that represent resources.
* `actions`: a directory containing sub-directories that represent resources.
* Each sub-directory should contain two types of files:
* An index file with resource description (named either `<resourceName>.resource.ts` or `index.ts`)
* Files for operations `<operationName>.operation.ts`. These files should have two exports: `description` of the operation and an `execute` function.