I have an Assets Schema called "Suppliers". The main Object is "Supplier". I want to email specific team members when a new Object in Suppliers is created. I'm using trigger Object created. Which works fine because it emails me and audit log says success.
But I can't seem to get any details from the newly created object to display in the email. I used log action steps for test purposes and all I get are blanks.
This is my automation rule:
The audit log returns blanks:
I feel I've got the wrong syntax, or do I need to do a lookup? Any help appreciated.
This is the Schema:
Two suggestions:
1. Any of the object triggers use the smart value {{object}} to access it.
2. There is an attribute type called Email that will help you out to make sure it's in the right format from the get-go
@Susan Hauth _Jira Queen_ it looks like @Andrea Robbins is actually correct here, with her `{{object}}` suggestion. I missed that in the documentation. https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/#Lookup-objects
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Last thing - I am not sure if this has been updated since I last used these, but also ensure that the rule is Global scoped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Susan Hauth _Jira Queen_
The {{object}} value will give you the key for the newly created object.
You can use smart values to get data from that object, as documented here:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Susan Hauth _Jira Queen_ ,
I don't believe the Created Object event trigger pulls the details. I suspect you'll need to add a "Lookup Objects" search as your first action, and filter the Asset Objects to the most recently created object.
From what I can find, here's a guide that elaborates on this process: https://community.atlassian.com/forums/Jira-Service-Management-articles/How-to-obtain-newly-created-Assets-object-in-the-automation-rule/ba-p/2359513
Hope this helps!
Robert
EDIT: I'm wrong. You are able to access the object via the `{{object}}` smart value, as defined in the documentation: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/#Lookup-objects
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think for the lookup, you could probably search for all of the suppliers, and then sort them by Created Date. Then, simply pull the first result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can't find anything in the public Jira backlog, maybe this could be worth raising an Atlassian Support ticket to introduce support for finding the object that triggered the automation... 🤔
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So Atlassian gives us a trigger for created Object...but has no way of referencing the object that triggered it?
That sounds very tedious to do a lookup and sort and what if there are multiple new objects created, that won't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah it's not perfect, but it could work if you're creating objects one by one, and with some time between the creation.
The challenge I'm worried about is how fast the automation rule can trigger based on the object being created, and the automation rule completing. We would want both to occur before a new object gets created. Here's how I see it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.