Use ChatGPT to Auto-Create Social Media Content with Zapier

16 March 2023 | 10 min read
Laura van Sinderen

Learn how to use OpenAI's ChatGPT to automatically generate video and image posts for Instagram, Facebook, and Twitter using Zapier and Creatomate.

ChatGPT is an AI model developed by OpenAI. Even though its name suggests it's mainly for conversations, ChatGPT can also be used for many non-chat purposes as well. To generate social media videos automatically, for example. In this tutorial, we'll find out how this can be accomplished using only no-code tools.

As ChatGPT is a language model using GPT-3 or GPT-4, it operates solely on text. This is where Creatomate comes in. Creatomate is a video generation platform for editing and creating video using automation. Combining these tools together, we can set up completely automated workflows for creating video. And by using Zapier, we can customize the automated workflow even further, for example, by auto-posting the video to social media as well.

To illustrate, we will be generating videos based on a single input prompt: "5 facts on animals that live in the mountains". We'll use ChatGPT to generate the text captions, which will then be used to create a unique video, ready to be posted on social media. Completely automated!

This video is automatically generated by ChatGPT.
Even the highlighted words and emojis are automatically chosen by the AI. 🦾🤖

Looking for a solution using code? Here's an article that does the same thing, but with code.


These are the tools we'll use:

  • Creatomate: to create a template and generate videos. Sign up for free.
  • Zapier: to set up the automated workflow.
  • A trigger app, like Google Forms: to provide a topic for the video.
  • ChatGPT: to generate the videos' content based on the topic.
  • Any social media account: to share it with your audience.

Note: This tutorial uses Google Forms, but you can use any of Zapier's 5,000+ apps.

How to create social media content using ChatGPT and Zapier?

The first thing we'll do is make a video template in Creatomate. This is the foundation of our social media videos. Next, we'll set up a Zap. This will trigger for new Google Form responses that include a topic. This topic then prompts ChatGPT to write the content for our videos. The text response will then be converted to the right format so Creatomate can use it to generate videos. Finally, we can share the videos on social media. Here's what our Zap will look like:

Note that Zapier only supports automatic video posting to Twitter, Facebook, and YouTube, not Instagram and LinkedIn. However, you can still auto-post images on all these social media sites. Refer to the tutorials about to learn how to automatically post video on Instagram and LinkedIn as well.

Now let's get started!

1. Create a template in Creatomate

Log in to your account, go to the Templates page and click + New. For this tutorial, choose the 5 Facts Story template from the social media category. Let's go with the 9:16 Vertical size and click Create Template to open it in the editor:

Double-click to watch full screen.

In the left-hand panel, we can find the elements that make up our template. An important thing to know about templates is that elements can be marked as dynamic, as indicated by the pen icon. In our template, the Intro-Text and Fact elements are all dynamic. This means we can replace its content with other text values through the Zap we're about to create.

You can customize the template however you like, for example, by uploading your own logo and putting in a custom outro. If you want to make an element dynamic or non-dynamic, simply select it and (un)check the Dynamic property from the right side panel, as shown in the image above.

To keep things simple, I'll use the template as-is. Now that we've got a template, let's create a Zap.

2. Add trigger: New Form Response in Google Forms

As a trigger for this tutorial, I'm going to use a new Google Form response. So, I've created a simple form to submit a topic. This topic, "5 facts on animals that live in the mountains", will then be used to replace the videos' Intro-Text and as a prompt for ChatGPT to generate facts for our videos:

Log in to your Zapier account and click + Create Zap from your dashboard. Search for the Google Forms app and select the New Form Response event. Continue by selecting your account or signing in first.

On the Trigger page, I've select my Use ChatGPT to Auto-Create Social Media Content with Zapier form in the Form field. Then, click Continue:

Click Test trigger on the Test page to make sure Zapier can find the response with the topic. When the test is successful, click Continue.

3. Add action: Conversation in ChatGPT

Search for the ChatGPT app and select the Conversation event. Continue by selecting your account or signing in first.

On the Action page, we can create a prompt for ChatGPT to generate content for our videos. For that, we use the topic from our trigger. Here, we must provide clear instructions to ChatGPT about what it should generate. This can be done using the User Message field. In this field, refer to the Google Forms -> Topic value and copy-paste the following ChatGPT prompt:

Make a numbered list of 5 short sentences. Surround the most important words with [color #f1c40f] and [/color]. Emojis should be included in each sentence.

See the screenshot below to see what this should look like. When done, click Continue:

Click Test step on the Test page to see what ChatGPT replies. When the test was successful, move on to the next step:

4. Add action: Run Javascript in Code by Zapier

In this step, we'll convert the output of ChatGPT into a format that can be used by Creatomate. To do that, we'll use a snippet of JavaScript. This may seem technical, but it's just a matter of copying and pasting a few lines of code.

Click +, search for the Code by Zapier app and select the Run Javascript event. Then, click Continue.

On the Action page, type response in the Input Data field and select the ChatGPT -> Assistant Response Message value. Then, in the Code field, copy and paste the following:

1const result = {};
3for (const textLine of inputData.response.split(/\r?\n/)) {
4  const matchResult = textLine.match(/^\d+?/);
5  if (matchResult) {
6    result[`Fact-${matchResult[0]}`] = textLine;
7  }
10output = result;

When done, click Continue:

On the Test page, click Test step to receive the output shown on the screenshot below. The output of ChatGPT should be broken into multiple values: Fact-1, Fact-2, etc. When the test was successful, move on to the next step:

5. Add action: Create Single Render in Creatomate

Click +, search for the Creatomate app and select the Create Single Render event. Continue by selecting your account or signing in with your project's API key first.

On the Action page, select our 5 Facts Story template in the Template field first:

Then, the templates' dynamic elements appear under Modifications. Let's map the data from the previous steps to the template:

  • Set Intro-Text to Google Forms -> Topic
  • Set Fact-1 to Code by Zapier -> Fact 1
  • Set Fact-2 to Code by Zapier -> Fact 2
  • Set Fact-3 to Code by Zapier -> Fact 3
  • Set Fact-4 to Code by Zapier -> Fact 4
  • Set Fact-5 to Code by Zapier -> Fact 5

When done, click Continue:

On the Test page, click Test step to make sure Creatomate can generate a video. We can watch it by visiting the URL. However, the video takes some time to render, so simply reload the page when you get a Not Found message:

Once the test is successful, you can add your social media accounts.

6. Auto-Post to Social Media

You can now automatically post the videos to Twitter, YouTube, and Facebook. I'll show you how to share it on Facebook. The process for Twitter and YouTube is basically the same, but you can see how it's done in this tutorial.

Click + to add the Facebook Pages app and select the Create Page Video event. Continue by selecting your account or signing in first.

On the Action page, select your page first. To add the video, link to Creatomate -> Url in the Video field. You can add a title and/or a description by linking to data from any previous step. Then, click Continue:

On the Test page, click Test step to post the video on your Facebook Page. Finally, click Publish Zap to activate your workflow.

Wrapping up

Congratulations! You now know how to use Zapier, Creatomate, and ChatGPT to automatically generate and post social media content. This straightforward workflow will enable you to save time and energy while keeping your audience captivated. You can personalize this workflow by selecting the trigger app that is most suitable for your needs.

Start automating today

Start with a full-featured trial with 50 credits, no credit card required.
Get started for free