Automatically Create Advocacy Board Stories from Published LinkedIn Campaign Posts

Use a Custom Agent to automatically turn newly published LinkedIn posts from a specific campaign into draft Repost Stories on an Employee Advocacy board. This workflow keeps corporate content flowing to advocates without manual story creation, so employees can share timely updates as soon as posts go live.

Prerequisites

  • Access to the Custom Agent builder
  • A LinkedIn social profile connected to your Oktopost account
  • A Social Media Management campaign already created in Oktopost
  • An Employee Advocacy board configured to receive stories

Create the Trigger Event

From the main Oktopost dashboard, open Custom Agents from the left sidebar.

  1. Click + New.
  2. Name the flow (for example, "Corporate News Posts to Repost Stories").
  3. Add an Event node.
  4. Select Post Sent as the trigger event.

Filter for the Right Posts

Add a Filter node so the flow only continues for posts that match your campaign and network.

  1. Add a Filter node after the Event node.
  2. Set the condition logic to AND.
  3. Add a condition: Network Equals LinkedIn.
  4. Add a second condition: CampaignId Equals your campaign ID.
  5. Connect the Yes output to the next step.

Retrieve the Post and Message Details

  1. Add an Oktopost Action node and set the tool to get_social_post.
  2. Set postlogId to the triggering event's post log ID.
  3. Add another Oktopost Action node and set the tool to get_post.
  4. Set postId to the event's post ID.
  5. Add an Oktopost Action node and set the tool to get_message_by_id.
  6. Set messageId to the event's message ID to retrieve the post's body text and link.

Retrieve the Campaign Details

  1. Add an Oktopost Action node and set the tool to get_campaign_by_id.
  2. Set campaignId to the event's campaign ID.

Retrieve the Board and Its Topics

  1. Add an Oktopost Action node and set the tool to get_board.
  2. Set boardId to the ID of the advocacy board that will receive the story.
  3. Add an Oktopost Action node and set the tool to list_board_topics.
  4. Set boardId to the same board ID.
  5. Optionally, set q to search for a specific topic by name (for example, "Corporate news").
If the board has existing topics, you must pass at least one matching topic ID when you create the story in the next step, or the request will fail.

Create the Advocacy Board Story

  1. Add an Oktopost Action node and set the tool to create_board_story.
  2. Set boardId to the target board ID.
  3. Set campaignId to the campaign ID retrieved in the previous step.
  4. Set postlogId to the triggering post's log ID. When this is set, the title and description are derived automatically, and the link, media, and message fields are ignored.
  5. Set topicIds to the topic ID(s) found in the previous step, if the board has topics.
  6. Set isDraft to true to review the story before it goes live, or false to publish it immediately.
  7. Leave publishDatetime and expirationDatetime blank to use the defaults, or set them to schedule the story.

create_board_story Parameters

ParameterRequiredTypeNotes
boardIdYesstringBoard ID, starts with brd
titleConditionalstringRequired unless postlogId is set
descriptionConditionalstringRequired unless postlogId is set
campaignIdYesstringCampaign to associate with the story
postlogIdNostringLinkedIn post log ID for a repost story; auto-derives title and description
mediaIdsNostringComma-separated media IDs
linkNostringLink URL for the story
messageIdsNostringComma-separated pre-written message IDs
topicIdsConditionalstringRequired if the board has existing topics
tagIdsNostringComma-separated tag IDs
publishDatetimeNonumberUnix timestamp; defaults to now
expirationDatetimeNonumberUnix timestamp; defaults to the board's default expiration
isDraftNobooleanDefaults to false; set true for drafts
isFeaturedNobooleanDefaults to false

Save and Activate the Flow

  1. Click Save to save your progress.
  2. Review each node to confirm the field mappings are correct.
  3. Click Set Active to turn on the flow.

Once active, the flow runs automatically every time a matching LinkedIn post is published, creating a corresponding Repost Story on your advocacy board.

Was this article helpful?
0 out of 0 found this helpful