Access A Web Request-Triggered Workflow From The Frontend

This is an example of a worklflow triggered by a web request that you can call from the frontend of your site using Javascript. It isn’t doing anything other than handling the request and outputing a json response: ok object.

Watch The Demo

Preview Workflow

Sample Code

And here’s an example fetch call to hit that web request:

Here’s the code for reference if you want to copy and paste it:

const url = 'https://webhooks.getmesa.com/v1/kalen-jordan-dev/webrequest/659eefddb45c7806d94b118b/659eefe081e0244a5705500d.json?apikey=pobbFlA9BN73tE4gkbUsb5DLnZnwfIKi8g8UtM7U';

// Use fetch to get the data
fetch(url)
  .then(response => {
    // Check if the response is OK (status code 200-299)
    if (!response.ok) {
      throw new Error('Network response was not ok ' + response.statusText);
    }
    return response.json(); // Parse JSON from the response
  })
  .then(data => {
    console.log(data); // Output the JSON data
  })
  .catch(error => {
    console.error('There was a problem with the fetch operation: ', error);
  });

How do I use this demo file?

  1. Add MESA from the Shopify App Store. Enjoy a 7-day free trial to start.
  2. Import this download to My Workflows. Navigate to your automations then follow the prompt to import a workflow. Upload the downloaded ZIP file from this demo.
  3. That's it! Personalize any step if you want. You got this.
  4. Questions? Shoot me an email: [email protected]
We literally wrote the book on Shopify automation

Learn how to make Shopify work easier with your business processes.

Get the playbook - Free!

shopify automation playbook PDF