cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tobias_S
Advocate I
Advocate I

From predefined E-Mail via text preparation to Wordpress Post

Hello community,

 

I am quite new to Power Automate Workflow builds and some times I am struggling with my thoughts 🙂

 

Maybe you can help me out with the following automation: An E-Mail comes in with the following structure

 

E-Mail Header (to trigger the automation)

+++ The header of a story is provided within three plus symbols (+) +++

After the word wrap, the text area begins with multiple words and

multiple lines of text.

 

Is it possible to filter the text in between the "+++ " and " +++", to save this text as "Headline" for a word press post and the rest of the text as "Text part" for the same word press post?

 

I tried with compose and "replace()" but this does not solve the "extracting" and separation of the two text items within the body of the e-mail.

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @Tobias_S ,

 

Do you mean you have emails sent in with below structure?

vjefferni_0-1646813112582.png

 

If so, please see below flow that I made for the test:

vjefferni_1-1646813737233.png

split(replace(outputs('Html_to_text')?['body'],variables('enter'),''),'+++')

vjefferni_2-1646813766422.png

 

Test result as follows:

vjefferni_3-1646813812162.png

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
v-jefferni
Community Support
Community Support

Hi @Tobias_S ,

 

Do you mean you have emails sent in with below structure?

vjefferni_0-1646813112582.png

 

If so, please see below flow that I made for the test:

vjefferni_1-1646813737233.png

split(replace(outputs('Html_to_text')?['body'],variables('enter'),''),'+++')

vjefferni_2-1646813766422.png

 

Test result as follows:

vjefferni_3-1646813812162.png

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Tobias_S
Advocate I
Advocate I

Thank you for your support, @v-jefferni 

 

I tried to re-build your proposed workflow but unfortunately I get stuck 😞 in the beginning I got the notice about mismatching in "String" and "Array"...so I tried also to copy your workflow one by one.

Wordpress-Automation_2.png

 

I still get an error message.

 

Wordpress-Automation_1.png

Hi @Tobias_S ,

 

The enter variable is for get the string of "New line" so you need to input the Enter on your keyboard. Leave it blank will get the error because string variable could not be null.

 

Hope this help.

 

Best regards,

Jeffer Ni

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Sometimes you cannot see a tree while standing in the forest. That's why I love coding 😄 Result: Now it's working 🙂 thank you @v-jefferni

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,577)