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 / Flow - For a selected ...
Power Automate
Unanswered

Flow - For a selected Document, Create Wordpress Post - Help

(0) ShareShare
ReportReport
Posted on by 232

Hi All,

 

I'm hoping someone out there may have a solution for what I am attempting vis-a-vis turning a Sharepoint document library .docx file into a Wordpress post, or at least let me know if such a thing could be possible.

 

I've run into one major issue, and one strange behaviour regarding Flow.

 

Below is the Flow I've created and the resultant Wordpress post it generates.

 

The flow I've set up:

 

Sharepoint Post Story to Wordpress Test_001.JPG

 

 

The resultant Post created in Wordpress:

 

Wordpress Story.JPG

 

As you can see, the text which is imported into Wordpress is encrypted and/or otherwise not readable by Wordpress. 

 

I suspect I may first need to convert the docx file content into html, but I'm unsure how I would go about this, or even if such a thing is possible in Flow.

 

The other, lesser issue is the fact that Flow automatically adds an 'Apply to Each' control when I select the dynamic content for the 'Tags' field in the 'Wordpress - Create Post' action. This has the effect of generating an identical Wordpress post for each keyword tag applied to the document in Sharepoint - which seems like very bizarre behaviour, even if I could get the content to display correctly.

 

Am I barking up the wrong tree here? Is the Wordpress - Create Post action not intended to generate a post from Sharepoint content?

 

Or is it simply a case that, given the Wordpress Connector is in a 'preview' state, it's not working correctly yet?

 

Any info would be greatly appreciated.

 

Thanks very much.

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    on at

    Hi @cfebvre,

     

    Thanks for feedback.

    The issue could be reproduced by me. I will help report it and back to you later.

    About the issue on Apply to each, I am afraid that it is a default behavior. An apply to each will be added for each item when selecting value from multiple items.

     

    Best regards,

    Mabel

  • cfebvre Profile Picture
    232 on at

    Hi Mabel,

     

    Thanks for the response, I'll wait to hear back from you.

     

    Re: the 'Apply to Each' issue, I suspect I must have to assign different dynamic content to add muliple tags to Wordpress based on the tags assigned for the managed metadata field in Sharepoint. I'll try and work it out.

     

    Kind Regards,

     

    Chris

  • Verified answer
    v-yamao-msft Profile Picture
    on at

    Hi @cfebvre,

     

    I have some updates for you.

    It is expected. When you get a file from SharePoint, you are getting a binary of the file. Decoding the file requires specific decoding logic depending on the file type.

    For example, word files can be decoded primarily by Microsoft Word.

    The SharePoint connector cannot really under different file types and its content.

    Hope this makes sense.

     

    Best regards,

    Mabel

     

  • cfebvre Profile Picture
    232 on at

    Thanks Mabel,

    Yes, that does make sense.

    Thanks for the clarification.

    Through further tesing I've been able to see that a raw text file (.txt) can indeed be sent to Wordpress and interpreted correctly via the flow I've set up (complete with body content, heading, and tags). This is one potential avenue that users could pursue if they are looking to use Sharepoint as their primary content management system (with Wordpress acting as a secondary portal).

    The downside of converting documents to text is that you lose much of the editing capabilities that Sharepoint allows when working with Word documents.

    I'm currently investigating a method by which Flow could convert a Word document into a text file (or maybe html), and then send that text file to Wordpress - allowing users to type and edit their articles in Word within the Sharepoint environment, but when it comes time to ship that content to Wordpress, Wordpress will be able to interpret it.

    To that end, I notice the Word connector in Flow is lacking in features, and I'll be requesting that the Word connector contains triggers and actions such as "When a Word document is modfied, save file as... .txt .rtf etc. 

    Such an automated action is already acheivable using macros in Word itself, so I could see it might be possible in Flow.

     

    Cheers. 

  • gmcleod Profile Picture
    3 on at

    Have you been able to figure out a solution for this? I'm attempting to do something similar. 

    In my scenario, blogs are submitted from around our enterprise and my team is reviewing and publishing. We use forms to collect the content (DOCX stored in SharePoint), body images (attached JPG, PNG stored in SharePoint), feature image (shutterstock links) and meta data (form fields). Power Automate then converts that into a MSFT Planner Task card with all of this info and from there I can assign a publisher.

    I'd like to take this a step further and have the post drafted in WordPress from the submitted files and metadata. Is this possible?

    gmcleod_0-1669736698442.png

     

  • cfebvre Profile Picture
    232 on at

    Hi @gmcleod , wow this is a blast from the past! Suffice to say I have a much better idea with regard to what I'm doing in Power Automate, but I'm not sure how useful I can be in your scenario. Long story short, I wound up creating an entire publishing CMS in PowerApps, and attached it both to our local servers and our website CMS (which is no longer Wordpress - we changed platforms).

    I no longer use docx files - this was creating needless complication for our purposes - and instead use a series of text fields in a Sharepoint list that is compiled into a form in my powerapp. On different button actions in the app, the stories are either distributed as a script file for Indesign, or as a post in our website.

     

    But if I were using Wordpress, I don't think I would use the standard power automate connector for it anymore (as I recall it was fairly limited, and had not way to upload images), and instead use the HTTP action in power automate to send a HTTP request to a wordpress blog.

    This link should start you down the rabbit hole:

    https://collab365.com/how-to-integrate-wordpress-microsoft-365/

     

    Images will be the toughest cookie to crack. You'll need to first create a HTTP request to upload the image, then use the response url from that call as the 'featured media' url in your post request.

    https://stackoverflow.com/questions/37432114/wp-rest-api-upload-image

     

    I'm sorry I can't give you all the answers, but hopefully this gives you some other ideas to start spring boarding from.

     

     

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard