Use this template

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

  1. 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.

  2. 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.

  3. SMS message preparation: For each entry, the template prepares an SMS message containing personalized content based on the first name and surname.

  4. 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

How to use the template

Step 1: Create AWS credentials

  1. Generate AWS access key and secret access key.

  2. Log in to the SimWorkflow.

  3. Navigate to Credentials.

  4. Click Create credentials button.

  5. Select AWS tab.

  6. Enter Amazon SNS send SMS in the Name field.

  7. Paste the Access key in the Access key ID field.

  8. Paste the Secret access key in the Secret access key field.

  9. Click Create credentials button.

Step 2: Create SimWorkflow page

  1. Navigate to Pages.

  2. Click New page button.

  3. Enter Upload CSV to send SMS for the page title.

  4. In the page body, press / to open up the menu and select Paragraph text option.

  5. Enter uploadFiles in the Field name field.

  6. Enter Please attach the CSV file with customer details to send SMS in the Field label field.

  7. Check the Required field checkbox.

  8. Check the Rich text editing checkbox.

  9. Click Save button.

  10. Click Close button.

Step 3: Use this workflow template

  1. Click Use this template button on the top right of this page.
  2. Click Upload CSV file task and select Task Processor tab.
  3. Select Upload CSV to send SMS page as the task processor.
  4. Click the down arrow icon next to the Send SMS task to enter the map.
  5. Click Amazon SNS send SMS task and select Configuration tab.
  6. Select Amazon SNS (AWS) for the Credentials field.
  7. Click Save button.
  8. Toggle the Enable checkbox to enable the workflow definition.

Step 4: Define variables

  1. Navigate to Workflow definitions.

  2. Click Variables menu item from the three dots (more options) menu of the Read CSV file and send SMS messages workflow definition.

  3. Enter awsRegion in the Variable key field.

  4. Enter AWS region in the Variable value field.

  5. Click Save variable button.