Actions36
- Activity Actions
- Contact Actions
- Customer Actions
- Data Proxy Actions
- Document Actions
- Employer Actions
- Lead Actions
- Meeting Actions
- Meeting Summary Actions
- Report Actions
- Workflow Actions
Document → Upload a Document
AI-generatedOverview
The node named "Surense" provides integration with the Surense API, allowing users to interact with various resources such as documents, contacts, customers, and more. Specifically, for the Document resource with the Upload a Document operation, this node enables uploading a binary file to associate it with a specific entity in the Surense system.
This operation is useful when you want to programmatically attach files (e.g., PDFs, images) to entities like customers, leads, meetings, or workflows within Surense. For example, you might upload a signed contract PDF to a customer record or attach meeting notes to a meeting entity.
Properties
| Name | Meaning |
|---|---|
| מזהה (id) | The unique identifier (UUID format) of the entity to which the document will be attached. |
| סוג מזהה (idType) | The type of entity to associate the document with. Options: ליד (lead), לקוח (customer), מעסיק (employer), פגישה (meeting), תהליך (workflow). |
| Binary Property | The name of the binary data field that contains the file to upload. Default is "data". |
Output
The node outputs JSON data representing the result of the upload operation. This typically includes metadata about the uploaded document such as its ID, status, or any confirmation returned by the Surense API.
If the node supports binary data output (not explicitly shown here), it would represent the uploaded file or related binary content, but based on the provided code and properties, the main output is JSON metadata about the uploaded document.
Dependencies
- Requires an active connection to the Surense API via an OAuth2 API credential.
- The node depends on the Surense API being accessible and properly authenticated.
- No additional environment variables are indicated beyond the required API authentication.
Troubleshooting
Common issues:
- Invalid or missing UUID in the "מזהה" (id) property can cause failures.
- Incorrect "סוג מזהה" (idType) selection may lead to association errors if the entity type does not exist or mismatches the ID.
- Missing or incorrectly named binary property will prevent the file from uploading.
- Authentication errors if the OAuth2 token is expired or invalid.
Error messages:
- Errors thrown by the API will be caught and can be output as error messages in the node's output if "Continue On Fail" is enabled.
- Typical errors include "Entity not found", "Invalid file data", or "Authentication failed".
Resolutions:
- Verify the UUID format and correctness.
- Confirm the entity type matches the ID.
- Ensure the binary data is correctly passed under the specified binary property name.
- Refresh or reconfigure API credentials if authentication fails.
Links and References
- Surense API Documentation (replace with actual URL)
- n8n documentation on working with binary data
- OAuth2 authentication setup in n8n: OAuth2 Credentials