# Make Workflow

> Connect WayinVideo API with Make to build advanced video automation scenarios for AI clipping, webinar summaries, batch processing, and multilingual outputs.

## Make Video Automation Integration

Use **Make** to build advanced WayinVideo workflows with branching logic, iterators, routers, filters, retries, and multi-step data mapping.

Make is a strong fit when your automation needs to process many videos, route successful and failed tasks differently, or run different WayinVideo APIs based on campaign, language, source, or content type.

With WayinVideo API and Make's HTTP module, you can create video automation scenarios for batch AI clipping, webinar repurposing, localized summaries, content review queues, and video-to-CMS pipelines.

> WayinVideo does not require a dedicated Make app. You can connect through Make's **HTTP** module using your WayinVideo API key.

---

## What You Can Automate with Make

- **Batch video clipping**: Watch a Google Drive folder, submit each video to the [AI Clipping API](https://wayin.ai/api-docs/ai-clipping/), and route completed clips to storage or review.
- **Webinar repurposing**: Generate summaries, highlights, and short-form clips from webinar recordings with the [Video Summarization API](https://wayin.ai/api-docs/video-summarization/) and [AI Clipping API](https://wayin.ai/api-docs/ai-clipping/).
- **Multilingual video workflows**: Use `target_lang` to create localized summaries, transcripts, and clip metadata.
- **Export workflows**: Render selected clips later with custom caption, reframe, and export settings through the [Clips Export API](https://wayin.ai/api-docs/clips-export/).

---

## How It Works

Most Make scenarios follow this pattern:

1. **Trigger**: A new file, record, webhook payload, or scheduled scenario starts the workflow.
2. **Submit**: The HTTP module sends a request to a WayinVideo API endpoint.
3. **Store**: Save the returned task `id` for later polling.
4. **Poll**: Use scheduled checks, loops, or scenario design to call the result endpoint until the task reaches `SUCCEEDED` or `FAILED`.
5. **Route**: Use routers and filters to send completed results, failures, and retry paths to different modules.

We recommend polling every **30 seconds** when checking task status.

---

## Example: Batch Process Videos from Google Drive

This workflow uses the [Upload API](https://wayin.ai/api-docs/upload/) for local files and the [AI Clipping API](https://wayin.ai/api-docs/ai-clipping/) to generate short-form video clips in batch.

Trigger:
New files in a Google Drive folder.

Steps:
1. Watch a folder for new video files
2. If needed, upload each file through the [Upload API](https://wayin.ai/api-docs/upload/)
3. Use an Iterator to submit each video to the [AI Clipping API](https://wayin.ai/api-docs/ai-clipping/)
4. Store each returned task `id`
5. Poll each task and route completed results to the next step
6. Save clips, metadata, and `export_link` values to Google Drive, Airtable, or your CMS

Best for:
Agencies, content studios, and teams that process many videos in batches.

### Submit Request

```bash
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/clips \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://www.youtube.com/watch?v=example",
    "enable_export": true,
    "resolution": "HD_720",
    "enable_caption": true,
    "enable_ai_reframe": true,
    "ratio": "RATIO_9_16"
  }'
```

---

## Example: Route Webinar Content by Outcome

This workflow uses the [Video Summarization API](https://wayin.ai/api-docs/video-summarization/) for webinar recaps and can optionally send the same recording to the [AI Clipping API](https://wayin.ai/api-docs/ai-clipping/) for short-form clips.

Trigger:
New webinar recording URL from a form, CRM, or storage folder.

Steps:
1. Submit the recording to the [Video Summarization API](https://wayin.ai/api-docs/video-summarization/)
2. Poll for the result
3. Route successful tasks to Slack, HubSpot, Notion, or Google Sheets
4. Route failed tasks to an error log and notify the workflow owner
5. Optionally submit the same video to the [AI Clipping API](https://wayin.ai/api-docs/ai-clipping/) for short-form clips

Best for:
B2B marketing teams that repurpose webinars into sales notes, summaries, and social clips.

### Result Check

```bash
curl -X GET https://wayinvideo-api.wayin.ai/api/v2/summaries/results/sum_proj_001 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2"
```

When the response contains `status: "SUCCEEDED"`, continue to downstream modules. When the response contains `status: "FAILED"`, inspect `error_message` if present and route the scenario to a retry, alert, or manual review step.

---

## Example: Generate Localized Outputs

This workflow uses `target_lang` with the [Video Summarization API](https://wayin.ai/api-docs/video-summarization/), [Video Transcription API](https://wayin.ai/api-docs/video-transcription/), or [AI Clipping API](https://wayin.ai/api-docs/ai-clipping/) to create localized outputs.

Trigger:
New video added to a campaign queue.

Steps:
1. Create a list of target languages for the campaign
2. Use an Iterator to submit the same video once per `target_lang`
3. Generate summaries, transcripts, or clip metadata for each locale
4. Route each result to the right regional workspace, sheet, or review queue

Best for:
Global content teams that need multilingual video summaries, transcripts, or clip descriptions.

### Localized Summary Request

```bash
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/summaries \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://www.youtube.com/watch?v=example",
    "source_lang": "en",
    "target_lang": "ja"
  }'
```

---

## Recommended APIs

| Workflow Goal | API |
|---------------|-----|
| Turn long videos into short clips | [AI Clipping API](https://wayin.ai/api-docs/ai-clipping/) |
| Find specific moments with a natural-language query | [Find Moments API](https://wayin.ai/api-docs/find-moments/) |
| Generate a structured video overview and timeline highlights | [Video Summarization API](https://wayin.ai/api-docs/video-summarization/) |
| Extract transcripts with timing and speaker labels | [Video Transcription API](https://wayin.ai/api-docs/video-transcription/) |
| Upload local video or audio files before processing | [Upload API](https://wayin.ai/api-docs/upload/) |
| Render or re-export selected clips | [Clips Export API](https://wayin.ai/api-docs/clips-export/) |

---

## Best Practices

- Store your API key in a Make connection or protected variable.
- Save task IDs in a data store, sheet, or database if the scenario spans multiple runs.
- Use routers for `SUCCEEDED`, `ONGOING`, and `FAILED` states.
- Keep batch sizes small enough to avoid platform timeouts and make retries easier to manage.
- For exported clips, copy `export_link` files to your own storage if your workflow needs long-term access.

---

## FAQ

### Does WayinVideo have a native Make app?

You can connect WayinVideo API to Make through the **HTTP** module. A dedicated Make app is not required.

### Can Make batch process videos with WayinVideo?

Yes. Use Make iterators to submit multiple videos to WayinVideo, store each task `id`, and poll results before routing successful tasks to the next module.

### Can Make handle failed video processing tasks?

Yes. Use routers and filters to separate `SUCCEEDED`, `ONGOING`, and `FAILED` responses. For failed tasks, inspect `error_message` if present and route the scenario to retry, alert, or manual review.

### Can Make create multilingual video summaries?

Yes. Submit the same video with different `target_lang` values to generate localized summaries, transcripts, or clip metadata for regional teams.
