Skip to main content

Notifications

Power Automate - General Discussion
Answered

How to get work item ID from email subject line to update the work item type from feature to product backlog item

(0) ShareShare
ReportReport
Posted on by 64

Hi,

I have a subscription which notifies me through email whenver a feature is logged in azure boards from service now app. I want to change the work item type from feature to Product backlog item, for that i need work item ID. can someone help me how to get work item ID from below email trigger.

HarikaVL_0-1683796846135.png

HarikaVL_1-1683796898678.png

Since i am using Email as a trigger, i guess i need a logic to extraxt the work item id from subject line or something.

 

  • Verified answer
    HarikaVL Profile Picture
    HarikaVL 64 on at
    Re: How to get work item ID from email subject line to update the work item type from feature to product backlog item

    Hello Nived,

     

    Thanks for your help. 

    I used the below expression to split and display the 2nd word from subject line and it worked.

    split(triggerBody()?['subject'], ' ')[1].

    HarikaVL_0-1684411324751.png

     

  • Nived_Nambiar Profile Picture
    Nived_Nambiar 17,115 on at
    Re: How to get work item ID from email subject line to update the work item type from feature to product backlog item

    Hi @HarikaVL 

     

    if the mail subject follows same pattern, then try this to get work item id from mail subject 

     

    Nived_Nambiar_0-1684351486003.png

     

    replace(split(triggerOutputs()?['body/subject'],'-')?[0],'Feature','')
     
    Hope it helps !
     
  • HarikaVL Profile Picture
    HarikaVL 64 on at
    Re: How to get work item ID from email subject line to update the work item type from feature to product backlog item

    Hello Nived,

     

    78322 is the work item ID.

     

  • Nived_Nambiar Profile Picture
    Nived_Nambiar 17,115 on at
    Re: How to get work item ID from email subject line to update the work item type from feature to product backlog item

    The expression you have written is wrong, it is used for calling variables .

     

    Nived_Nambiar_0-1684257219366.png

     

     

    Could u tell me which is workitem id from the subject line ?

    Feature 78322 - RITMxxxxx : Test Feature2 

     

     

     

  • HarikaVL Profile Picture
    HarikaVL 64 on at
    Re: How to get work item ID from email subject line to update the work item type from feature to product backlog item

    Hello Nived,

     

    In the subject line, it will be as below

    Feature 78322 - RITMxxxxx : Test Feature2 

     

    I have added a below action to break the subject line and it worked

    HarikaVL_0-1684230029171.png

    However, i added another action to consider the 2nd string as the work id so added below action and getting the error.

    HarikaVL_1-1684230129004.pngHarikaVL_2-1684230149976.png

    Not sure, where i am going wrong. Please help.

  • Nived_Nambiar Profile Picture
    Nived_Nambiar 17,115 on at
    Re: How to get work item ID from email subject line to update the work item type from feature to product backlog item

    Hi @HarikaVL 

     

    where you find the workitem ID in the mail ?

    in email subject or in email body ?

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard