Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom attributes as triggers, conditions and actions for automations and macros #5886

Open
ASchneiderBR opened this issue Nov 17, 2022 · 10 comments
Labels
feature-request This label is used to track new features which is a significant change to existing product 🐗 Need Product Spec This issue needs clear product spec to move forward. Idea is still under investigation

Comments

@ASchneiderBR
Copy link

Is your feature request related to a problem? Please describe.
Hello! A really nice feature that I miss when using automation and macros, is the ability to use custom attributes for triggering, conditions and actions. I believe this could unlock so many possibilities, like using custom attributes as variables, creating very powerful "pseudo-bots" natively.

Describe the solution you'd like
It would be great to be able to choose custom attributes when creating automations and macros, so, for example, I could set this automation to only work when a message is triggered and this custom attribute is set to continue. Or to set a custom attribute as an action. Also, having the ability for basic functions in actions, like adding/subtracting to a number type custom attribute, adding text after/before, would also be great. I think this would be a simple way of creating bots.

Thanks!

@glauberssoutodossantos
Copy link

+1

@sojan-official sojan-official added feature-request This label is used to track new features which is a significant change to existing product 🐗 Need Product Spec This issue needs clear product spec to move forward. Idea is still under investigation labels Nov 28, 2022
@sojan-official
Copy link
Member

@ASchneiderBR Thanks for the report. Custom attributes are now available in automation trigger conditions
ref: #4548

We will consider the other requests for actions and macros for future releases.

@sojan-official sojan-official removed their assignment Nov 28, 2022
@ASchneiderBR
Copy link
Author

Thank you @sojan-official! I'm trying a self-hosted version, is it possible to update my instance so I can try this now? Thanks.

@tejaswinichile
Copy link
Contributor

@ASchneiderBR You can cherry-pick the commit from the above PR, but we would suggest you wait until we add it in the sooner release so that we would know if there are any impacts of the above changes on our staging.

@ASchneiderBR
Copy link
Author

ASchneiderBR commented Nov 29, 2022

@tejaswinichile Perfect! Thanks a lot! Are actions also planned? It would be great to set custom properties in automations as well.

@tejaswinichile
Copy link
Contributor

tejaswinichile commented Nov 29, 2022

@ASchneiderBR Right now, we are not supporting actions for custom attributes but the conditions filters based on the custom attributes are there.

Could you give an example of what sort of actions you required?

like adding/subtracting to a number type custom attribute, adding text after/before, would also be great.

I did not get this

@tejaswinichile tejaswinichile changed the title Custom attributes as triggers, conditions and actions for automations and macros Custom attributes as triggers, conditions and actions for automations/macros Nov 29, 2022
@tejaswinichile tejaswinichile changed the title Custom attributes as triggers, conditions and actions for automations/macros Custom attributes as triggers, conditions and actions for automations and macros Nov 29, 2022
@ASchneiderBR
Copy link
Author

Helllo @tejaswinichile!

It would be nice to have in the Actions section something like Update custom attribute, then a box at its side to choose which custom attribute you want to update, then another box at the right that you can set the data to update to it, if the attribute is text, show a text filed, if a number, the number field, if an option list, show those options as a list to pick one.

Having this done, if we could use simple operations like add, subtract, to certain types of custom attributes, like number, we could update its field using simple math, for example:

Custom attribute - How many lessons he had: If message has this text in it, then add 1 to the How many lessons he had custom attribute. So if the this custom attribute had 5 in it, after this automation runs, it will be updated to 6.

This is a simple example but it could be use with text, to add something to the left/right of a text custom attribute, even use regex or something like this.

Not only with automations, but with macros as well.

Thank you!

@lazmo88
Copy link

lazmo88 commented Nov 1, 2023

Related to this, would it be possible to consider adding/removing labels as trigger for automation? Would be helpful especially when using the mobile app, as there is no option to trigger macros from the mobile app.

@pradeep-gox
Copy link

+1

@lucianodltec
Copy link

+1 (and labels also)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This label is used to track new features which is a significant change to existing product 🐗 Need Product Spec This issue needs clear product spec to move forward. Idea is still under investigation
Projects
None yet
Development

No branches or pull requests

7 participants