Using Importly with Zapier

Integrate Importly's media import API into your Zapier workflows to automate video and audio processing. This guide shows you how to set up Importly in Zapier using webhooks and HTTP requests.

What You Can Build

  • Automated Content Processing: Download videos from URLs posted in Slack/Discord
  • Social Media Automation: Import media from new YouTube videos to your content library
  • Media Archiving: Automatically back up videos from RSS feeds
  • Multi-Platform Workflows: Combine Importly with 5,000+ apps in Zapier

Prerequisites

  1. A Zapier account (free or paid)
  2. An Importly account with an API key
  3. Basic understanding of Zapier workflows

Setup Overview

Importly works with Zapier in two ways:

  1. Import Request - Start a media import job
  2. Webhook Handler - Receive notifications when the import completes

Method 1: Using Webhooks by Zapier (Recommended)

This is the most reliable approach as it uses webhooks to notify you when imports complete.

Step 1: Create a Catch Hook Trigger

  1. Create a new Zap in Zapier
  2. For the Trigger, search for "Webhooks by Zapier"
  3. Choose Catch Hook as the event
  4. Copy the provided webhook URL (you'll use this as your webhook URL)
  5. Click Continue

Step 2: Start Import with HTTP Request

  1. Add an Action step
  2. Search for "Webhooks by Zapier"
  3. Choose POST as the event
  4. Configure the request:

URL:

https://api.importly.io/import

Payload Type: json

Data:

json
1{
2 "url": "YOUR_VIDEO_URL",
3 "includeVideo": true,
4 "includeAudio": true,
5 "videoQuality": "1080p",
6 "audioQuality": "medium",
7 "webhookUrl": "YOUR_CATCH_HOOK_URL_FROM_STEP_1"
8}

Headers:

Authorization: Bearer YOUR_IMPORTLY_API_KEY
Content-Type: application/json
  1. Click Test to verify the request works
  2. You should receive a response with a jobId

Step 3: Handle the Webhook Response

  1. Go back to your Catch Hook trigger from Step 1
  2. Test it by running your workflow
  3. Once the import completes (this may take a few minutes), Importly will send data to your catch hook
  4. You can now add additional actions to process the completed media

The webhook payload will include:

json
1{
2 "type": "import.completed",
3 "data": {
4 "jobId": "abc-123",
5 "status": "completed",
6 "result": {
7 "mediaUrl": "https://storage.importly.io/...",
8 "duration": 180.5,
9 "fileSize": 25600000,
10 "creditsUsed": 0.768
11 }
12 }
13}

Step 4: Process the Media

Add more actions to your Zap:

  • Upload to Google Drive
  • Send to Dropbox
  • Post to Slack with the download link
  • Store URL in Airtable/Notion
  • Trigger another workflow

Method 2: Polling with Delays (Alternative)

If you prefer not to use webhooks, you can poll for job status with delays.

Step 1: Start Import

Same as Method 1, Step 2, but omit the webhookUrl field.

Step 2: Extract Job ID

  1. Add a Formatter by Zapier step
  2. Choose TextExtract Pattern
  3. Extract the jobId from the response

Step 3: Add Delay

  1. Add Delay by Zapier step
  2. Choose Delay For
  3. Set delay to 2-5 minutes (depends on typical video length)

Step 4: Check Status

  1. Add Webhooks by ZapierGET
  2. URL: https://api.importly.io/import/status?id=JOB_ID (use jobId from Step 2)
  3. Headers:
Authorization: Bearer YOUR_IMPORTLY_API_KEY

Step 5: Check Status and Continue

  1. Add a Filter step to check if status equals completed
  2. If successful, continue with your workflow
  3. If not completed yet, you can loop back with another delay (advanced)

Example Zap: YouTube to Google Drive

Here's a complete example that monitors a YouTube channel and imports new videos to Google Drive:

Trigger: RSS by Zapier → New Item in Feed

  • Feed URL: https://www.youtube.com/feeds/videos.xml?channel_id=CHANNEL_ID

Action: Webhooks by Zapier → POST

  • URL: https://api.importly.io/import
  • Send video URL from RSS feed with webhook

Trigger: Webhooks by Zapier → Catch Hook

  • Receives completion notification

Action: HTTP by Zapier → GET

  • Download media from mediaUrl

Action: Google Drive → Upload File

  • Upload the downloaded media

Common Use Cases

1. Slack → Media Archive

When someone posts a video URL in Slack:

  1. Trigger on new Slack message containing URL
  2. Extract URL using Formatter
  3. Send to Importly
  4. Upload result to S3 or Google Drive

2. Social Media Monitor

Monitor multiple platforms and archive content:

  1. RSS feed or social media trigger
  2. Send media URLs to Importly
  3. Store in Airtable with metadata
  4. Back up to cloud storage

3. Content Library Builder

Build a searchable content library:

  1. New row in Google Sheets with video URL
  2. Import via Importly
  3. Update sheet with download link
  4. Send notification when ready

Handling Metadata Requests

To get video information without downloading:

URL: https://api.importly.io/metadata?url=VIDEO_URL

Method: GET

Headers:

Authorization: Bearer YOUR_IMPORTLY_API_KEY

Optional Query Parameters:

  • webhookUrl - Get notified when metadata is ready

Error Handling

Add error handling to your Zaps:

  1. After the import request, add a Filter step
  2. Check if success field is true
  3. If false, send error notification or log to sheet

Common errors:

  • 401: Invalid API key
  • 402: Insufficient credits
  • 429: Rate limit exceeded
  • 400: Invalid URL or parameters

Best Practices

  1. Use Webhooks: They're faster and more reliable than polling
  2. Store Job IDs: Save job IDs to a spreadsheet for tracking
  3. Handle Timeouts: Large videos may take 5-10 minutes
  4. Check Credits: Monitor your credit usage in the Importly dashboard
  5. Test with Short Videos: Test your Zap with short videos first
  6. Use Filters: Add filters to prevent unnecessary API calls
  7. Rate Limiting: Space out bulk imports to avoid rate limits

Pricing Considerations

  • Zapier calls count toward your Zapier task limit
  • Importly charges based on data downloaded (MB)
  • Use metadata endpoint to check file size before importing
  • Webhook triggers don't count as tasks in Zapier

Troubleshooting

Webhook Not Firing

  • Ensure webhook URL is correct and publicly accessible
  • Check that your Zap is turned ON
  • Verify the Catch Hook is set up before starting import

Import Taking Too Long

  • Large videos (>500MB) can take 5-10+ minutes
  • Check job status manually: GET /import/status?id=JOB_ID
  • Consider increasing delay time in polling method

Invalid API Key

  • Double-check your API key from dashboard
  • Ensure no extra spaces in the Authorization header
  • Format: Bearer YOUR_API_KEY (with space after Bearer)

Rate Limit Errors

  • Zapier free tier: 5 tasks/hour limit
  • Importly rate limits: Check your plan on the billing page
  • Add delays between bulk operations

Advanced: Multi-Step Workflows

Combine multiple Importly features:

  1. GET /metadata to check video duration
  2. Filter to only import videos under certain length
  3. POST /import if conditions met
  4. Catch Hook for completion
  5. Process media based on your needs

Resources

Need Help?