Automatically update CustomField using Rest API and Microsoft List

Tim Posselwhite January 20, 2025

Hello everyone! 

Im trying to automate a Custom Field in JSM from a Microsoft List. In the list we have 150+ locations which I want to be able to select in the Custom field.

I have set up a Power Automate flow, connected the list and got GET and POST to work, however im not sure this is the best approach? I also want to be able to Delete and change an entry if its name is updated in the list (post will only add a new entry if the name is changed)

Current Setup: Skärmbild 2025-01-20 130254.png

Power Automate flow, connected to MS List.

Trigger: "When an item is Created or Modified" -> HTTP with GET -> HTTP with POST (successfully adds new entries but doesnt change name or delete entries)

Using URI: rest/api/3/field/customfield_100xx/context/102xx/option which get my CustomField including the Values.
(more specific: 

"id": "10147",
"value": "TestLocation",
"disabled": false

If anyone has any experience with this, I'll gladly listen to ideas!

Cheers!

1 answer

1 accepted

1 vote
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2025
Tim Posselwhite January 20, 2025

Hi @Marc - Devoteam Thank you for your reply.

I have seen the documentation and tried to apply everything needed. Im probably not smart enough :)

What I cant get my head around is that to delete an entry, I need to have two values, both the ID and the Name. And compare the values between the MSList and whats already in the API list somehow.

I don't know very much of JSON scripting..

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2025

Hi @Tim Posselwhite 

Why delete an entry?

This will remove the information from the Jira issue, best practice is to disable the option, then it can't be used anymore on a JIra issue, but it wil retain the information for searching and maybe reporting.

Tim Posselwhite January 22, 2025

@Marc - Devoteam oh Thank you, I didnt think of that. Was exacly why I asked in the first place to get some good practises along with suggestions.

I agree that deleting will also remove valuable information, will look into PUT and disabling the options instead of removing!

Again, thank you for your responses :)

Like Marc - Devoteam likes this
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 22, 2025

Hi @Tim Posselwhite 

Please accept my answer as a solution, if my answer helped to solve your request.

This will help other community member trying to solve the same.

Tim Posselwhite January 27, 2025

Hi Marc,

Thanks, I haven't got the chance yet to fully get this working. 

The solution might be in your suggestion yes, as it links to the API documentation

Like Marc - Devoteam likes this
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2025

Hi @Tim Posselwhite 

Please accept my answer as a solution, if my answer helped to solve your request.

This will help other community member trying to solve the same.

Tim Posselwhite January 30, 2025

Still havent got this working, but the answer is most likely in there.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events