Trigger a desktop run from Zapier and post the data back

How to trigger a desktop run from Zapier and post the data back: install the Chrome extension, click Build from description, tell the agent what you want, and follow its prompts. A working bot is built and tested in minutes.

Here is how the automation works. To trigger a desktop run from Zapier, post to https://lar.axiom.ai/api/v5/desktop-trigger from a Webhooks by Zapier action with your API key and the automation's name. The run starts in the axiom.ai desktop app on your own machine, so it can use your logged-in sites and your data stays on hardware you control, and a Trigger webhook step at the end posts what it scraped back to a second Zap.

Author
Alex Barlow
Published

Build the desktop run from a description


Describe it and click the button: the agent builds and tests the scraper in your Chrome extension. The desktop trigger needs a Pro plan or above; see pricing. The example is a single scrape, and the middle of it is yours to change.

  1. Go to the page I give you
  2. Scrape the title and price of every item
  3. Post what was scraped to my Zapier webhook
Click to launch the Chrome extension. Not installed? You can create an account and try it free.Opens the Chrome extension. Free account to try.

You need the desktop app installed, running and logged into the same account, your API key from the Dashboard (Authentication), and a Zapier account. Once the automation is saved, turn on Route webhook triggers to desktop under Run via API on desktop in its settings (the Cog icon), or the endpoint answers Desktop webhook not enabled for this task.

The video shows the agent building the desktop scraper Zapier starts from the three lines above, in a few minutes.

Build the desktop run step by step


The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.

  • 1.0 Get data from a URL
    • URL: the page
    • Select: the title and price of one item, one column each
  • 2.0 Trigger webhook
    • Endpoint: the catching Zap's webhook URL
    • Payload: [scrape-data]

Common questions about the desktop run


How do I route a Zapier trigger to the desktop app?

Save the automation with a name you can type exactly; the trigger matches it character for character. Click the Cog icon in the left toolbar, open Run via API on desktop under Run options, and turn on Route webhook triggers to desktop. See automation settings for the rest. The scrape can be whatever the job needs: Go to page and Click element to reach a page behind a menu, Loop through data for a list of URLs, a login first, which is one of the better reasons to run on the desktop at all, or Write data to a Google Sheet to file the data as well as post it.

The Run via API on desktop setting, with Route webhook triggers to desktop turned on

How do I catch the scraped data in a Zap?

In Zapier, click Create, choose Zap, and for the trigger choose Webhooks by Zapier with the event Catch Raw Hook. Copy the URL under Your webhook URL into the Trigger webhook step's Endpoint. After a run, click Test trigger and the scraped data appears as the raw body; a Formatter by Zapier step with event Text, Transform Split Text, Input Raw Body, Separator a single speech mark and Segment Index All (as separate fields) turns it into fields you can send wherever you want them.

How do I start the desktop run from Zapier?

Create a second Zap with whatever trigger suits the job: a new sheet row, a schedule, a form submission. Add a Webhooks by Zapier action with the event POST, set URL to https://lar.axiom.ai/api/v5/desktop-trigger and Payload Type to Json. In Data, add two rows: name key with your API key, and name taskName with the automation's exact name. Leave Wrap Request In Array as No and Unflatten as Yes. With the desktop app running and logged in, click Test step; the response is {"queued": true} and the run starts in the desktop app.

The Webhooks by Zapier POST action with key and taskName in the Data fields

Zapier sends this body:

{
  "key": "your-api-key-here",
  "taskName": "My First Automation"
}

The same call in cURL, to check the key and name before they go into Zapier:

curl -s -X POST https://lar.axiom.ai/api/v5/desktop-trigger -H "Content-Type: application/json" -d '{"key":"your-api-key-here","taskName":"My First Automation"}'

A successful call answers 202 with { "queued": true }. Queued means the desktop app has a run waiting, not that it has started: if the app is not running when the call lands, the run starts as soon as the app is next online, within 24 hours; after that the trigger expires. The key goes in the JSON body only; the X-API-KEY and Authorization: Bearer headers used elsewhere in the API do not work here.

Why does the Zapier desktop trigger answer with an error?

The request is missing a field, has the wrong key or name, or the automation is not routed to the desktop. Find the response in the table for the fix.

ResponseCause
Unable to authenticate, you must send an API key.key is missing from the body, or the body never arrived as JSON. Check Payload Type is Json and key and taskName are separate rows in Data, not raw JSON pasted into one box.
Unable to authenticate, please check your API key and try again.key does not match an active API key. Generate a new one in the Dashboard.
Missing task name, you must send the name of the task that you wish to trigger.taskName is missing. The cloud trigger calls this field name; this one does not.
404, taskName not foundThe name does not match an automation in your account. Copy it from the Dashboard; a stray space or capital breaks it.
Desktop webhook not enabled for this taskThe Route webhook triggers to desktop switch is off for this automation.
Triggering automations through the API is not included in the Starter plan.Triggering needs Pro or higher.
An HTML page rather than JSONA host that does not serve this endpoint. Check the URL.

How do I check a desktop run's status from Zapier?

You cannot; there is no endpoint for a desktop run's status. Check the run history in the Dashboard or in the desktop app. For the endpoint itself, see trigger a desktop run.

Can I run the Zapier-triggered automation in the cloud instead?

Yes, when the page needs no local login or file. Post to the cloud trigger with a data table of URLs: trigger a web scraper from Zapier.

Can I trigger a desktop run from Zapier on a schedule?

Yes. Give the starting Zap a schedule as its trigger and it posts to the desktop trigger at each tick; the run starts when the desktop app is online.

What can a desktop run do that a cloud run cannot?

Read a local file, drive an app installed on the machine, and use the sessions already in your browser. The middle of this pattern is yours; only the Trigger webhook at the end matters to Zapier. When a run fails, hand it to the agent and it repairs the step.

Where do I get help?

Get in touch with support, or ask in the axiom.ai community.

Related guides