Commit Graph

25 Commits

Author SHA1 Message Date
Vishnu Narayanan
9527ff6269 feat: Add support for labels in automations (#11658)
- Add support for using labels as an action event for automation
 - Fix duplicated conversation_updated event dispatch for labels
 

Fixes https://github.com/chatwoot/chatwoot/issues/8539 and multiple
issues around duplication related to label change events.
---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-09-18 14:17:54 +05:30
Sojan Jose
45d4d3660c feat: Add private note action to automations (#11926)
## Summary
- allow AutomationRule to accept `add_private_note` action
- support `add_private_note` in automation action service
- expose private note action in frontend constants and i18n
- test new automation rule action

## Testing
- `pnpm eslint
app/javascript/dashboard/routes/dashboard/settings/automation/constants.js`
- `bundle exec rubocop app/services/automation_rules/action_service.rb
app/models/automation_rule.rb
spec/services/automation_rules/action_service_spec.rb`
- `bundle exec rspec
spec/services/automation_rules/action_service_spec.rb`


------
https://chatgpt.com/codex/tasks/task_e_6870c5f7b8b88326a9bd60b2ba710ccd

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-07-16 09:57:35 +05:30
Pranav
ef591f848a chore: Add open conversation option (#11828)
Added conversation_status, assignee_id, team_id, and priority to the
message_created event to allow users to build automations based on
conversation details. Also introduced a new open_conversation action.

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-07-02 10:01:50 +05:30
Shivam Mishra
b34dac7bbe feat: validate query conditions (#10595)
Query conditions can take in arbitrary values, this can cause SQL
errors. This PR fixes it
2024-12-17 17:16:37 +05:30
Shivam Mishra
9a1c54a82d feat: disable automation rules if condition fails multiple times (#9017)
* feat: add email for disabling automation rule

* feat: disable automation rules and notify admin

* feat: reset error count after update

* feat: trigger invalid_condition_error if rule is invalid

* feat: setup error trackable concern

* refactor: use ErrorTrackable in Reauthorizable

* fix: optional argument

* feat: separate reauthorization_required_key

* test: update case to use ERROR_TRACKABLE_COUNT

* Revert "test: update case to use ERROR_TRACKABLE_COUNT"

This reverts commit f439847147556a02759a7597a7fcf1d66091cafc.

* Revert "feat: separate reauthorization_required_key"

This reverts commit f4514fce217b0a2f2c2bf701a15de0a8b47acbc4.

* Revert "fix: optional argument"

This reverts commit 93b4194ec3f10f67e2402388c966c071c4d3b4fd.

* Revert "refactor: use ErrorTrackable in Reauthorizable"

This reverts commit 513c2a522bc782e73ea4b0f5ae34ce01e70e042c.

* Revert "feat: setup error trackable concern"

This reverts commit 278683060cf422f60af5d5c77100aa5272141141.

* feat: use reauthorizable for automation rule

* feat: remove redis key

* test: fix method names

* chore: refactor

---------

Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com>
Co-authored-by: Sojan <sojan@pepalo.com>
2024-03-28 13:14:16 +05:30
Vishnu Narayanan
b8047f0912 feat: sla-2 add automation backend support for SLA (#8775)
* feat: add automation support for SLA

* feat: add sla action in automtion UI

* chore: revert frontend changes

* chore: refactor to ee namespace

* chore: refactor automation rule to ee namespace

* feat: create applied_sla table entry

* chore: add applied_sla spec

* chore: rubocop fixes

---------

Co-authored-by: Sojan <sojan@pepalo.com>
2024-02-01 15:42:12 +05:30
Shivam Mishra
cd217a3f86 feat: allow automation rules to remove labels (#8346) 2023-11-13 13:10:55 +05:30
Vishnu Narayanan
123fc73394 feat: add audit trail for sign_in and sign_out (#7158)
* feat: add audit_trail for sign_in event

* chore: ignore unrelated User model columns for auditing

* chore: fix prepend call for webhook/automation rule

* chore: add spec for sign_in event

* chore: refactor sign_in auditlog method to enterprise namespace

* feat: add sign_out audit trail

* feat: review comments
2023-05-25 14:27:30 +05:30
Muhsin Keloth
ac6de50b4d feat: Add a condition for filters based on the priority of automation (#6939) 2023-04-20 18:10:05 +05:30
Muhsin Keloth
d1584eea72 feat: Add an action on automation to change the priority (#6925) 2023-04-20 11:31:33 +05:30
Tejaswini Chile
6a0ca35de4 Feat: detect language of the message content (#6660) 2023-04-04 08:57:27 +05:30
Tejaswini Chile
d1ac33e98c feat: Phone number based automation conditions (#6783) 2023-04-02 10:54:51 +05:30
Vishnu Narayanan
d870b0815a feat: Audit log APIs (#6434)
- Adds the appropriate APIs for Audit Logs.

ref: #6015
2023-03-01 20:02:58 +05:30
Tejaswini Chile
ce807d3251 fix: Condition based backend validation (#6554) 2023-02-27 20:22:07 +05:30
Tejaswini Chile
5541d9e00b Fix: automation email improvement (#6061) 2022-12-19 13:21:33 +05:30
Tejaswini Chile
826a735cdb fix: Assign agent action changes (#5827) 2022-11-15 13:15:27 +05:30
Tejaswini Chile
6a4c0a1578 feat: Execute macro actions, for the conversation (#5066) 2022-07-26 12:41:22 +05:30
Tejaswini Chile
1b3011b27b fix: Add Attachment endpoint to save file against automation rule (#4480)
Co-authored-by: fayazara <fayazara@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-24 12:02:40 +05:30
Tejaswini Chile
2acb48bbe0 feat: Add support for conversation attribute automation conditions in message event (#4518)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-04-21 20:52:23 +05:30
Fayaz Ahmed
337a74a10c feat: Add send message, fix issues with message conditions (#4423)
Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
2022-04-14 13:36:55 +05:30
Tejaswini Chile
2595e774e5 fix: Update validations in automation edit actions (#4370)
Co-authored-by: fayazara <fayazara@gmail.com>
2022-04-05 15:22:56 +05:30
Tejaswini Chile
15fd37b124 Feat: attachments automation (#4266) 2022-03-30 08:08:58 +05:30
Tejaswini Chile
e06a6a7c55 Automation enhancement (#4087) 2022-03-21 13:12:27 +05:30
Tejaswini Chile
7df68c6388 Feat: Automations Actions (#3564) 2022-01-13 11:21:06 +05:30
Tejaswini Chile
a0884310f4 feat: Save automation rules (#3359) 2022-01-10 12:41:59 +05:30