I have worked this every which way to Sunday and just can't not figure it.
I have a form that 3 Status: New User, Modify User, Terminate and it collects a bunch of data (contact, email, email distribution list, location, ext.)
New User - No automation needs to happen
Modify User - Take the user's email and make a REST API out to Snipe-IT using the email, get a response back for the userid, then issue another REST API call back out to Snipe-IT to get all the assets user has been assigned, then get that response back and post the response in a field on the form.
Seems simple enough, but I can not even get the automation to trigger. I tried a simple trigger such as edit form and then add a note to the audit log. Nother.
In a command prompt outside of Jira I can run a REST API and it gets authenticated and I do get a response, so I know that part works
Has anyone done this before? What am I missing?
Terry
NOTES:
This is a Company-Managed Space
At this point, I'm just trying to get the form to trigger and write to the Audit Log
The Audit Log never gets an entry.
1.) can I trigger an automation when I open the form after it was created, so basically edit the form. Check to make sure there is an email in the field Employee Email. If so, write to the Audit Log.
Once I can trigger the automation, I will work on actually doing what I want which is run an GET REST API call to Snipe-IT and retrieve the users (Employee Email) assets that have been assigned.
Hi @Terry Middleton ,
I think the main issue here is the trigger, not the Snipe-IT REST API itself.
From what you described, you’re trying to trigger automation when the form is opened or edited. In Jira/JSM, that usually won’t behave like a normal “field edited” event unless the form is actually submitted or the form data is written back to Jira fields. Simply opening the form, or changing values inside the form before submission, typically won’t give Automation something reliable to listen to.
I’d test the setup in smaller steps:
Use a “Forms submitted” trigger
Start with the native JSM trigger for when a form is submitted. If possible, select the specific form.
Make sure the important form fields are linked to Jira fields
For example:
Form field: Request Type
Jira field: User Action Type
Form field: Employee Email
Jira field: Employee Email
This gives Jira Automation reliable issue field values to check. Without this, the data may exist only inside the form response, and your rule may not be able to use it the way you expect.
Add a condition
Example:
If User Action Type = Modify User
And Employee Email is not empty
Add a simple test action first
Before calling Snipe-IT, add a comment to the issue or edit a test field. This will confirm the rule is actually firing.
Then add the Snipe-IT REST calls
Once the trigger works, use Jira Automation’s Send web request action:
First GET request to Snipe-IT using the employee email
Parse the response to get the user ID
Second GET request to retrieve assigned assets
Add the result to a Jira field or issue comment
One important note: I would not try to write the Snipe-IT response back into the form field itself. A cleaner pattern is to write the response into a Jira custom field, comment, or description field. Forms are better used for intake, while Jira fields are better for automation, reporting, and later workflow steps.
If you’re open to using Marketplace apps, another approach is Smart Forms for Jira, developed by my team. It can help with this type of structured intake because form fields can be mapped to Jira fields, forms can be added to JSM requests, and submissions can update existing Jira issue fields. Then Jira Automation can reliably trigger based on those mapped Jira field values and continue with the REST API calls to Snipe-IT.
For your case, I’d set it up like this:
Smart Form collects New User / Modify User / Terminate data
Employee Email is mapped to a Jira custom field
User action type is mapped to a Jira custom field
Jira Automation triggers after submission or field update( after each form submission Smart Forms leave comment and update work item fields, so automation can be clearly triggered)
If action type = Modify User, Automation sends the web request to Snipe-IT
The returned assets are written to a Jira field or comment
That way, the form remains the user-friendly intake layer, and Jira fields become the automation layer.
So in short: I don’t think you can trigger the rule just by opening/editing the form. Try triggering on form submission or on a mapped Jira field change, then run the Snipe-IT API call from there.
Good day! I'm Haripriya from the Atlassian Support team. To start with, may I know if the form you mentioned is a request form (under request type) or an Advanced form? Based on this, we'll have to modify the settings.
That said, I would recommend that you raise a support ticket with us via our Support contact form so we can get more personalised information from your site.
Thanks and regards,
Haripirya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Whenever you ask for help with an Automation Rule it will help us to help you if you provide:
1. what type of project is this (e.g., company-managed, team-managed, etc.),
2. images that show your complete rule.
3. images showing the details of any relevant actions/conditions/branches.
4. images showing the Audit Log details for the rule execution.
5. Explain where the issue is.
These questions are not for not willing to help, but to have community members understand on how automation works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Marc,
Thank you and great feedback. I will update my question with this info.
Thank you again,
Terry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First remove the condition from the trigger, they are known to fail due to timing issues.
Add the condition as a separate action in the rule, to check if all works add a log action to see if field Employee Email has a value, use smart values {{issue.Employee Email}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We made some good headway. We were able use Jira Automation to do a GET REST API to Snipe-IT and pass it data from the form (email address) and get back a webResponse json file/data.
Awesome.
Now I'm trying to get the json data from Snipe-IT json data to update on the form. This eludes me.
How can I update the form to reflect data retrieved from the GET REST API webResponse?
Terry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How is the reply information shown from Snipe IT, usually it's {{webResponse.body}}
But if you cold show screenshots of the response and what you need, this would help.
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.