# Source: https://docs.anchorbrowser.io/integrations/open-source/playwright/government/USA/federal/ccc-941.md

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CCC Form 941

> Automate USDA farm program income certification workflows with Playwright when APIs aren't available.

# How to Automate CCC Form 941 with Playwright

Automate USDA average adjusted gross income (AGI) certification workflows with Playwright when APIs aren't available or sufficient. You'll eliminate manual farm program eligibility documentation and reduce compliance errors by automating repetitive income certification processes. Use Playwright to interact with USDA's farmers.gov system programmatically.

[View USDA's developer resources](https://www.farmers.gov/#tools) for available APIs when applicable.

## Setup

Install Playwright and configure authentication:

```bash  theme={null}
npm install playwright
```

## Automate Workflows

Create scripts for common [CCC Form 941](https://www.farmers.gov/sites/default/files/documents/form-ccc-941.pdf) tasks:

```JavaScript  theme={null}
import { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage();

// Navigate to farmers.gov system
await page.goto('https://www.farmers.gov/working-with-us/common-forms');

// Start new CCC-941 certification
await page.click('[data-testid="new-form-941"]');
await page.selectOption('[name="certification_year"]', '2024');

// Producer information
await page.fill('[name="producer_name"]', 'Johnson Family Farms LLC');
await page.fill('[name="tax_id"]', '12-3456789');
await page.fill('[name="farm_number"]', 'IA-045-678');
await page.fill('[name="tract_number"]', '1234');

// Contact information
await page.fill('[name="address"]', '789 County Road 45');
await page.fill('[name="city"]', 'Des Moines');
await page.selectOption('[name="state"]', 'IA');
await page.fill('[name="zip"]', '50310');
await page.fill('[name="phone"]', '515-555-0123');
await page.fill('[name="email"]', 'operations@johnsonfarms.com');

// AGI certification - three-year average
await page.fill('[name="agi_year_1"]', '2021');
await page.fill('[name="agi_amount_1"]', '675000');
await page.fill('[name="agi_year_2"]', '2022');
await page.fill('[name="agi_amount_2"]', '720000');
await page.fill('[name="agi_year_3"]', '2023');
await page.fill('[name="agi_amount_3"]', '695000');

// Certification statement
await page.check('[name="certify_below_900k"]');
await page.fill('[name="average_agi"]', '696667');

// Farm income breakdown
await page.fill('[name="farm_income_percentage"]', '85');
await page.fill('[name="non_farm_income_percentage"]', '15');

// Program eligibility
await page.check('[name="arc_plc_eligible"]');
await page.check('[name="conservation_eligible"]');
await page.check('[name="disaster_eligible"]');

// Spouse information (if applicable)
await page.check('[name="spouse_separate_filing"]');
await page.fill('[name="spouse_name"]', 'Mary Johnson');
await page.fill('[name="spouse_tax_id"]', '98-7654321');

// Signature and certification
await page.check('[name="certify_accuracy"]');
await page.fill('[name="signature_name"]', 'Robert Johnson');
await page.fill('[name="signature_title"]', 'Managing Partner');
await page.fill('[name="signature_date"]', '12/15/2024');
await page.click('[data-testid="submit-certification"]');

// Download confirmation
await page.click('[data-testid="download-confirmation"]');

await browser.close();
```

Playwright handles AGI calculations, eligibility verification, and USDA submission processes automatically. You can automate annual certifications, multi-entity filings, and program payment tracking workflows.

## Scale your CCC Form 941 automation with Anchor Browser

Run your Playwright USDA automations on cloud browsers with enterprise-grade reliability and persistent farm program sessions. Learn more and get started for free: [https://anchorbrowser.io](https://anchorbrowser.io)