Automate Face Swapping for GIFs with Fal.run AI and Google Services
Categories
Created by
Last edited 38 days ago
This workflow allows you to automatically swap faces in animated GIFs using AI, without writing a single line of code.
By simply inserting the URL of a face image and a GIF into a Google Sheet, the automation takes care of everything: it sends the data to AI platform, monitors the processing status, retrieves the final face-swapped GIF, uploads it to Google Drive, and updates the Google Sheet with the result.
This solution is perfect for content creators, marketers, or developers looking to integrate AI-powered GIF editing into their workflows in a fast and scalable way.
Whether used manually or on a scheduled basis, the workflow turns a tedious creative task into a fully automated pipeline.
This workflow automates GIF face-swapping by integrating Google Sheets for input/output and Fal.run for AI processing, ensuring seamless execution via scheduled or manual triggers.
Example
Face image:
Gif Image:
Result:
How It Works
-
Trigger:
- The workflow can be triggered manually ("When clicking ‘Test workflow’") or automatically via a scheduled trigger ("Schedule Trigger") set to run at intervals (e.g., every 5 minutes).
-
Data Retrieval:
- The "Google Sheets" node fetches data from a predefined Google Sheet, which includes two columns:
FACE IMAGE
: URL of the face image to swap.GIF IMAGE
: URL of the target GIF.
- The "Google Sheets" node fetches data from a predefined Google Sheet, which includes two columns:
-
API Request:
- The "Set data" node formats the retrieved URLs into variables (
face_image
andgif_image
). - The "Create Image" node sends a POST request to the Fal.run API (
easel-gifswap
endpoint) with these URLs to initiate the face-swapping process. The API returns arequest_id
.
- The "Set data" node formats the retrieved URLs into variables (
-
Status Check:
- The "Wait 60 sec." node pauses execution for 60 seconds to allow processing time.
- The "Get status" node queries the Fal.run API using the
request_id
to check if the task isCOMPLETED
. - If completed, the "Get Url image" node retrieves the final GIF URL.
-
Output Handling:
- The "Upload Image" node saves the resulting GIF to Google Drive.
- The "Update result" node writes the output GIF URL back to the Google Sheet under the
RESULT
column.
Set Up Steps
-
Prepare Google Sheet:
- Create a Google Sheet with columns:
FACE IMAGE
,GIF IMAGE
, andRESULT
. - Populate the first two columns with image URLs. Leave
RESULT
empty for the workflow to fill.
- Create a Google Sheet with columns:
-
Configure API Key:
- Sign up to obtain an API key.
- In the "Create Image" node, set HTTP header authentication:
- Name:
Authorization
- Value:
Key YOURAPIKEY
- Name:
-
Schedule Execution:
- Link the "Schedule Trigger" node to run periodically (e.g., every 5 minutes) or trigger manually for testing.
-
Test and Deploy:
- Run the workflow to verify face-swapping functionality.
- Monitor the Google Sheet for the
RESULT
column updates with the processed GIF URL.
Need help customizing?
Contact me for consulting and support or add me on Linkedin.
You may also like
New to n8n?
Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!