Quick overview
This workflow triggers on new Trello card events, extracts lead details (including a phone number) from the card content, and uses Twilio to send an SMS confirmation or alert, with a safe preview mode that builds the message without sending it.
How it works
- Receives a POST request from a Trello webhook when a card is created/updated, or you manually run a demo that injects sample Trello card payloads.
- Loads centralized configuration values (Trello/Twilio settings, lead label rules, and an SMS template) and passes the incoming card payload forward.
- Parses the Trello card to extract key fields like contact name, phone, email, company, budget, timeline, labels, and a Trello card URL.
- Filters out cards that don’t qualify (for example missing a phone number or the required lead label) and returns a rejection reason without attempting to send.
- Renders the SMS body from the configured template and chooses the recipient number (the card phone number, or an optional test “trench phone” in preview mode).
- If Twilio is enabled (credentials provided and DRY_RUN is off), sends the SMS via the Twilio Messages API and outputs either the Twilio success response or the failure reason.
- If Twilio is not enabled, outputs an exact preview of the SMS (to/from/body) so you can verify the message content without sending.
Setup
- Create a Trello API key/token and set your Trello webhook to call the workflow’s production webhook URL.
- Add your Twilio Account SID, Auth Token, and an SMS-capable Twilio phone number, then set DRY_RUN to false when you are ready to send real messages.
- Update the configuration values for the watched Trello board/list IDs, the lead label prefix (optional), the phone-field IDs (optional), and the SMS template text.
- (Optional) Set a “trench phone” number so preview mode can deliver test messages to your own device instead of the number found on the Trello card.