Introduction
Text messages are used for everything today. They are simple, easy and fast. We use them every day for two-factor authentication and other application integrations, so it makes a lot of sense to improve and accelerate our SharePoint approval solutions using SMS.
In this simple demo application, I will show how you can easily get approvals via SMS using SharePoint lists and Infowise Ultimate Forms. It can serve as a basis for your own solutions. And the best thing, it only takes a few minutes to implement!
Our Scope
The business process we are implementing is very simple:
- A user fills out a simple request in a list using a custom SharePoint form created in our Form Designer.
- A text message is automatically sent to the manager's phone. We will be using Twilio as our messaging provider.
- The manager receives the message and responds with Yes or No.
- Ultimate Forms' Import component reads the message and approves/rejects the request item by setting the Approval Status column value.
All we are going to be needing is SharePoint (either Microsoft 365 or on-premises) and Infowise Ultimate Forms. You can get the latter here.
Getting it built
SharePoint list and form
First, I will create a new SharePoint list (either directly in SharePoint, or, easier, using Form Generator in Ultimate Forms). In my case it's called SMS Approvals, but the name doesn't matter.
We will need to create the following columns:
- Request - simple single line of text column. This is where the users are going to enter the request they need to be approved.
- Manager - person column, this is where the user will enter the manager to get the approval from. We can alternatively get it automatically from Entra ID (Active Directory), if this information is available there.
- Phone - user property column (a special column type unique to Ultimate Forms). It will automatically fetch the manager's phone number from the SharePoint user profile. Make sure your Entra ID (Active Directory) contains this information, although there is no real reason we couldn't just enter the phone number manually.
See how the column is configured and attached to the Manager column. - Approval Status - choice column with options N/a (default value), Approved and Rejected. In Form Designer we will add a permission rule to make this column always read-only, as it will only be updated by SMS.
Publish the new form, it's done. Next we will implement all the SMS integration. I promise it will be very simple!
Action
We will use an Action to send a text message to the manager when a new request is added to the SharePoint list. Create a Twilio account if you don't have one yet. In the account settings, grab the following:
- Account SID - your Twilio account ID.
- Auth token - make sure to keep this token secure. We will never display it in action settings after it's saved.
- Phone number - this is the phone number through which Twilio will send and receive text messages.
These are needed to be able to connect to Twilio and send/receive text messages programmatically. You can easily find them on the Account Dashboard.
Next go into Ultimate Forms and click on Actions. Add a new Call application or service action. Under General tab, make sure it only runs on Item is added, as we want to send the text message as soon as a user submits a request.
Under Action tab, configure the Twilio parameters as following:
- Phone - that's the column from the list, which contains the manager's phone number
- Body - this is what the SMS will look like. As you can see, it's very simple and contains just the basic information regarding the request in addition to the instruction on how to respond. You can configure it any way you feel like, it doesn't really matter.
Once the action is created, the system can already partially work. Enter a new request and see how a text message is delivered within a minute or so.
Import
Next we will configure the Import profile that will monitor the incoming text messages and update the request according to the reply. Note that this is a very simple system, we determine which request to approve only based on the manager's phone number and the current status of the request. We can of course make it more complex, but this is enough for this particular demo.
Under Data provider enter your Twilio info.
Under Actions tab of the Import profile, we add a new action. That tells Import what to do with the newly imported messages. In our case, we will use that information to approve or reject request. That's why our action type is Update list item.
Next under Values to set we set the Approval Status to either Approved or Rejected based on the message. As we asked our managers to respond with Yes/No, we will use $If function to convert it to Approved/Rejected.
Under Item we specify which item we want to update. In our simple demo we simply locate the item by manager's phone number (From field in our incoming text message) and current status.
And this is it!
Conclusion
Ultimate Forms makes it ridiculously easy to integrate SMS into your SharePoint-based approval processes. No developer knowledge is required and the whole process takes just a few minutes.
Once our manager's response is imported, we can see how the Approval Status magically turns into Approved.