Skip to content
Denne side findes på dansk. Læs på dansk
HeyMySocial

save_automation_rule_draft

Draft an inbox automation rule

writes found with search_tools

Saves an inbox automation rule as a draft for a person to review. trigger comment_keyword (with keywords) or new_message; action reply_comment (answer the comment with the template; comments only), draft_reply (prepare a reply a person sends), assign (to assign_to) or tag (with tags).

A draft does nothing: a person with the right to manage automation reads exactly what it would do and approves it in the app (review_url). This tool cannot approve, activate, pause or resume a rule. Changing what an approved rule does returns it to draft and it stops acting. The template may use {first_name}; write it from the workspace's own facts, with no price, date or promise that is not there, and never as if a person typed it live. Refused by design: comment-to-DM, cold or bulk direct messages, replies outside the message window.

Arguments

NameTypeNeededWhat it is
rule_id string no An existing rule to change. Leave out to create a new one.
name string no A name of up to 120 characters. Required for a new rule.
trigger string no Required for a new rule.One of: comment_keyword, new_message
action string no Required for a new rule. reply_comment only with trigger comment_keyword.One of: reply_comment, draft_reply, assign, tag
channel_id string no Only on this channel (ids in list_connections). Leave out for every channel.
keywords array of string no Words to look for in a comment. Required for comment_keyword.
match string no Whether any keyword or all keywords must appear. Default any.One of: any, all
escalate_keywords array of string no Words that hand the conversation to a person instead of acting (for example "complaint", "lawyer").
template string no The reply text for reply_comment and draft_reply. May use {first_name}.
assign_to integer no For assign: the user id of a person who may work the inbox.
tags array of string no For tag: the tags to add.
rate_limit_per_hour integer no Most times the rule may act in an hour. Default 20, at most 60.
request_key string no For a new rule: any unique string. The same key returns the first result instead of a second rule.

Like every workspace tool it also takes workspace: a workspace id or slug. Leave it out to use the workspace the person last worked in.

How it behaves

  • It changes something in the workspace, within what the signed-in person's role allows.
  • It is not in the first list an assistant sees; the assistant finds it with search_tools and runs it with execute_tools.

How tools behave: confirmation, review links, errors and limits

draft_reply · get_conversation · list_automation_rules · list_conversations · manage_conversation · simulate_practice_message