I’m trying to create an automation that sends a slack message to a specific channel when a record is created/updated. THE ISSUE IS, I want it to send a message only if one of the fields equals something - conditioning. I can’t seem to see how to do so.
I see I can do that when I choose the option “when a record matches conditions” but I want to separate between creating and updating into two different channels and that I can’t do with this conditioning.
If I’m understanding you correctly, what you want is:
- If record is created AND field value is equals to something, send Message 1
- If record is updated AND field value is equals to something, send Message 2
If so, perhaps you could use the
Last Modified Time field?
When a record is newly created, the
Last Modified Time field will be blank, so you could have an automation that runs whenever a record is updated AND its field value is equals to something, and within it have a conditional checking whether the
Last Modified Time is blank?
Thanks for the reply!
It didn’t work since the last modified field was not empty. so I tried the created field but the shortest amount of time available Is in the past week, which means I’ll get the notifications for all records created in the past week and not just the one that is currently being created
Hmm, sorry, I’m not really following. What do you mean when you say “shortest amount of time available is in the the past week”?
the time the record was modified
Ah I see. Yeah, you can change that to “Is empty” by clicking on the
Is within option
@Adam_TheTimeSavingCo is incorrect about the Last Modified Date, so his advice will not work. The Last Modified Date will only be blank if nothing has been typed into the record yet. Otherwise, it will always have a value.
However, I’m not sure I follow what you’re trying to accomplish, so I can’t guide you on a solution. Maybe create a video or post some screenshots.
@ScottWorld Wait, really? If we’ve got an existing
Last Modified Time field and a new record is created, the
Last Modified Time field’s populated?
Edit: Oh man, yeah, I just tested this via a form submission. Thanks for the correction!
@Eti_Avihail Since this is the case, you could try comparing record’s last modified time to the created by time if you’d like?
If the last modified time is equals to the created time, then that’s a newly created record so you can send the “Created” message then, and if not you can send the “Updated” message
I should clarify… that behavior is only if you use the default options for the “last modified time” field, which monitors “all fields”.
However, you can keep the “last modified time” field blank by setting it to only monitor certain fields, so until those fields receive values, the “last modified time” field will remain empty.
thank so much @Adam_TheTimeSavingCo and @ScottWorld
I think I found a work around but now I’m facing another issue. I’m trying to create a dynamic channel name with one of the fields, but when I test it, AT claims the channel does not exists even though it does.
this is the channel name definition:
and this is the error I get:
but this channel does exist:
And it even appears in the list of channels when you try to choose a static one:
Channel names start with #