Skip to main content

Prerequisites

Workflow Overview

This n8n workflow consists of three main HTTP requests:
1

Submit Request

Send a POST request to initiate content generation
2

Check Status

Poll the status of your request using GET
3

Retrieve Result

Fetch the final generated content

Step 1: Create Your Workflow

1

In n8n, create a new workflow
2

Start with a Manual Trigger node to initiate the workflow manually

Step 2: Submit Request (POST)

Add HTTP Request Node

1

Add an HTTP Request node after your trigger
2

Set the Method to POST

Configure the URL

1

Navigate to fal.ai and select your desired model (e.g., fal-ai/veo3/fast)
2

Click on the API tab, select “HTTP (cURL)” and “Submit a request”. Copy and save the URL and data JSON as those will be needed for later.
3

Copy the URL (e.g., https://queue.fal.run/fal-ai/veo3/fast) and paste it into the URL field in n8n

Set Up Authentication

1

Navigate to fal.ai API Keys, create a new key and copy its value.
2

Back in n8n, in the Authentication section, select Generic Credential Type
3

Choose Header Auth from the dropdown
4

Click + Create new credential
5

Set:
  • Name: Authorization
  • Value: Key YOUR_FAL_KEY
6

Save the credential and close

Configure Request Body

1

Toggle Send Body to ON
2

Set Body Content Type to JSON
3

Choose Specify Body as USING JSON
4

In fal, go again to the model page, select JSON from dropdown and copy the payload
5

Copy the JSON payload and paste it into n8n’s JSON text box

Execute the Node

1

Click Execute Node to test the request. You should receive a response with a request ID.

Step 3: Check Status (GET)

Add Second HTTP Request Node

1

Click on the first HTTP Request node and add another HTTP Request node
2

Set the Method to GET

Configure Status Check URL

1

In fal, go to your model’s API section and find the GET URL for status checking
2

Copy this URL and paste it into the URL field
3

You’ll need to replace the request ID from the previous step on this URL, with {{ $json.request_id }}

Set Authentication

1

Use the same Header Auth credential created earlier
2

Select your existing Authorization credential

Execute the Node

  1. This will check the status of your generation request.

Step 4: Retrieve Result (GET)

Add Third HTTP Request Node

  1. Add a final HTTP Request node
  2. Set the Method to GET

Configure Result URL

  1. Use the result URL provided in the status response by setting the URL to {{ $json.request_url }}

Set Authentication

  1. Use the same Header Auth credential

Execute the Node

This will retrieve your final generated content.

Testing Your Workflow

1

Save your workflow
2

Click Execute Workflow to run the complete process
3

Monitor each node to ensure successful execution
4

Check the final node output for your generated content

Best Practices

  • Error Handling: Add error handling nodes to manage failed requests
  • Delays: Consider adding Wait nodes between status checks to avoid overwhelming the API
  • Conditional Logic: Use IF nodes to check status before proceeding to result retrieval
  • Data Transformation: Use Set nodes to extract and format specific data from responses

Troubleshooting

  • 401 Unauthorized: Check that your API key is correctly set in the authentication header
  • Request ID Missing: Ensure the first POST request completed successfully and returned a request ID
  • Status Still Processing: Add appropriate delays between status checks
  • Invalid JSON: Verify your JSON payload matches the model’s expected format

Next Steps

Once you have a working workflow, you can:
  • Connect it to external triggers (webhooks, schedules, etc.)
  • Integrate with other services in your n8n workflow
  • Add data processing and transformation steps
  • Set up notifications for completed generations
I