Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Overview

This node operation allows attaching a file to a specific Goods Received Note (GRN) within a Purchase Order in an external system. It is useful for users who want to programmatically add supporting documents, such as delivery receipts, inspection reports, or images, directly to the GRN record associated with a purchase order. This helps maintain organized and complete records of goods received during procurement processes.

Practical examples include:

  • Automatically attaching scanned delivery notes when goods are received.
  • Adding quality inspection certificates to the GRN after receiving items.
  • Uploading photos of damaged goods for claims processing.

Properties

Name Meaning
Account Id Identifier of the account under which the purchase order exists.
Purchase Order Id Identifier of the purchase order to which the goods received note belongs.
Goods Received Note Id Identifier of the specific goods received note to which the file will be attached.

Output

The node outputs JSON data representing the result of the file attachment operation. This typically includes confirmation details such as IDs of the updated goods received note or metadata about the attached file. The exact structure depends on the external API response but generally confirms successful attachment.

If binary data (the file itself) is handled, it would represent the content being uploaded and linked to the GRN, but this source code snippet does not explicitly show binary handling.

Dependencies

  • Requires an API key credential or similar authentication token configured in n8n to authorize requests to the external service managing purchase orders and goods received notes.
  • The node relies on an external REST API endpoint (base URL configurable via credentials) that supports operations on purchase orders and their related goods received notes.
  • No additional external libraries beyond those bundled with n8n and the provided OpenAPI integration are required.

Troubleshooting

  • Common issues:

    • Invalid or missing identifiers (Account Id, Purchase Order Id, Goods Received Note Id) will cause the operation to fail.
    • Authentication errors if the API key or credentials are not properly set up.
    • Network connectivity problems preventing access to the external API.
    • File size or format restrictions imposed by the external system may cause upload failures.
  • Error messages:

    • "Unauthorized" or "Authentication failed": Check API credentials and permissions.
    • "Not Found" or "Invalid ID": Verify that all provided IDs correspond to existing records.
    • "Bad Request": Ensure all required properties are correctly filled and valid.
    • Timeout or network errors: Confirm network connectivity and API availability.

Links and References

  • Refer to the external API documentation for purchase orders and goods received notes for detailed information on required fields and file attachment capabilities.
  • n8n documentation on creating custom nodes and handling file uploads may provide additional guidance.

Discussion