Aigency icon

Aigency

Interact with Aigency API

Overview

This node integrates with the Aigency API, allowing users to perform various operations related to messaging, subscriptions, capabilities, and user data management. Specifically, the "Get File URL" operation retrieves a direct URL for a file stored or managed by the Aigency service, identified by a given File ID.

Common scenarios where this node is beneficial include:

  • Retrieving downloadable links for files associated with user messages or subscriptions.
  • Accessing media or document URLs dynamically within an automation workflow.
  • Integrating file retrieval into broader processes such as notifications, content delivery, or archival.

For example, a user might input a File ID obtained from a previous step and use this node to fetch the accessible URL to share or process the file further.

Properties

Name Meaning
File ID The unique identifier of the file for which the URL is requested. This must be provided to retrieve the corresponding file URL.

Output

The node outputs JSON data containing the result of the API call. For the "Get File URL" operation, the output JSON will typically include the direct URL to access the specified file.

Example output structure (simplified):

{
  "url": "https://example.com/path/to/file"
}

If the operation encounters an error, the output JSON will contain an error field describing the issue.

The node does not output binary data directly; it only provides the URL to the file.

Dependencies

  • Requires an API key credential and API URL for authenticating requests to the Aigency API.
  • These credentials can be configured in the n8n credentials interface or set via environment variables AIGENCY_API_KEY and AIGENCY_API_URL.
  • The node uses HTTP POST requests with JSON-RPC protocol to communicate with the Aigency API.

Troubleshooting

  • Missing Credentials: If neither credentials nor environment variables are set, the node throws an error indicating missing credentials. Ensure that either the API key and URL are configured in n8n or exported as environment variables.
  • Invalid File ID: Providing an incorrect or non-existent File ID may result in an error response from the API. Verify the File ID before running the node.
  • API Unreachable or Invalid Credentials: Connection errors or authentication failures will cause the node to throw errors. Confirm network connectivity and validity of the API key and URL.
  • Continue on Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details in the output JSON.

Links and References

Discussion