Read CSV file and send SMS messages
Overview
This template integrates with a SimWorkflow page and dispatches SMS messages via the Amazon SNS API, using data from a CSV file uploaded by users. The CSV file contains entries with details such as first name, surname, and primary phone number.
The CSV file is structured with the following format:
First_Name,Surname,PrimaryPhone
Ben,Smith,"+61491571491"
Tom,Ford,
Each entry comprises fields for first name, surname, and primary phone number. The phone numbers should be in international format, and the field could be empty.
How the template works
-
User input form: When triggered, the template displays a SimWorkflow page, allowing the user to upload a CSV file containing the contact details for SMS recipients.
-
CSV parsing: Upon CSV file submission, the template parses the file to extract the entries. It processes each entry to prepare SMS messages for those with phone numbers.
-
SMS message preparation: For each entry, the template prepares an SMS message containing personalized content based on the first name and surname.
-
Amazon SNS API integration: The template utilizes a Map task to iterate through each entry and execute the Amazon SNS API to send SMS messages.
Main workflow
"Send SMS" map task
Benefits of the template
-
Streamlined Workflow: The template simplifies the process of sending SMS messages by automating the steps involved in CSV parsing and API integration.
-
User-Friendly Interface: The SimWorkflow page provides an intuitive interface for users to upload CSV files and initiate the SMS sending process.
-
Efficient Communication: By leveraging the Amazon SNS API, the template enables reliable and efficient delivery of SMS messages to designated recipients.
How to use the template
Step 1: Create AWS credentials
-
Generate AWS access key and secret access key.
-
Log in to the SimWorkflow.
-
Navigate to Credentials.
-
Click Create credentials button.
-
Select AWS tab.
-
Enter Amazon SNS send SMS in the Name field.
-
Paste the Access key in the Access key ID field.
-
Paste the Secret access key in the Secret access key field.
-
Click Create credentials button.
Step 2: Create SimWorkflow page
-
Navigate to Pages.
-
Click New page button.
-
Enter Upload CSV to send SMS for the page title.
-
In the page body, press / to open up the menu and select Paragraph text option.
-
Enter uploadFiles in the Field name field.
-
Enter Please attach the CSV file with customer details to send SMS in the Field label field.
-
Check the Required field checkbox.
-
Check the Rich text editing checkbox.
-
Click Save button.
-
Click Close button.
Step 3: Use this workflow template
- Click Use this template button on the top right of this page.
- Click Upload CSV file task and select Task Processor tab.
- Select Upload CSV to send SMS page as the task processor.
- Click the down arrow icon next to the Send SMS task to enter the map.
- Click Amazon SNS send SMS task and select Configuration tab.
- Select Amazon SNS (AWS) for the Credentials field.
- Click Save button.
- Toggle the Enable checkbox to enable the workflow definition.
Step 4: Define variables
-
Navigate to Workflow definitions.
-
Click Variables menu item from the three dots (more options) menu of the Read CSV file and send SMS messages workflow definition.
-
Enter awsRegion in the Variable key field.
-
Enter AWS region in the Variable value field.
-
Click Save variable button.