Actions37
- Contact Actions
- Invoice Actions
- Item Actions
- Payment Actions
- Estimate Actions
- Tax Actions
- Bank Account Actions
Overview
This node integrates with the Alegra API to manage invoices, specifically enabling sending an invoice by email. It allows users to specify which invoice to send, the recipient email addresses, whether to send a copy to the user, and the type of invoice (original or copy) to be sent.
Common scenarios include:
- Automatically emailing sales invoices to clients after creation.
- Sending copies of invoices to internal users for record-keeping.
- Choosing between sending the original invoice or a copy depending on the business process.
Practical example:
- After generating an invoice in Alegra, use this node to send the invoice PDF to the client's email addresses and optionally send a copy to the logged-in user for confirmation.
Properties
| Name | Meaning |
|---|---|
| Invoice ID | The unique identifier of the invoice to send. |
| Emails | One or more email addresses to which the invoice will be sent. |
| Send Copy to User | Boolean flag indicating whether to send a copy of the invoice to the user executing the node. |
| Invoice Type | The type of invoice to send; options are "Original" or "Copy". |
Output
The output JSON contains the response from the Alegra API after attempting to send the invoice email. This typically includes status information about the email dispatch operation.
No binary data is output by this operation.
Example output structure (simplified):
{
"status": "success",
"message": "Invoice email sent successfully"
}
Dependencies
- Requires an active connection to the Alegra API via an API key credential configured in n8n.
- The node uses HTTP POST requests to the endpoint
/invoices/{id}/emailon the Alegra API. - Proper network access to Alegra's API endpoints is necessary.
Troubleshooting
- Invalid Invoice ID: If the provided invoice ID does not exist or is incorrect, the API will return an error. Verify the invoice ID before running the node.
- Email Address Issues: Ensure that the email addresses are valid and correctly formatted. Invalid emails may cause the API to reject the request.
- API Authentication Errors: If the API key credential is missing, expired, or invalid, authentication errors will occur. Check and update the API credentials in n8n.
- Permission Denied: The API user must have permission to send emails for invoices. Confirm user permissions in Alegra.
- Network Connectivity: Network issues can prevent communication with Alegra's API. Verify internet connectivity and firewall settings.
Common error messages:
"Invoice not found": Check the invoice ID."Unauthorized"or"Authentication failed": Check API credentials."Invalid email address": Correct the email input.
Links and References
- Alegra API Documentation (Unofficial): https://developer.alegra.com/
- Alegra Official Website: https://www.alegra.com/
- n8n Documentation: https://docs.n8n.io/