Skip to content

About

Playwright + Docker automation to send text messages via ClubReady Connect

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

cr-connect-sms

Headless Playwright + Docker automation that sends a text message to a named contact via ClubReady Connect.

Pass a contact name and message at runtime — the script logs in, finds the contact, composes the message, acknowledges the non-promotional checkbox, and hits Send.


Requirements

  • Docker (tested on Docker 29.x)
  • ClubReady Connect credentials with access to the Conversations module

Setup

1. Clone the repo

git clone https://github.com/TheKatariya/cr-connect-sms.git
cd cr-connect-sms

2. Create your .env file

cp .env.example .env

Edit .env with your ClubReady Connect credentials:

CR_EMAIL=your-email@example.com
CR_PASSWORD=your-password

3. Build the Docker image

docker build -t cr-connect-sms .

First build takes ~2–3 minutes — it downloads the Playwright base image and Chromium. Subsequent builds are fast (cached layers).


Usage

Basic

docker run --rm --shm-size=1g \
  -e CR_EMAIL="your-email@example.com" \
  -e CR_PASSWORD="your-password" \
  cr-connect-sms "First Last" "Your message here"

Using a .env file (recommended for repeated use)

docker run --rm --shm-size=1g \
  --env-file .env \
  cr-connect-sms "First Last" "Your message here"

Examples

# Single follow-up
docker run --rm --shm-size=1g --env-file .env \
  cr-connect-sms "John Smith" "Hey John, just following up on your trial!"

# Appointment reminder
docker run --rm --shm-size=1g --env-file .env \
  cr-connect-sms "Sarah Connor" "Reminder: your appointment is tomorrow at 10am."

# Multi-word names with spaces work fine — just quote them
docker run --rm --shm-size=1g --env-file .env \
  cr-connect-sms "Mary Jane Watson" "Welcome to BFT Tysons!"

What it does (step by step)

  1. Logs into connect.clubready.com using CR_EMAIL / CR_PASSWORD
  2. Navigates to the Conversations page (/messages)
  3. Clicks New
  4. Searches for the contact by name and selects the first result
  5. Types the message into the compose box
  6. Checks the "I acknowledge that this is a Non-Promotional message" checkbox
  7. Clicks Send

Output

Stream Content
stdout SUCCESS on completion
stderr Step-by-step progress logs
Exit code 0 Message sent
Exit code 1 Something failed

On failure a full-page screenshot is saved to /tmp/cr-connect-error.png inside the container. Mount a volume to retrieve it:

docker run --rm --shm-size=1g --env-file .env \
  -v /tmp:/tmp \
  cr-connect-sms "John Smith" "Test" 
# Screenshot at /tmp/cr-connect-error.png if it fails

Deployment (production server)

The image is built and running on 100.124.184.65. To rebuild after code changes:

# On the server
cd /home/pkatariya/cr-connect
git pull
docker build -t cr-connect-sms .

Then call it with the env file stored on the server:

docker run --rm --shm-size=1g \
  --env-file /home/pkatariya/cr-connect/.env \
  cr-connect-sms "First Last" "Your message"

Calling from n8n

Use an Execute Command node with:

docker run --rm --shm-size=1g --env-file /home/pkatariya/cr-connect/.env cr-connect-sms "{{$json.name}}" "{{$json.message}}"

Check stdout for SUCCESS to confirm delivery.

About

Playwright + Docker automation to send text messages via ClubReady Connect

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages