How To: Oracle Content Management Automating Social Posts -(Twitter, Linkedn etc)

An old colleague of mine has recently gone to work for Zapier a process automation tool enabling quick and easy connections to over 5,000 apps and services. I also use it today with my blog to automatically post out to LinkedIn & Twitter any time I publish new content and it got me thinking... why not use it to automate OCM published content using webhooks?

Zapier | Automation that moves you forward
Workflow automation for everyone. Zapier automates your work across 5,000+ app integrations, so you can focus on what matters.
So here is a quick guide on how easy it is to automate published content to a social channel like twitter.

Step 1 - Zapier signup

Signup for an account - to create a zap that uses webhooks you'll need to subscribe - however if you just want to try it out to see how it works you can setup a free account.

Step 2 - Create a webhook zap process

Head over to the webhook integration page and select the "Connect Webhooks" button : https://zapier.com/apps/webhook/integrations

Step 3 - Configure zapier hook

Add the name of the process "Zap" you are creating - ie "OCM Social Post" and expand the "Trigger 1. Webhooks by Zapier" block.

Select the "Catch Hook" option as we want to parse and select the data from the OCM asset that is published.

Select the "Continue" button.

If you wanted you could set the child key to make it easier to access the OCM Asset returned field items but for now leave this blank and select the "Continue" button so that you can access all of the returned data that the hook captures.

The hook should be setup within a few seconds - Copy the newly generated webhook URL and launch OCM.

Step 4 - Create an OCM asset type (Optional)

You could use an existing asset type that you publish and map to it's data structure for your social post.

In OCM navigate to "Content" >> "Asset Types" and create a new asset. I've created a basic one called "Social Post". Add your fields - for this demo I've just added large text with the field name "tweet" which we will map later back on zapier.

Step 5 - Create a content channel (Optional)

This will allow us to say any asset that is published against this channel should be pushed to the Zapier webhook and processed you could use an existing channel but for best practice it is best to add a social channel so you know you are also targeting your content to be published on a social channel like twitter.

In OCM Navigate to "Content" >> "Publishing Channels" and create a new channel ie "Twitter".

Step 6 - Create or Update your repository to enable publishing

In OCM Navigate to "Content" >> "Repositories" - Now that we have a new asset type "Social Post" and a channel to target our content "Twitter" lets assign these against our Content Repository; so that editors can create new social posts and push content to their corresponding channels.

Step 7 - Create the OCM content publish webhook

In OCM Navigate to "Integrations" >> "Webhooks" and select the "Create" link. In the Modal window select "Asset Publishing Webhook" as this is the only content lifecycle we are interested in.

Enter the name of the webhook ie "Zapier Twitter Process" - make sure the webhook is enabled via the checkbox add your publishing channel any asset that has this channel will be pushed across to the Zapier webhook. Check the lifecycle Published against the Channel Asset to listen for.

Also make sure the "Payload" dropdown is marked as detailed this will then pass all the metadata as JSON payload to Zapier.

Add the "Target URL" as the Zapier URL that was generated for you in Step 3.

And select Save - now when content is published against the twitter channel it will be pushed to the Zapier webhook.

Step 8 - Create a new asset and publish

Lets check the content is being published and pushed to the Zapier webhook to do this goto "Assets" and into your repository and create a new "Social Post" asset.

Here I'm adding the test message to twitter as "Hello World"

Now publish it to your social channel ie "Twitter"

Step 9 - Test Trigger

Back in Zapier select the "Test Trigger" button - so that we can confirm data was successfully pushed from OCM to Zapier.

If no data is collected - give it a minute or two and try again.

You should now see the OCM webhook request data that was sent to Zapier. Select the "Continue" button.

Step 10 - Create the Action to parse and push the data.

Now that we are getting data from OCM lets connect it to "Twitter" if you don't see twitter in the list use the search and select "Twitter".

From the Twitter Event list select the "Create Tweet" option... and then the "Continue" button.

Choose your twitter account if you have set it up in the past or create a connection to a new twitter account where you want to post your new tweets.... and select the "Continue" button.

Select the "Message" field and select the OCM field you want as your message I selected Tweet from the request "entity.items.tweet" field I created earlier and added "hello world" message that I posted in OCM.

Step 11 - Test your social post

That's it.. Select the "Test/Retest action" button and it should post your message to twitter! If you have a subscribed account you can publish your zap so that anytime a webhook request is triggered it will initiate the process flow and post your tweet!

That's it!

It's not only useful for social channels - take a look at the 5,000 apps/ services they support out of the box! From dropping content into another Oracle DB to sending out email notifications via mailchimp the possibilities are endless.