-
Notifications
You must be signed in to change notification settings - Fork 3
Button templates in DMs, instead of a bare URL #24
Copy link
Copy link
Open
Labels
area: automationTriggers, keywords, DM content, delivery behaviourTriggers, keywords, DM content, delivery behavioureffort: mediumA few sessions. Touches several files.A few sessions. Touches several files.enhancementNew feature or requestNew feature or requestroadmapA planned feature from the README roadmapA planned feature from the README roadmap
Description
Metadata
Metadata
Assignees
Labels
area: automationTriggers, keywords, DM content, delivery behaviourTriggers, keywords, DM content, delivery behavioureffort: mediumA few sessions. Touches several files.A few sessions. Touches several files.enhancementNew feature or requestNew feature or requestroadmapA planned feature from the README roadmapA planned feature from the README roadmap
The problem
DMs are plain text. A bare URL in an Instagram DM is unappealing and converts worse than a tappable button.
What to build
Support Meta's button template on the private-reply send in
src/meta.ts, so a rule can define up to threeweb_urlbuttons.{ "recipient": { "comment_id": "..." }, "message": { "attachment": { "type": "template", "payload": { "template_type": "button", "text": "Here's the guide!", "buttons": [ { "type": "web_url", "url": "https://…", "title": "Get the guide" } ] } } } }Meta's limits, which are not negotiable
Truncate rather than error, and warn in the rule form when the DM text exceeds 640 characters with buttons enabled.
The part that needs care
Fall back to plain text when Meta rejects the template — but only then.
Meta returns errors for template rejection and for a closed messaging window and for an already-consumed private reply. Retrying the latter two as plain text will fail again and overwrite the true error with a misleading one, which makes the Sends log actively harmful for debugging.
Match the rejection reason and fall back only for genuine template rejections. Record which path was taken.
Acceptance criteria
Where to look
src/meta.ts—sendPrivateReplysrc/process.ts,src/routes/admin.ts,migrations/Pairs well with tracked links.