Actions6
Overview
This node integrates with the Swan.io API to perform various operations related to financial accounts and transactions. Specifically, the "Mutation - UpdateAccount" operation allows updating an existing account's details, such as its name. This is useful in scenarios where you need to programmatically modify account information within Swan.io, for example, renaming an account to reflect a new business purpose or correcting a typo.
Practical examples:
- Automatically update account names based on external triggers or workflows.
- Synchronize account details from another system into Swan.io.
- Batch rename multiple accounts via automation.
Properties
| Name | Meaning |
|---|---|
| Authentication | Choose between using a User Access Token or a Project Access Token for API authentication. |
| Account ID | The unique identifier of the account to be updated. |
| Name | The new name to assign to the specified account. |
Output
The node outputs JSON data representing the updated account object returned by the Swan.io API after the update operation. The structure includes all relevant fields of the updated account as provided by the API under the updateAccount property.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authentication, either a user access token or a project access token depending on the selected authentication method.
- The node uses internal helper functions to send requests to the Swan.io API endpoints.
- Proper configuration of credentials in n8n is necessary to authenticate and authorize API calls.
Troubleshooting
Error: "Unsupported operation and/or resource"
This error occurs if an invalid operation or resource is selected. Ensure that the operation is set to "Mutation - UpdateAccount" and the resource is "Default" (or as applicable).Missing or invalid Account ID
The Account ID is required and must be valid. If the API returns an error about the account not found, verify the Account ID input.Authentication errors
If the API call fails due to authentication, check that the correct type of access token is selected and properly configured in n8n credentials.API response errors
Any other errors returned by the Swan.io API will be surfaced. Review the error message for details and ensure the input parameters meet API requirements.
Links and References
- Swan.io API Documentation (general reference for API endpoints and data structures)
- n8n documentation on creating custom nodes