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 / Extract these values f...
Power Automate
Answered

Extract these values from email subject Subject: Country: country1\Customer: Client1\Contract Number: 1234\Type: Renewed\Region: Region1\Department: Sharepoint and to create a vlaues in the list

(1) ShareShare
ReportReport
Posted on by 2,249

I need to extract subject values and store in list columns and at the same time email attachments to be stored in the document library based on the subject line values folder names before adding attachment. please refer below expected output

Email Template //Sample

Subject: Country: Kenya\Customer: client1\Contract Number: 43291\Type: Renewed\Region: Washington\Department: Sharepoint

Sharepoint List for storing subject values

Country-Single line of Text;Customer-Single line of Text;Contract Number-Single line of Text;Type-Single line of Text;Region-Single line of Text,Department-Single line of Text

 

Question: How to extract incoming email as per above example subject and create item into sharepoint list respective columns and to store email attachments in the document library

Expected output

List :

Country: Kenya

Customer: client1

Contract Number: 43291

Type: Renewed

Region: Washington

Department: Sharepoint

Library //To create defined folder based on the subject values

Year\month\country\customer\Department\Region\Type(predfined values) 

So ideally,we need to check these subject values of the above columns dynamically and create a folder structure and store attcahments which we recieve in email

2024\July\Kenya\client1\sharepoint\Washington\Renewed

 

 

 
Categories:
  • Verified answer
    AnthonyAmador Profile Picture
    2,557 Moderator on at

    Hi @Veblitz 

    To address your query, you can leverage a cloud flow that initiates with the trigger “When a new email arrives”. This trigger will allow you to access the subject of the incoming email. You can then process the subject line to extract the required information using appropriate expressions, you can use split() Split function - Power Platform | Microsoft Learn, and store these extracted values in separate variables.

    Once you have these variables, you can utilize the “Create Item” action from SharePoint connector to populate the columns of your list with the corresponding variables.

    If there’s a need to create a new folder, you can do so using the SharePoint action “Create new folder”. This will allow you to organize your data based on the subject line values.
    SharePoint - Connectors | Microsoft Learn

    Finally, you can add the email attachments to the newly created folder using "Create file" action. This way, you can dynamically check the subject values, create a structured folder based on these values, and store the email attachments accordingly.

    I hope this helps! 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 211 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 190

Last 30 days Overall leaderboard