Direct Mail skill file (for claw/claude/agents)
Example directmail skill. md file you can load up for your agents. ------------------------------------ # Skill: Thanks.io Direct Mail Automation Handle direct mail workflows including sending handwritten postcards, letters, and managing mailing lists via the Thanks.io API. ## Requirements - An active Thanks.io account. - API Key (found at: https://dashboard.thanks.io/profile/api). - Environment Variable: THANKS_IO_API_KEY ## Actions ### send_postcard Sends a personalized postcard to a recipient. - type: "4x6" (default), "6x9", or "6x11" - front_image_url: Public URL for the front image. - message: The handwritten message for the back. - recipient: { "name", "address", "city", "province", "postal_code", "country" } - handwriting_style: (Optional) Integer ID for the pen style. ### send_letter Sends a professional letter. - message: Content of the letter. - recipient: { "name", "address", "city", "province", "postal_code", "country" } - window: boolean (true for windowed envelope). ### add_recipient Adds a contact to a mailing list for automated campaigns. - mailing_list_id: The ID of the list. - recipient_data: Object containing name and address fields. ## Implementation (Python Shell) import requests import os API_KEY = os.getenv("THANKS_IO_API_KEY") BASE_URL = "https://api.thanks.io/api/v2" def call_thanks_io(endpoint, payload): headers = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" } response = requests.post( f"{BASE_URL}/{endpoint}", json=payload, headers=headers ) return response.json() # Example: Send Postcard # payload = { # "front_image_url": "URL_HERE", # "message": "Hi %FIRST_NAME%, thanks!", # "recipients": [recipient_obj] # } # call_thanks_io("send/postcard", payload)