> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/blog/sample-flows.md

## Article Content:

# Blog: Sample Use Cases & Flows

This article presents possible use cases and corresponding sample flows that you can support. 
This can be a helpful jumping off point as you plan your implementation.

## Periodically send an email with latest posts to blog subscribers

Notify a blog's subscribers about new posts.

1. Call [Query Posts](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/query-posts.md) and filter for recent posts. 

   ::::tabs
   :::REST_TAB
   ```json
        {
          "filter": {
            "firstPublishedDate": {
              "$gt": "<PREVIOUS_EMAIL_DATETIME>"
            }
          }
        }
      ```
   :::
   :::SDK_TAB
   ```js
   const query = services.queryPosts().gt("firstPublishedDate", "<PREVIOUS_EMAIL_DATETIME>");
   ```
   :::
   ::::



2. Extract the following data from the post payload: 
    - `title`
    - `excerpt`
    - `url`

3. Create a templatized email with the extracted information and send to subscribers. 

## Send out a social media post when a new blog post is marked as featured

Market a blog by creating a post on social media with featured blog content. 
This flow relies on having permission to access the relevant social media accounts. 

1. When the [Post Created event](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-created.md) is triggered, you'll receive the post in the response.

2. Extract the `entityId` and use it to call [Get Post](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/get-post.md). Check to see whether the post has been marked as featured. 

3. If `featured` is set to true, extract desired fields from the Get Post response for the social media post. For example, you may want a social media post to include the following information: 
    - `title`
    - `url`
    - `excerpt` 
    - `minutesToRead`
    - `media`

4. Create a social media post to include the desired data, then post it to social media.  
 
<!-- ## Mirror a blog on another site

You could help blog owners mirror their blogs to another site. 
For example, a blog owner might want to take all of their content, translate and mirror it to a blog site in a different language.  -->