Actions50
- Collection Actions
- Document Actions
- Search Actions
- Analytics Actions
- API Key Actions
- Alias Actions
- Synonym Actions
- Override Actions
- Conversation Actions
Document → Create
AI-generatedOverview
This node operation creates a new document in a specified collection within a Typesense instance. It is useful for adding new searchable data entries to a Typesense collection, enabling enhanced search capabilities on that data. For example, you can add product details, user profiles, or any structured data as documents to be indexed and searched efficiently.
Use Case Examples
- Adding a new product document to a 'products' collection with fields like name, description, and price.
- Creating a user profile document in a 'users' collection with fields such as username, email, and preferences.
Properties
| Name | Meaning |
|---|---|
| Collection Name | The name of the collection in the Typesense instance where the document will be created. This is required to specify the target collection. |
| JSON Input | A boolean flag indicating whether the document data is provided as raw JSON string or as individual fields. |
| Document Data (JSON) | The raw JSON string representing the document data to be created. This is used only if JSON Input is true. |
| Document Fields | A collection of field name and value pairs representing the document data. Used only if JSON Input is false. |
Output
JSON
id- The unique identifier of the created document.collectionName- The name of the collection where the document was created.documentData- The data of the created document as stored in Typesense.
Dependencies
- Requires a Typesense API key credential to authenticate and interact with the Typesense instance.
Troubleshooting
- Ensure the specified collection exists in the Typesense instance before creating a document.
- If using JSON Input, verify that the JSON string is correctly formatted and valid.
- Common errors include authentication failures due to invalid API keys, or errors from missing required fields in the document data.
- If the node throws an error about unsupported resource or operation, verify that 'Document' resource and 'Create' operation are correctly selected.