Thursday, May 28, 2020

How to automate AWS SES E-mail Template Update

Amazon Web Service Simple Email Service ( SES ) is a popular and considerably cheap service to send out bulk transactional & personalized promotional emails. However, when it comes to the Template-based emails which help to bind values and send HTML email, the most frustrating part is updating the template and testing them.

Problems:

1. Creating a valid JSON file by escaping the HTML Email Text property
2. Updating the templated HTML file ( manual command-line task )
3. Testing the templated emails

How to automate AWS SES E-mail Template Update
How to automate AWS SES E-mail Template Update


Solution:


I've come up with a normal update script written in Nodejs language with the help of AWS SDK that can help in scaling email template updates faster.


Usage:

> node template-creater.js emailtemplate.html emailtemplate.json false emailtemplate-unique-name "Subject for the email"

This will automatically accept the templated HTML file and creates a valid JSON file and tries updating/creating templates in the AWS SES console based on configuration or command-line argument values.

 1st Argument => Templated HTML File
 2nd Argument => Name of the auto-generated template json file
 3rd Argument => Update or Create template ( boolean )
 4th Argument => Unique template name
 5th Argument => Subject of the email

Final Words:


Feel free to use the script ( No license Restrictions for personal/commercial projects and No Warranty from Author ) and for bugs/hugs do comment below. Share is care.

Monday, May 25, 2020

Hashing with Bcrypt in Nodejs

Publishing tutorials on nodejs after a long time 😀😀 and additionally, quarantine made me productive to learn more about Nodejs core concepts and implementing server-side code.

Background:


Learning cryptography is tricky and requires more patience to master those areas. Additionally, If you want to learn more about Bcrypt Algorithm and implementation, check out the link here.

Hashing with Bcrypt in Nodejs
Hashing with Bcrypt in Nodejs


Simple Steps to implement Bcrypt in Nodejs

Installation:

1. npm install bcrypt --save 

Start installing the bcrypt package into your nodejs apps which helps to implement the hashing function.

Hashing Function ( Sync and Async ):


Hashing function with Salt Generation ( Sync )

const salt = bcrypt.genSaltSync(saltRounds);
const hash = bcrypt.hashSync(myPlaintextPassword, salt);
Hashing function with Salt Generation ( Async )

bcrypt.genSalt(saltRounds, function(err, salt) {
    bcrypt.hash(plainText, salt, function(err, hash) {
        // Store hash in your password DB.
    });
});

Verify Function ( Sync and Async ):


Hash verification function ( Sync )

bcrypt.compareSync(myPlaintextPassword, hash); // true/false

Hash verification function ( Async )

bcrypt.compare(myPlaintextPassword, hash, function(err, result) {
    // result == true/false
});

Final note:

Bcrypt is safe as of now from timing attacks and other cryptographic reverse engineering or cryptanalysis. If you would like to check more about implementing using Async and Promises for Bcrypt Module, please check out the documentation of the bcrypt npm module.

Finally, for Hugs/Bugs do comment below. Share is care.


Sunday, March 22, 2020

Hassle free Appointment Scheduling Software for Business

Last month while traveling to the SaaS conference, one of the business owners I used to do contract work for asked for a small recommendation of software tools that can be used to optimize and automate the business task. So, quickly I got into the requirements and suggested a bunch of tools from Zoho, Shopify, Google to automate tasks that included Google Calendar for GSuite that helps in scheduling, reminding events. But now the requirement came differently to allow clients to prebook appointments and getting paid online to prevent spam signups by which Google calendar is not the right solution for scheduling needs. Stepping back little I googled for potential solutions and recommendations for Online Appointment Scheduling software by searching to Capterra, G2Crowd, FinanceOnline and even more. Fortunately, I met Guru from GoSchedule who attended the event and when introduced to each other with current work and he was so much happy to invite me for Contract works related to Android. Meanwhile, to my surprise, he pitched his company and motive behind his product that was an astonishing way about online appointment scheduling space where a lot of apps are behind lag and in need of a leader.

Online Appointment Scheduling for Business - GoSchedule
Online Appointment Scheduling for Business

Signup | Pricing | Help Docs | Support | Free Appointment Scheduling Software

Why GoSchedule?

Prior to trying out GoSchedule, I've been trying out calendly, Acuity Scheduling, Zoho Bookings, and even more calendar-based scheduling apps. But every app I used and started customizing for the requirements, I literally found limitations in the product side or the lag in UI/UX and integrations with the other business application. Keeping that in mind, I have tried out GoSchedule and most of the business requirements were satisfied and the team was super flexible to support customization that can be generalized for all customers.

Integrations

GoSchedule has extra-ordinary support for native integrations and zapier support to make the workflow easy for all types of business from SMB to Enterprise organizations. So that made our life easy to trigger workflows within the application based on realtime booking stats from the API and Zapier. Checkout zapier for GoSchedule which is available in private beta. Apart from Zapier, Microsoft calendar ( office 365 ), GSuite Calendar and zoom integrations are available in realtime that happens when the booking is done from GoSchedule apps.

Payment Integrations

Additionally, We could collect online payments via integrated payment hosted solution pages such as Stripe, Square Checkout, Razorpay, Paytm and even more. Payments are additionally tracked within the GoSchedule reports to checkout for revenue, sales and booking reports from the dashboard.

Tech Support

The team from GoSchedule is really enthusiastic working from remote while facing customers and tech support is super fast. They do support phone, chat, and email support and check out the options here

Now that this product has excellent traction and minimal features, this can be a good start for any business organization to have an appointment scheduling application instead of hitting excel sheets or maintaining a separate calendar with Google or Microsoft. Let me add more features to this blog post once trying out different types of appointments and use cases that GoSchedule tries to solve for business organizations and professionals.

Feel free to comment below. Share is care.