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 scenarios where you need to upload or link supporting documents, such as delivery receipts, inspection reports, or images, directly to the GRN record for better tracking and audit purposes.

Practical examples include:

  • Uploading scanned delivery notes after receiving goods.
  • Attaching quality inspection certificates to the received items.
  • Adding 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, status messages, or metadata about the attached file. The exact structure depends on the external API's response but generally confirms successful linking of the file to the specified Goods Received Note.

If binary data is involved (e.g., the actual file content), it would be handled separately, but this node focuses on referencing or uploading files linked to the GRN.

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 a REST API endpoint provided by the external system to perform the file attachment.
  • Proper configuration of base URL and headers for the API requests is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing identifiers (Account Id, Purchase Order Id, Goods Received Note Id) can cause failures.
    • Authentication errors if the API key or credentials are not set or expired.
    • Network connectivity problems preventing access to the external API.
    • File size or format restrictions imposed by the external system.
  • 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.
    • "Payload too large": Confirm the file size complies with API limits.

Resolving these usually involves verifying input parameters, refreshing credentials, and checking network access.

Links and References

  • Refer to the external system’s API documentation for detailed information on attaching files to Goods Received Notes.
  • Consult n8n documentation on setting up API credentials and handling file uploads.

Discussion