In a recent article, we talked about some of the automation options when a client has a system they love and have invested much in, but need better choices for integrations with their other platforms. Today, let’s examine a real-world example of how we were able to successfully resolve this issue for a client of ours!
While sharing their screen in a virtual discussion about a significant project, we noticed our client being barraged with several email notifications in their inbox in quick succession. At one point, they sighed loudly.
At the end of the call, we had to ask: Is everything alright?
“Well, you see, we have this platform we use for our service orders. Technicians fill out a service order while on a service call, and the system sends us a PDF of the service order by email. Certain clients want the PDFs in a shared drive they can consult.”
“So,” we asked, “you manually process each email and move the PDFs to the shared drive?”
“Oh, I know what you folks are going to say! We can just use a CRM for the service orders, and then no notification emails fill the inbox, yada yada… but the technicians really like the mobile platform – it just doesn’t have good integration mechanisms with anything! And the clients want to use the file sharing mechanism they already know.”
We’ve heard it so many times! “We have this software package or service we like and have considerable training investment in, so don’t touch it!” – the reality is that adopting an entirely new platform like a CRM isn’t the solution for everyone.
Their use case was that a specific set of clients wanted PDF documents generated by the system to be placed in a file-sharing platform so they could easily consult them. These documents contained information about service calls, including images. They needed to be available as soon as a service call was completed.
The client didn’t even ask us if we could help – we saw their frustration in an unrelated call. Multiple emails came through in fifteen minutes, and the queue grew longer every minute the client wasn’t processing one of them! So, we discussed options.
Option 1 – An automated task running on the client’s computer
The simplest solution would be to use TinyTask (or some other Windows-based task automation tool) to manually record the client’s steps and set it into a continuous playback with a pause.
There were several issues with this approach. It required that the Windows for the email client and other tools to upload to the file-share service always stay the same and that our client’s computer be on all the time.
Option 2 – A cloud-based automation/integration platform
Several possible platforms allow the client to read emails from an inbox, process each email, extract attachments, and save attachments to a file-share service.
But the client objected to the cost of running all these: “I’d rather continue doing it by hand!” They had the same concern about having a computer running on the cloud.
Option 3 – A small serverless application
Our final option and chosen approach was to create a small application and run it on the AWS platform, which the client already used for something else.
We used:
- AWS Lambda – to run the code without a server
- AWS Secrets Manager – to store the credentials to the email server and the file-sharing platform
- AWS Identity and Access Manager – to authorize the Lambda to access Secrets in Secrets Manager
- AWS Cloudwatch – to trigger the Lambda once an hour and to log the processing from the code
- The serverless framework – both as a deployment mechanism for the code and as insurance if we ever want to deploy the solution to a different cloud provider, like Azure or GCP
We wrote a short script in Python (excellent readability for future developers and lower cold start delays on AWS Lambda) that would:
- Obtain the secrets from AWS Secrets Manager
- Connect to the Email server and request all unread emails
- Determine if the email was a Service Order notification
- Obtain the attachments and the customer name from the email
- Connect to the File-sharing platform
- Upload the attachments to the appropriate customer directory
This service is going to cost very little – fractions of cents. It uses no storage in AWS and very little network traffic. The Lambdas run 24 times in 24 hours for mere seconds. It has been running for a month, and we are yet to see any cost attributed to it.
Conclusion
We solved a real pain point for our client. A problem they knew they had but thought they just had to live with – but in our experience, that is seldom true.
Because the maintenance of this type of glue code is rare, and probably won’t occur in our client’s case as they are shy about modifying the source system, we spent less than 20 hours discussing and developing the solution. Yet, we saved our client and their employees several hours of work every week.
Please reach out if you have an automation need or want to discuss options. We want to help!
Leave a Reply