Back
Tutorials
Jun 12, 2023
How to send invoice e-mail with attachments in Node.js using Engagespot API
Amal Raju
Introduction
Infin is a software that allows users to create and send invoices to their clients. To enhance its functionality, Infin has decided to integrate Engagespot's notification API, which will allow users to send notifications to their clients via web and mobile push notifications, with an attached PDF invoice. In this blog post, we will go over the benefits of using Engagespot's notification API and sending notifications with attachments in the context of Infin's invoice creation and sending software.
Engagespot Notification API
Engagespot is a notification API that provides web and mobile push notifications to users. Infin has decided to integrate Engagespot's notification API with its software to allow users to send notifications to their clients when an invoice is created or updated.
Here are some of the key benefits of using Engagespot's notification API
1.Multi-channel communication: Engagespot's notification API allows users to send notifications to their clients via web and mobile push notifications, email, SMS, and more.
2. Real-Time Analytics: Engagespot provides real-time analytics that allow users to track engagement and optimize their messaging for better results.
3. Customizable Templates: Engagespot provides customizable templates for notifications, which can be branded to match a user's business.
4. Easy Integration: Engagespot can be easily integrated with a user's existing software or website, making it easy to start using right away.
Why Infin might want to send notifications with attachments ?
Streamlined Communication: Sending notifications with attachments can help streamline communication between Infin and its clients. By including a PDF invoice with the notification, clients can quickly and easily view important invoice information without needing to log into the Infin software
Improved Client Experience: Providing clients with a clear and concise invoice that is easy to read and understand can improve the overall client experience. This can lead to increased customer satisfaction and loyalty.
Reduced Administrative Tasks: By automating the process of sending notifications with attachments, Infin can reduce administrative tasks and free up time for other important business tasks.
Benefits of Sending Notifications with Attachments
Increased Efficiency: Sending notifications with attachments can help increase efficiency by automating the process of communicating important information to clients. This can help reduce the time and effort required to manually send invoices to clients.
Improved Client Engagement: Providing clients with a clear and concise invoice that is easy to read and understand can improve client engagement. This can lead to increased customer satisfaction and loyalty.
Enhanced Professionalism: Sending notifications with attachments can enhance the professionalism of Infin's communication with clients. By providing a clear and professional invoice with the notification, Infin can demonstrate its commitment to providing quality service. Now, let's take a closer look at how Infin integrated Engagespot into its software to streamline its invoicing process and improve communication with its clients.
Setup Engagespot
It's not a difficult task to send an email notification with an attachment via Engagespot. All you need are an API key, API secret, and a template ID, which you can find in the Engagespot dashboard. Additionally, Engagespot allows you to design your email template within the platform.
Basic setups to send a notification via Engagespot
We can use NodeJS SDK to send a notification, which makes it very easy to do the process. Install the SDK
We have only 3 steps to send an invoice attachment
Authenticate
Create a user in engage spot
Send notification
Copy the API key and secret from Engagespot dashboard to the environment
Authenticate the client using SDK
Create a user on engagespot
Creating a user account is a one-time process. Once you create a user, you do not need to create a new account each time you send a notification
Send notification
These are the basic concepts of sending notifications through engagespot.
Send Invoice Notification
The first step in the integration process is to create a service called engagespotService, which enables the sending of notifications from anywhere in our code. Next, we created a sendNotification() function that is responsible for sending notifications through Engagespot. To send a notification from our code, we can use the engagespotService.sendNotification() function. This is how our EngagespotService and sendNotification function looks like.
We can send the invoice notification with an attachment by calling the sendNotification() method Example :
With the attachment key we can send multiple attachments
Conclusion
Infin's integration of Engagespot has been instrumental in streamlining its invoicing process and improving communication with its clients. By automating the process of sending notifications and including PDF attachments, Infin has been able to save time and improve the user experience for its clients. Engagespot's key features such as multi-channel communication, customizable templates have also helped Infin to personalize its messaging and drive better results. With Engagespot, Infin has taken an important step towards achieving its goal of providing a seamless and efficient invoicing experience for its clients. If you're looking to improve your communication with clients and streamline your business processes, Engagespot could be a valuable tool to consider.