This AI System Posts VIRAL Shorts on Autopilot (No-Code n8n tutorial)

AI WorkshopAbout 5 min readJun 23, 2025Watch original
THE SUMMARYAI-generated

Key Concepts

Countries as Soldiers, AI-generated videos, Flux image generator, Runway ML video animation, Prompt engineering, Hugging Face Inference API, B64 string conversion, HTTP Request, Google Sheets integration, Workflow automation.

1. Introduction: Viral "Countries as Soldiers" Videos

  • The video demonstrates how to create AI-generated "Countries as Soldiers" videos, which are popular on YouTube, Instagram, and TikTok.
  • These videos feature animated depictions of countries as warriors and often garner millions of views.
  • The process involves using AI to generate images and then animate them.

2. Workflow Overview and Import

  • The tutorial uses a pre-built workflow that can be imported into a workflow automation platform.
  • The workflow, including prompts, documentation, and resources, is available for download.
  • The imported workflow automates the process of generating these videos.

3. Step-by-Step Workflow Breakdown

3.1. Form Trigger

  • The workflow starts with a form trigger that accepts a country name as input.
  • A simple form is created with a single text field for the country name.
  • Example: Inputting "United States" into the form.

3.2. Prompt Generation with OpenAI

  • The country name is then used to generate a prompt for the Flux image generator using an OpenAI model.
  • The 03 mini model is specified as providing the best results.
  • A detailed prompt is used to instruct the AI on the desired image style, including a "third-person cinematic prompt" focusing on a "front-facing slow-motion walk" of the warrior.
  • Example prompt: "Striding with purposeful slow motion intense through a fogladen medieval landscape a massive eagle-head warrior with rippling muscles blah blah blah."
  • The prompt is designed to create a consistent style across different countries.

3.3. Image Creation with Flux via Hugging Face API

  • The generated prompt is sent to the Flux image generator via the Hugging Face Inference API.
  • An HTTP request node is used to send a POST request to the Flux API endpoint.
  • Authentication is handled using a custom Oauth credential with a Hugging Face token.
  • The image is generated based on the prompt.
  • The URL used is generate image with flux.1.

3.4. B64 String Conversion

  • The generated image, initially in binary format, is converted to a B64 string.
  • This conversion allows the image to be sent to the Runway ML API as text data.
  • The "Move file to B 64 strings" function is used for this conversion.

3.5. Video Generation with Runway ML

  • The B64 string and the prompt are sent to the Runway ML API to generate the animated video.
  • An HTTP request node is used to send a POST request to the Runway ML API endpoint.
  • Authentication is handled using a custom Oauth credential with a Runway ML API key.
  • The body of the request includes the prompt and the B64 encoded image.
  • The URL used is generate video with runway.
  • A "wait" node is added to pause the workflow for 40 seconds to allow the video to be generated.

3.6. Retrieving the Video from Runway ML

  • After the wait period, another HTTP request node is used to retrieve the generated video from Runway ML.
  • This request uses a GET method and includes the job ID returned from the previous step.
  • Headers are used for authentication, including the Runway ML API key and version.
  • The video URL is extracted from the response.

3.7. Google Sheets Integration

  • The country name and the video URL are added to a Google Sheet.
  • The "Append Row" action is used to add the data to the sheet.
  • The columns are mapped to the corresponding data from the workflow.

3.8. Email Notification (Optional)

  • An optional step is added to send an email with the video link.
  • This allows the user to easily access the generated video.

4. Example Outputs and Customization

  • Examples of videos generated for different countries, including the United States, Egypt, Morocco, and Norway, are shown.
  • The videos feature different animal heads and backgrounds based on the country.
  • The tutorial encourages users to experiment with different prompts and models to achieve different results.

5. Key Arguments and Perspectives

  • The video emphasizes the importance of prompt engineering in generating high-quality AI content.
  • It highlights the benefits of using a B64 string for image data transfer.
  • It suggests that while automation is powerful, manual steps may be more efficient for certain tasks, such as video editing.
  • "Just because you can automate something doesn't mean you should because the whole point of automation is to make your work efficient not create more problems or create more work."

6. Technical Terms and Concepts

  • Flux: A popular image generation model.
  • Runway ML: A platform for AI-powered video creation and editing.
  • Hugging Face Inference API: A service for deploying and using machine learning models.
  • B64 String: A text representation of binary data, such as an image.
  • HTTP Request: A method for sending data to and receiving data from a web server.
  • API Key: A code used to authenticate requests to an API.
  • Prompt Engineering: The process of designing effective prompts for AI models.

7. Logical Connections

  • The workflow is structured in a logical sequence, starting with user input and progressing through prompt generation, image creation, video animation, and data storage.
  • Each step builds upon the previous one, with data being passed from one node to the next.
  • The use of a wait node ensures that the video generation process is completed before the video URL is retrieved.

8. Data and Statistics

  • The video mentions that the "Countries as Soldiers" videos often receive 5 to 10 million views.
  • It also states that some channels have gained hundreds of thousands of subscribers by posting these videos.
  • The cost of generating a 5-second video with Runway ML is approximately 25 cents.

9. Conclusion

  • The tutorial provides a comprehensive guide to creating AI-generated "Countries as Soldiers" videos using a combination of AI models and workflow automation.
  • The process involves generating prompts, creating images, animating videos, and integrating with external services like Google Sheets.
  • The video encourages users to experiment with different prompts and models to achieve their desired results.
  • The final step of combining the videos is recommended to be done manually using a video editor for efficiency.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.