n8n Integration
Automate video generation with n8n workflows. Create videos from spreadsheets, RSS feeds, form submissions, and more.
Ready-to-Use Workflows
Click "Open in n8n" to import these workflows directly, or copy the JSON to paste into n8n.
Basic Video Generator
Webhook trigger → Create video → Return response. Simple starting point for video automation.
Polling Workflow
Create video and poll for completion. Useful when you can't receive webhooks.
Webhook Handler
Receive and verify StrataKit webhook callbacks. Branch based on event type.
Setup
1. Create Credentials
- In n8n, go to Settings → Credentials
- Click "Add Credential"
- Select "Header Auth"
- Configure:
- Name: StrataKit API
- Header Name: Authorization
- Header Value: Bearer YOUR_API_KEY
Basic Workflow: Create Video
HTTP Request Node Configuration
1 { 2 "canvas": { 3 "preset": "youtube_short", 4 "segments": [ 5 { "type": "video", "url": "{{ $json.video_url }}", "duration": 10 } 6 ] 7 }, 8 "webhookUrl": "{{ $env.N8N_WEBHOOK_URL }}" 9 }
HTTP Request Node Settings
- Method: POST
- URL: https://stratakit.io/api/v1/productions
- Authentication: Predefined Credential Type → Header Auth → StrataKit API
- Headers: Content-Type: application/json
Sample Video URLs (Creative Commons)
Use these stable Creative Commons videos for testing:
- Vertical (9:16): https://assets.stratakit.io/samples/video/8366020-hd_1080_1920_25fps.mp4
- Landscape (16:9): https://assets.stratakit.io/samples/video/12221134_3840_2160_24fps.mp4
- Square (1:1): https://assets.stratakit.io/samples/video/15421302-uhd_1394_1858_30fps.mp4
Option A: Poll for Completion
Use a loop to check status:
// Set node - Initialize counter
counter = 0
production_id = {{ $json.id }}
// Loop node - While status != completed AND counter < 60
// Inside loop:
// Wait node - 5 secondsOption B: Use Webhook (Recommended)
Create a separate workflow triggered by webhook:
1 // Webhook Trigger node 2 // Method: POST 3 // Path: /stratakit-callback 4 5 // Code node - Validate request 6 const productionId = $input.first().headers['x-stratakit-production-id']; 7 if (!productionId) { 8 throw new Error('Missing production ID header');
Example: Batch Process from Google Sheets
Workflow:
1. Google Sheets Trigger (on new row)
2. HTTP Request → StrataKit API
- Use column values: {{ $json.video_url }}, {{ $json.title }}
3. Update Google Sheet with production ID
4. Webhook receives completion
5. Update Google Sheet with output URLExample: RSS Feed to Video
Workflow:
1. RSS Feed Trigger
2. Filter (only new items)
3. For each item:
- Download media
- Upload to your storage
- Create StrataKit production
4. Store results in database
5. Post to social media when completeComplete Video Production Request
Video with background music using the simple segments format:
1 { 2 "canvas": { 3 "preset": "instagram_reel", 4 "segments": [ 5 { 6 "type": "video", 7 "url": "https://assets.stratakit.io/samples/video/8366020-hd_1080_1920_25fps.mp4", 8 "duration": 15
Multi-Layer Production
Text overlays are automatically rendered on top of video content in the segments format. Video/image/color segments play sequentially, while text segments overlay at the specified start time:
1 { 2 "canvas": { 3 "preset": "youtube_short", 4 "segments": [ 5 { "type": "color", "color": "#000000", "duration": 2 }, 6 { 7 "type": "video", 8 "url": "https://assets.stratakit.io/samples/video/8366020-hd_1080_1920_25fps.mp4",
Error Handling
// After HTTP Request node, add IF node:
// Condition: {{ $json.error?.code }} is not empty
// True branch:
// - Log error
// - Send notification (Slack/email)
// - Retry logic if needed
Rate Limiting
If processing many items, add Wait nodes between API calls to stay within rate limits:
| Plan | Rate Limit | Suggested Delay |
|---|---|---|
| Starter | 120 requests/minute | 500ms |
| Creator | 120 requests/minute | 500ms |
| Pro | 300 requests/minute | 200ms |
| Scale | 1000 requests/minute | 60ms |
Next Steps
- Webhook Documentation - Learn more about signature verification
- API Reference - Complete API documentation
- Browse Templates - Pre-built video templates to use in your workflows