Photo by Alessio Soggetti on Unsplash
ServiceNow Go Run App
App Engine Studio generated application with Twilio integrated WhatsApp notification.
Background
As a keen runner, I've been thinking of ideas that I could build as a custom app in ServiceNow; firstly to build my skills in this area and secondly to build something that would be of practical use.
What I decided was an app where I could build training plans and schedules and most importantly pre-activity motivational WhatsApp reminders to get me out the door.
This is a high-level insight into the building blocks of the app.
Data
Firstly the data. What I envisioned was 3 tables consisting of:
- Training Plans
Label | Column | Type |
Name | name | String |
Goal | goal | String |
Start Date | start_date | Date |
End Date | end_date | Date |
Retrospective | retrospective | String |
Active | active | True/False |
- Activities
Label | Column | Type |
Training Plan | training_plan | Reference |
Type | type | Choice |
Name | name | String |
Description | description | String |
Gear | gear | Reference |
Day | day | Date/Time |
- Gear
Label | Column | Type |
Brand | brand | Choice |
Model | model | String |
Nick Name | nick_name | String |
Notes | notes | String |
Mileage | mileage | Integer |
Auto Retire | auto_retire | True/False |
Retire Mileage | retire_mileage | Choice |
Retired | retired | True/False |
Each training plan created would consist of several activities and each activity would use some gear (running shoes).
Experience
Next the experience. I created 3 record producers:
- Add Training Plan
- Add Activity
- Add Gear
A new Catalog (because why not) - Icons generated at https://icons8.com/):
Then a front-end Portal via UI Builder (App Logo generated at https://app.logo.com/):
Logic and Automation
Next the fun part. Automation. I created a flow that would send automated reminders of planned activities. I utilized Twilio (where you can set up a free trial) to trigger WhatsApp messages and integration to include a fitness-related quote with each notification for inspiration and motivation.
Actions
- Inspirational Quote Generator
A simple GET REST Message utilizing an API Key Header for Authentication (configured at API Ninja)
- Send WhatsApp via Twilio
Another simple POST REST Message utilizing Basic Authorization (Twilio Docs)
Flow
Outcome / Result
A nice little app that I will use to track training plans, goals and activities and my favourite part is an automated motivational message reminding me of the goal for the day:
Insights
Forms are also created as 'experience' items as a by-product of creating a table
Items not available to be created in App Engine Studio can be created via Studio (System Applications => Studio)
- For example, I created Application Menus / Modules, Connections and Credential Aliases
App Engine Starter Portal Experience (developed via UI builder) rather than Service Portal. Taken from this Portal Experience FAQs article by Ashley Snyder - Portal Experiences are suggested to be used as a self-service user interface for custom applications.
Conclusion
Hopefully, this was of some interest to some of you ServiceNow and/or Running enthusiasts out there. A decent starter app to whet the appetite. Drop any feedback, suggestions or comments below.