To launch a Phantom from n8n using an HTTP request, add an HTTP Request node to your workflow, set the method to POST, point it to the PhantomBuster /agents/launch endpoint, add your API key as an X-Phantombuster-Key header, and pass the Phantom ID and arguments as JSON in the request body. This method gives you full control over launch parameters and is ideal for advanced or customized workflows.
Before you start
- Make sure the Phantom you want to launch is already created and set up in your PhantomBuster workspace.
- With this method, you're launching an existing Phantom by sending it the input data it needs. You can adjust the data it uses for each run, but you'll need to set up the Phantom itself in PhantomBuster first.
- You have a valid PhantomBuster API key.
→ If you don't have one, see Create an API key. API keys can only be created by Workspace admins, if you don't see the Add API key button, check with your admin.
Workflows, like the LinkedIn Search to Lead Connection, can't currently be launched via API or n8n.
Step 1: Open or create a new workflow in n8n
- Open n8n and log into your account.
- From your dashboard, open an existing workflow or click New Workflow to start from scratch.
Step 2: Add a new HTTP Request node
- Click the plus (+) icon, and in the search bar, type HTTP Request and select it from the list.
Step 3: Configure the HTTP request to launch your Phantom
Set the API endpoint
- Go to the PhantomBuster API documentation, and find the endpoint under the PhantomBuster API V2 section, in the Agent dropdown: Click on /agents/launch.
→ This is what is used to start a Phantom. -
Copy the full endpoint URL and paste it into the URL field in your HTTP Request node.
- Set the HTTP method to POST. The default is GET, so make sure to update it before continuing.
Enable headers and add your PhantomBuster API key
To authorize and format your HTTP request:
- Toggle Headers to ON.
- Add your header key as follows: X-Phantombuster-Key
- Paste your PhantomBuster API key into the value field for the X-Phantombuster-Key header.
- Click Add Parameter to create a second header, then enter the following:
→ Key: Content-Type
→ Value: application/json
Step 4: Set up the request body
In the HTTP Request node body section:
- Toggle on Send Body.
- Under Specify Body, choose Using JSON.
Add your Phantom ID
In the JSON body, you'll first need to add the id field. This tells n8n which Phantom to launch.
- Start by typing the beginning of your JSON:
{ "id": - Next, go to your PhantomBuster dashboard and find the Phantom you want to run:
→ Click on the Phantom to open its console, then look at the URL in your browser, and copy the long number that appears between /phantoms/ and /console: - Back in your n8n workflow, paste that Phantom ID inside double quotes and add a comma at the end.
Keep the double quotes and comma in place, your JSON won't work without them.
Add your Phantom arguments
Now that your Phantom ID is in place, the next step is to tell n8n what data to send to the Phantom when it launches. You'll do this using the arguments field in your JSON.
- In your JSON body, right after the id line, add the following structure:
"argument": {
You'll paste your Phantom setup here in the next step
} - Then, go to your PhantomBuster dashboard and find the Phantom you want to run.
- Click the three dots in the top-right corner of the Phantom and select Setup.
- In the setup screen, click the three dots in the top-right of the input section, and select Switch to JSON.
- Copy the entire JSON structure shown: this contains the input data required to launch your Phantom.
-
Back in your n8n workflow, paste the content into the argument field you created. Make sure everything is formatted correctly.
→ In our example, we're missing a closing bracket at the end. Go ahead and add it so your JSON looks complete.
If you see a red warning in n8n, it usually means something small is missing, like a bracket or a comma. Check for extra or missing characters and try again.
Step 5: Execute the node
-
Click Execute step to launch your Phantom from within n8n.
→ n8n will send the setup you provided, just like if you had launched the Phantom manually from your PhantomBuster dashboard. - Once it runs, you'll be able to track the results right in your PhantomBuster workspace.
Troubleshoot API launch issues
If the Phantom doesn't launch or returns an error
- Check that your PhantomBuster API key is valid and correctly added to the header.
- Make sure your Phantom ID is accurate and wrapped in quotes.
- Validate your JSON formatting in the argument field.
- Confirm the Phantom has all required inputs (like a session cookie).
- Launch the Phantom manually in PhantomBuster to confirm that your setup works before triggering it from n8n.
- Get in touch with our Customer Care Team.
If you're trying to launch a Workflow
Workflows are designed to automatically relaunch based on their internal setup.
If activated, they'll trigger themselves; if deactivated, they won't start or pass data to the next step.
Because of this, Workflows can't be launched through API or n8n.
To achieve a similar result via n8n, we recommend chaining single Phantoms instead, for example:
You can launch each one separately within the same n8n workflow.
→ Copy each Phantom's input as JSON from its setup screen and use it to configure your n8n launch node.
Watch the video tutorial
Frequently asked questions
When should I use HTTP requests instead of the PhantomBuster integration node?
Use HTTP requests when you need full control over launch parameters, when the PhantomBuster integration node causes a "Missing cookie" error, or when you want to customize the request beyond what the built-in node supports.
What HTTP method and endpoint do I need?
Use a POST request to https://api.phantombuster.com/api/v2/agents/launch with your API key in the X-Phantombuster-Key header and Content-Type set to application/json.
Where do I find my Phantom ID?
Open the Phantom's console in your PhantomBuster Dashboard and look at the URL in your browser. The Phantom ID is the long number between /phantoms/ and /console.
Can I launch a Workflow this way?
No. Workflows can't be launched via API or n8n. Chain individual Phantoms in your n8n workflow instead.