Automating Native Post Content into Advocacy Stories Using Agent Builder
Automatically turn native posts ingested into Oktopost (for example, from LinkedIn or Facebook) into ready-to-share Employee Advocacy stories using the post's text, link, and media. This workflow is especially valuable for executive and leadership content: when your CEO or another executive posts natively on LinkedIn, that post lands in Oktopost as a native post event as long as their profile is connected. Instead of manually turning it into an advocacy story, this Custom Agent detects the post, pulls its message text, and drafts a story with a title, description, and three ready-made caption options for employees to reshare.
Related advocacy workflows
Choose the guide that matches your goal:
Prerequisites
- The advocacy board ID the story should be created on (from Boards in Oktopost, or
list_boards) - The campaign name or ID stories should be attributed to
- The topic to assign, required if the target board has existing topics
- Your default expiration window for stories (for example, one month) and whether stories should publish immediately or start as a draft for review
- Write access to Employee Advocacy for this agent, since it creates live content on the board
Step 1: Create the Agent
- In Oktopost, open Custom Agents and create a new agent.
- Give it a descriptive name (for example, Native Post → Advocacy Story).
Step 2: Add the Event Node
- Click + and select Event → Native Post Added.
- This fires whenever a native post is ingested from a connected social profile.
Step 3: Add a Filter Node (Recommended)
Without a filter, the flow creates a story for every native post ingested across the account. Most teams only want this for specific people, such as the CEO or a defined set of spokespeople, not all native content flowing in from LinkedIn or other networks.
- Click + on the connector between the Event node and the Oktopost Action node, and select Filter.
- Set the condition to match the Event node's author or profile field against the specific social profile(s) this flow should apply to. Map it via the variable picker. For example:
-
Field:
Profiles.0.Name— check the exact field name in the variable picker; it depends on what the Native Post Added event exposes - Condition: is one of or equals
- Value: the social profile name, for example the CEO's connected LinkedIn profile
-
Field:
- If the condition evaluates false, the flow stops there. No
get_message_by_idcall, no AI Action run, and no story is created. This also reduces AI credit usage on posts you would never turn into a story. - To scale this to a small leadership team rather than one person, use an is one of or in list condition with multiple profile IDs instead of duplicating the whole flow per person.
Step 4: Add the Oktopost Action Node (Get Message)
- Click + and select Oktopost Action →
get_message_by_id. - Map the Message ID input to the message ID field from the Event node's output via the variable picker.
- This resolves the native post's text, link, and media — the payload the AI node reads from next.
Step 5: Add the AI Action Node
This node both writes the story content and creates it on the board. Connect it after the get-message node.
Paste the Instructions
This is a generalized version of a working prompt. Replace the bracketed values with your own board, campaign, and topic before pasting it in. Adjust the tone and format rules to match your house style.
You are a social media manager. Refer to this payload for the post
details needed to create a story for the advocacy board within
Oktopost:
{{nodes.<get_message_node_id>.output.content.Message.Id}}
Create a new Story inside board ID '[INSERT_BOARD_ID]'.
** Campaign to be '[INSERT_CAMPAIGN_NAME]'.
** Publish Date = Now
** Expiry Date = [INSERT_EXPIRATION_PERIOD, e.g. 1 month]
** Tags = [INSERT_TAGS, or None]
** Topic = [INSERT_TOPIC_NAME]
Populate the Story Preview with:
** Same image or video as in the post.
** A Title up to 7 words containing keywords found in the original
post, its media asset, or its link URL.
** A Description of one sentence (~10 words) summarizing what the
post is about.
Add 3 Message Ideas. Criteria for the ideas:
** Write in a professional but casual tone, personable. No emojis.
** Each of the 3 message options must contain 2 paragraphs — these
should not be one sentence each.
** Base the text on the post content and the link URL's content
where applicable, focused on summary and keywords. Again, each
option should be more than one sentence.
** Add the URL link at the bottom of the text with a professional
but encouraging call to action.
** Include the image from the URL link if available.
When a Story is created, set its status to Draft.
## Constraints:
- Do not browse existing stories on the board.
- Do not re-fetch or verify data you already received from a
previous step.Set the Node Configuration
| Setting | Value | Why |
|---|---|---|
| Permissions | Read & write | The node calls a create-story action directly, so it needs write access to Employee Advocacy, not just read access. |
| Model | Thinking | The task combines content extraction, keyword-based title writing, and three distinct multi-paragraph message variants. This is more reliable than Fast for this many constraints. |
| Enable Web Search | Optional | Turn on only if the link in the post needs its destination page read to summarize. Leave off if the native post's captured text and link preview are already enough. |
Step 6: Test and Review
1. Trigger the flow manually or publish a test native post rather than waiting for a real executive post.
2. Open the board and confirm the story was created as a Draft, with the correct campaign, topic, and expiration.
3. Check the story preview: image or video pulled in correctly, title is seven words or fewer with real keywords (not generic), and the description is one summarizing sentence.
4. Check all three message ideas: two paragraphs each, no emojis, link and call to action at the bottom, not single-sentence options.
5. Once satisfied, decide whether Draft is your permanent status for human review before publish, or whether you want to change Publish Date = Now in the prompt to auto-publish.
Troubleshooting
Story creation fails: Most often a missing or invalid topic on a board that requires one. Confirm the board's topics and that [INSERT_TOPIC_NAME] matches one exactly.
Message ideas come back as single sentences: The two-paragraph constraint is easy for the model to under-weight. Make it more explicit or move it earlier in the prompt if this happens repeatedly.
Wrong or missing image: Confirm the get_message_by_id node is returning media for that post. Native posts without an attached image or video will have nothing for the AI node to pull in.