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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Json values to split o...
Power Automate
Answered

Json values to split operations related error

(1) ShareShare
ReportReport
Posted on by 2,249

 

 

List structure

Veblitz_9-1720953684467.png

 

Country-Single line of text

customer-Single line of Text

Incoming Email details

Veblitz_10-1720953684468.png

 

 

Flow details

Veblitz_0-1720953643937.png

 

Veblitz_1-1720953644366.png

 

toLower(triggerOutputs()?['body/subject'])  contains  toLower('Country')
toLower(triggerOutputs()?['body/subject'])  contains  toLower('Customer')
 
Veblitz_2-1720953644063.png

 

json(concat('{ "', replace(replace(triggerOutputs()?['body/subject'],':','" : "'),'\','", "'),'" }'))
outputs('Subjectextract')['Country']
outputs('Subjectextract')['Customer']
Veblitz_3-1720953644660.png

 

Veblitz_4-1720953644626.png

 

 

Veblitz_5-1720953644241.png

 

 

 CReate folder expression

formatDateTime(utcNow(), 'yyyy')
create month folder expression
concat(formatDateTime(utcNow(), 'yyyy'),'/',formatDateTime(utcNow(), 'MMMM'))
set country variable expression
split(outputs('Subjectextract')[0],': ')
set customer variable
split(outputs('Subjectextract')[1],': ')
Veblitz_6-1720953644011.png

 

 

create new folder till country expression

concat(formatDateTime(utcNow(), 'yyyy'),'/',formatDateTime(utcNow(), 'MMMM'),'/',variables('varcountry'))
 create new folder till customer expression
concat(formatDateTime(utcNow(), 'yyyy'),'/',formatDateTime(utcNow(), 'MMMM'),'/',variables('varcountry'),'/',variables('varcustomer'))
 create new folder finalpath expression
concat(formatDateTime(utcNow(), 'yyyy'), '/', formatDateTime(utcNow(), 'MMMM'), '/', variables('varcountry'), '/',variables('varcustomer'))
 Veblitz_7-1720953644192.png

 

Veblitz_8-1720953644476.png

 

 output of ‘Subjectextract’ is json but im not aware of onverting into array because i need to create folder based on these values array index then i need to use split inorder to create an array index and concat values and create folder structure in document library as per above flow but my above flow failed with this error 

Unable to process template language expressions in action 'Set_Country_variable' inputs at line '0' and column '0': 'The template language expression 'split(outputs('Subjectextract')[0],': ')' cannot be evaluated because property '0' cannot be selected.

Veblitz_11-1720953734440.png

 

 

Run error for my above flow logic

I am trying to extract subject values when new email arrives and create items in list additionally adding email attachment in document library with year\month\country\customer folder inorder to place email attachments

 

Veblitz_12-1720954041090.png

 

Veblitz_13-1720954040102.png

 

 

Veblitz_14-1720954041094.png

 

 

 

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @Veblitz 

    What is the value of "outputs('Subjectextract')" in your case?

    Maybe I can help with a modified expression.

     

     

  • Veblitz Profile Picture
    2,249 on at

    Veblitz_0-1721029639965.png

     

    Im not sure how to convert this JSON into array value 

    json(concat('{ "', replace(replace(triggerOutputs()?['body/subject'],':','" : "'),',','", "'),'" }'))

     

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @Veblitz 

    To extract Country and Customer from

    {

    "Country":"NZ",

    "Customer":"ABC"

    }

    Use,

    outputs('SubjectText')['Country']

    outputs('SubjectText')['Customer']

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 459

#3
11manish Profile Picture

11manish 382

Last 30 days Overall leaderboard