web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get work item I...
Power Automate
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 66

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.

 

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @HarikaVL 

     

    where you find the workitem ID in the mail ?

    in email subject or in email body ?

     

  • HarikaVL Profile Picture
    66 on at

    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
    18,136 Super User 2026 Season 1 on at

    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
    66 on at

    Hello Nived,

     

    78322 is the work item ID.

     

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    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 !
     
  • Verified answer
    HarikaVL Profile Picture
    66 on at

    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

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 307 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 269 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 115 Super User 2026 Season 1

Last 30 days Overall leaderboard