Skip to main content

Trigger when a comment is added

Start an automation when someone comments on a record or replies to a comment, then reply to the comment or delete it right from the automation.

Written by Leo

When a comment is added is a trigger that starts an automation every time someone adds a comment or a reply to a record in a database app (the trigger decides when an automation starts, and the filter decides whether it continues). It's meant to help you react to conversations on records without reading every comment.

You can use this trigger for many things, including:

  • Replying with a short confirmation when a customer comments on a support request.

  • Replying to every comment on a request that's still open.

Creating an automation in the Expenses database app: clicking the automations icon, New automation, and When a comment is added. The trigger reads When a comment is added in Expenses, with an empty filter row below

Note:

  • Replies count too. The trigger starts when someone adds a comment or replies to one.

  • Replies from an automation don't start it. A comment from the Add comment action starts it only if Trigger automations is turned on in the action's settings. See the FAQs below.

Who can use the When a comment is added trigger?

  • Automations are available on all plans: Free, Plus, and Premium. The number of automation actions per month depends on your plan. See the limits for your plan on our pricing page.

  • To create, edit, pause, run, or delete automations, you need to be a Workspace admin in the workspace the database app belongs to. Only workspace admins see the automations button in a database app.

Set up the When a comment is added trigger

To set up the trigger:

  1. Open the database app and click the automations icon at the top right (Create and view automations).

  2. Select New automation.

  3. Select When a comment is added from the list of triggers.

  4. Add a filter if the automation should only continue for certain comments. Learn more about filters below →

  5. Select Add action and choose what should happen.

  6. Select Create automation.

The trigger When a comment is added in Expenses in the automation editor

The trigger reads like a sentence: When a comment is added in {app}. It has no settings of its own, so there's nothing to choose except the database app.

To give the trigger your own name, select its name and type a new one.

Actions for comments

With this trigger, Add action offers two actions that you can't use with other triggers. Both work on the comment that started the automation:

  • Reply to comment adds a reply to the current comment.

  • Delete comment deletes the current comment.

All the actions for the current record are still available, such as Update record and Add comment. Learn more about the comment actions →

Filter the When a comment is added trigger

The filter decides whether the automation continues after it's been triggered. Under And if the following conditions are met, select Add filter and build a condition. You can filter on the record, for example on its Status, and on the comment itself:

  • Body is the text of the comment.

  • Comment creator is who wrote it.

You find these values under Comment in the list of values, so you can also use them in actions. There you also find Attachments, the files added to the comment. Learn more about filters →

Let's look at an example

Let's say you want to confirm every customer comment on a support request. Here's how:

  1. Set the trigger to When a comment is added in Support requests.

  2. Add the filter Where Status Is Open.

  3. Select Add action → Reply to comment.

  4. Enter "Thanks! We've seen your message and will answer within one business day."

  5. Select Create automation.

The next time someone comments on an open support request, you should see the reply under the comment!

When a comment is added errors

  • If an automation adds a comment with Add comment and Trigger automations is turned on in that action's settings, its own comment starts the trigger again and again. Trigger automations is off by default. Replies from Reply to comment don't start the trigger. See My automation runs in a loop →.

  • If the status next to the automation's name shows Broken in red, part of the automation doesn't fit the trigger, often an action that needs a current record. The part that doesn't fit is shown in red. While the automation is Broken, it doesn't run and you can't start a manual run. Tape then shows Trigger runs manually not possible because of broken automation.

  • If a run fails, you can see each step and its message in the automation's runs. To see the runs of an automation, click the play button next to Manual run at the top right of the editor (View all runs), or use cmd/ctrl + 1. The Runs panel lists the runs of the last 30 days. Select a run to see each step and its message. To see the runs of all automations, select Runs in the sidebar of the Automation Center.

  • Lots of automation activity in a short time can delay automations across your organization. The delay is temporary. Tape checks the load again shortly and runs waiting automations automatically. Learn more about limits and throttling →

Test, pause, edit, or delete an automation with this trigger

  • Manual run runs the automation once on the records you choose. It has real effects, so the example posts a real reply. Manual run uses the latest comment or reply of each record you choose, and Reply to comment and Delete comment act on that comment. Records without comments are skipped.

  • New automations you create in the editor are Active right away. To pause one, select Active next to the automation's name. It switches to Paused. Select it again to turn the automation back on.

  • To edit an automation, open the database app, click the automations icon at the top right, then select the automation. Select Save changes when you're done.

  • To delete an automation, open it and click ••• at the top right, then select Delete. Confirm with Delete. You can also click ••• next to the automation in the list of automations, then select Delete. Deleting can't be undone.

  • To switch to another trigger, hover over the trigger and click ••• to the right of it, then select Turn into and choose a trigger. The filter and the actions stay. If an action or a filter condition doesn't fit the new trigger, for example Update record after switching to a schedule, or Has changed after switching away from When a record is updated, the status next to the automation's name turns red and shows Broken until you change or remove it.

Learn more

FAQs

Does the trigger run for replies, too?

Yes! A reply to a comment starts the trigger like a new comment does.

Why does my automation keep starting itself?

A comment from the Add comment action starts the trigger again if Trigger automations is turned on in the action's settings. Leave it off, which is the default. Replies from Reply to comment never start the trigger. You can also add a filter on Comment creator. Learn more about action settings →

Can I react to certain words in a comment?

Yes! Add the filter Where Body Contains and enter the word.

What's the difference between Add comment and Reply to comment?

Add comment adds a new comment to the current record. Reply to comment adds a reply under the comment that started the automation. It's only available with this trigger.

Are there other triggers I can use?

Yes! An automation can start when a record is created, updated, or deleted, when a comment is added, when a date arrives, on a schedule, and more. See every trigger in Automation triggers →

Are you a developer using the Tape API for automations?

The automation API has its own documentation for developers. Full reference: Triggers in the developer docs →

Still have more questions? Find answers and get help from community experts in the Tape community →.

Did this answer your question?