Skip to content

This provides a total solution of generating social media posts for online marketing purpose, using Power Platform as a front-end app and workflow, and Azure Functions as a back-end API app.

License

Notifications You must be signed in to change notification settings

devkimchi/social-media-assistant

Repository files navigation

Social Media Assistant

This provides a total solution of generating social media posts for online marketing purpose, using Power Platform as a front-end app and workflow, and Azure Functions as a back-end API app.

Architecture

Architecture

Prerequisites

Getting Started

Provisioning Azure Resources

  1. Fork this repository to your GitHub account, {{GITHUB_USERNAME}}.

  2. Run the commands below to set up a resource names:

    # PowerShell
    $AZURE_ENV_NAME="social$(Get-Random -Min 1000 -Max 9999)"
    $GITHUB_USERNAME="{{GITHUB_USERNAME}}"
    
    # Bash
    AZURE_ENV_NAME="social$RANDOM"
    GITHUB_USERNAME="{{GITHUB_USERNAME}}"
  3. Run the commands below to provision Azure resources:

    azd auth login
    azd init -e $AZURE_ENV_NAME
    azd up

    You might be asked to input your GitHub username and repository name.

Deploying Applications to Azure

  1. Run the commands below to deploy apps to Azure:

    az login
    gh auth login
    azd pipeline config
    gh workflow run "Azure Dev" --repo $GITHUB_USERNAME/social-media-assistant

Deprovisioning Azure Resources

  1. To avoid unexpected billing shock, run the commands below to deprovision Azure resources:

    azd down --force --purge --no-prompt

Local Development

Use SocialMediaAssistant.sln with Visual Studio or Visual Studio Code with the C# Dev Kit extension.

local.settings.jsonSocialMediaAssistant.ApiApp

  1. Copy local.settings.sample.json to local.settings.json.

  2. Substitute the following values in the local.settings.json with the actual values:

    "OpenAIApi__Endpoint": "https://aoai-{{AZURE_ENV_NAME}}.openai.azure.com/",
    "OpenAIApi__AuthKey": "{{AOAI_API_KEY}}",
    "OpenAIApi__DeploymentId": "{{DEPLOYMENT_ID}}",
    • {{AZURE_ENV_NAME}}: Azure environment name. It looks like social**** where **** is a random number.
    • {{AOAI_API_KEY}}: API Key of Azure OpenAI Service.
    • {{DEPLOYMENT_ID}}: Azure OpenAI Service deployment ID. It looks like model-gpt35turbo16k.

Importing Power Automate Solution

  1. Open Power Automate.
  2. Import solution from SocialMediaPostingAssistant.zip.
  3. Update connection reference links in the SocialMediaPostingAssistant flow.

About

This provides a total solution of generating social media posts for online marketing purpose, using Power Platform as a front-end app and workflow, and Azure Functions as a back-end API app.

Resources

License

Stars

Watchers

Forks

Packages

No packages published