Access A Web Request-Triggered Workflow From The Frontend

This example showcases a workflow triggered by a web request that can be called from your site’s frontend using JavaScript. While it doesn’t perform any specific actions, it handles the request and outputs a JSON response: { "status": "ok" }. This basic setup provides a foundation for more complex interactions, enabling you to build custom functionalities that seamlessly integrate with your site’s frontend.

Watch the demo

Preview workflow steps

workflow steps

Free download

This free workflow template if yours to personalize. Simply import the ZIP file to MESA then connect the app steps to your credentials. Test, then, turn it on!

Sample code

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

example code

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);
  });

Questions about this workflow demo? Contact:

Kalen Jordan

MESA Service Partner

What you should do next

Whenever you’re ready…follow these 4 simple steps to get started:

  1. Add MESA to your Shopify store. The best way to get started is by adding the MESA app from the Shopify App store. Every plan includes the first 7-days free so you can be assured your workflow is running properly.
  2. Questions? Contact Kalen Jordan. MESA Service Partners can help personalize workflows or make any automations your business requires.
  3. If you know another merchant who’d enjoy reading this, share it with them via LinkedIn, YouTube, Twitter, or Facebook.

Automate anything and get more from your apps.
For free.

Start free trial
background: abstract lines

Automate everything with MESA

Make any workflow and get more from your existing apps.

Try MESA for free, 7-day trial included.