Featured image of post Social media content creator with AI Promts

Social media content creator with AI Promts

How to use an AI Promt to create content for your social media accounts with AI. To post them I will use the Flows from a previous blog post.

Prerequisites

For this tutorial you need the following:

Create AI Prompt in Power Platform

  1. Go to Power Automate

  2. Click on AI hub in the left navigation Power Automate Navigation

  3. Choose AI Prompts AI capabilities overview

  4. Click on Create text using custom prompt Overview Models

  5. Choose Custom task with custom prompts and click on Create custom prompt Custom Promts

  6. Enter a name for your AI Prompt

  7. Enter your prompt (here is what I used for my prompt)

    As an expert in social media, create me witty posts for my social networks (Bluesky and Mastodon) with meaningful hashtags (Microsoft centric) about my newest Blog post that you can find here: [Dynamic Value BlogURL] . Also please take the lowest character count into consideration for the two networks. Also create another post for LinkedIn that can be a bit longer. Please create the posts in a way that will make my followers want to know more about the blog post e.g. with examples or some insides. Please also don’t add any BlogURL. Please just response the post without any explanations. but in the following format: { “ShortPost” : Post text for BlueSky and Mastodon, “LinkedInHeading” : Headline for LinkedIn Post, “LinkedInPost” : Post text for LinkedIn }

Create the Flow in Power Automate

Flow Overview This is the Flow I created for writing post on social media. I will explain the steps in the following sections.

  1. “Manually trigger a flow” (this is the trigger) Of course you could also use another trigger like schedule post from a calendar .
  2. “Get Item” from SharePoint Online. This step gets the URL of the newest blog post from my SharePoint Blog list. Get Item - Settings page
  3. “AIBuilder Predict Custom Prompt” from Common Data Service for Apps. This step uses the AI Prompt we created in the previous section to create the post text for the social media networks. AIBuilder Predict Custom Prompt - Settings page
  4. “Start and Wait for a Text Suggestion Approval” from Approvals. This step waits for the approval of the post text. I use this step to check the post text before it is posted on social media. If you don’t want to check the post text before it is posted on social media you can skip this step and go directly to the next step. Start and Wait for a Text Suggestion Approval - Settings page
  5. “Parse JSON”. This step parses the JSON from the previous step and creates the variables for the post text. Copy the JSON from the AI Builder step and paste it into the “Schema” field. Parse JSON - Settings page
  6. “Condition”. This step checks if we approved the AI generated post text or not. If we approved the post text it will go to the next step. If we didn’t approve the post text it will go to the “Condition - No” step which will lead to the end of the Flow. Condition - Settings page
  7. “Apply to each”. This step will create a post for each social media network that we put in the Column in the SharPoint list. With the “switch” step we are running the “Run a Child Flow” step to create the post for each needed social media network. Schema of looping throught differnet social post posts As you can see this is a very simple Flow. But it will save you a lot of time and you can be sure that your post text is correct. Now let’s see how you will use this Flow to create your social media posts. Please leave a comment if you have any questions or suggestions. Also please share your use cases for this Flow.

Comments

You can use your Mastodon account to reply to this post. Learn how this is implemented here.

Reply to ollimenzel's post

With an account on the Fediverse or Mastodon, you can respond to this post. Since Mastodon is decentralized, you can use your existing account hosted by another Mastodon server or compatible platform if you don't have an account on this one.

Copy and paste this URL into the search field of your favourite Fediverse app or the web interface of your Mastodon server.