> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Ad From Post

> Creates Meta ads from existing Facebook Page posts or Instagram media (no media upload, no copy authoring)

Creates Meta ads from existing Facebook Page posts or Instagram media (no media upload, no copy authoring). By default it creates the full ad attached to the given adset. It can also run in creative-only mode, which returns a creative\_id without attaching it to an ad; that creative\_id can then be used with meta\_ads\_replace\_ad\_creative. Provide either post\_id (Facebook page post) or instagram\_media\_id (Instagram media), not both. The page id is combined with post\_id automatically. Supports detailed-results mode: by default the response returns only IDs, while return\_detailed\_results=true returns per-row success and failure details. Detailed results are recommended for AI agents.

|                       |                                |
| --------------------- | ------------------------------ |
| **App**               | Meta Ads                       |
| **Operation ID**      | `meta_ads_create_ad_from_post` |
| **Type**              | Action                         |
| **Connection**        | `meta_ads` (required)          |
| **Credits per run**   | 2                              |
| **Agent / MCP tool**  | Yes                            |
| **Requires approval** | Yes (write operation)          |

## Inputs

| Field                     | Type                                          | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------- | --------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`                 | DynamicAccount                                | Yes      | -       | Select the Meta Ads account, ask the user for it if not provided                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `update_type`             | string or SelectableOption                    | Yes      | -       | Choose whether to create a single ad or multiple ads at once. Available options: 'single' (Single Ad), 'bulk' (Multiple Ads)                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `page`                    | string or SelectItem                          | Yes      | -       | Select the Facebook page that owns the post (or whose linked Instagram account owns the media). Ask the user if not provided.                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `instagram_user_id`       | string or SelectItem                          | No       | -       | Optional Instagram account override. Leave empty in nearly all cases — the Instagram account linked to the selected Page is used automatically. Only set this when the user wants to advertise with a different Instagram account they have access to. Value is the numeric IG user/business account id.                                                                                                                                                                                                                                                                        |
| `adset_id`                | string or SelectItem                          | No       | -       | Select the ad set for this ad, ask the user for it if not provided                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `ad_name`                 | string                                        | No       | -       | Name of the ad                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `ad_status`               | string or SelectableOption                    | No       | -       | Select the status for the new ad. Available options: 'ACTIVE', 'PAUSED'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `post_id`                 | string                                        | No       | -       | ID of the Facebook page post to advertise. Provide just the numeric post id; Markifact combines it with the selected page id automatically. Required for Facebook posts. If you want to advertise an Instagram media instead, set instagram\_media\_id and leave this empty.                                                                                                                                                                                                                                                                                                    |
| `instagram_media_id`      | string                                        | No       | -       | Meta Marketing API source Instagram media V2 ID for the existing Instagram post to advertise. Provide this instead of post\_id only when advertising an existing Instagram post from the selected Instagram account. This must be the numeric media ID returned by Meta for that Instagram account (the value Meta accepts as source\_instagram\_media\_id), not an Instagram permalink, shortcode, reel code, media URL, scraped media PK, post caption ID, or ad/creative ID. Uses the page-linked Instagram account by default, or the override set via instagram\_user\_id. |
| `url_parameters`          | string                                        | No       | -       | Add UTM or other tracking parameters to the post's link (e.g., utm\_source=facebook\&utm\_medium=cpc)                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `creative_only`           | boolean                                       | No       | `False` | Set to true to create only the Meta ad creative without creating an ad. Useful when editing an existing ad: create a new creative pointing at a different post, then attach it using meta\_ads\_replace\_ad\_creative. When true, adset\_id is not required since you're not creating a new ad. Returns creative IDs instead of ad IDs. Default is false.                                                                                                                                                                                                                       |
| `return_detailed_results` | boolean                                       | No       | `False` | Bulk mode only. If true, returns per-row results (success\_count, failed\_count, total\_count, results\[]) and does NOT raise an error on partial failures so the workflow can continue. If false (default), returns a simple summary and raises an error if any row fails.                                                                                                                                                                                                                                                                                                     |
| `structured_data`         | array (also accepts a comma-separated string) | No       | -       | Use only when update\_type is 'bulk'. Mainly the output of a Google Sheets read operation. Each row should include: 'ad\_name', 'adset\_id' (when not creative\_only), and either 'post\_id' (Facebook post) or 'instagram\_media\_id' (Instagram media). Optional per-row fields: 'ad\_status' (ACTIVE/PAUSED, default PAUSED), 'url\_parameters'.                                                                                                                                                                                                                             |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `Dict`

Returns created ad details, a list of ad IDs and count.

**Fields**: `ad_ids`, `created_count`
