How it works

Follow these 2 simple steps to start triggering custom code from your Shopify Flow workflows

Shopify Flow logo icon

Retrieve data from Shopify Flow

App connector: Shopify Flow • Time to complete: 0 minutes (Auto-configured)
Why this matters: This trigger receives data from your Shopify Flow workflow and makes it available to process with custom code logic.

This step automatically captures whatever data your Shopify Flow workflow sends to MESA when it triggers this action. You don't need to configure anything here - it simply receives the payload from Flow and passes it to the next step. The trigger activates whenever your Flow workflow reaches the action that calls this MESA automation, bringing Flow data into MESA's more powerful processing environment.

code icon

Custom Code

App connector: Code • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step executes your JavaScript code using the data from Shopify Flow, giving you unlimited processing power beyond Flow's built-in actions.

This is where you write custom JavaScript to process the data from your Flow workflow. You can access all the Flow data through the input variables and perform complex logic, calculations, API calls, or data transformations that aren't possible in Flow alone. Write your code in the editor, test it with sample data, and it will execute automatically each time the workflow runs. Your code can return data, make external API calls, or trigger additional actions.

// Example: Log the Flow data and perform custom processing
console.log('Received from Flow:', input.shopify_flow);

// Access Flow data
const flowData = input.shopify_flow;

// Perform custom logic here
// Example: Calculate metrics, call external APIs, format data

// Return processed results
return {
  processed: true,
  timestamp: new Date().toISOString(),
  originalData: flowData
};

Make it your own

Customize this workflow even further:

Add conditional logic branches
Create smart decision trees in your custom code that choose different actions based on Flow data, like processing high-value orders differently than regular orders.
Connect to external APIs
Use your custom code to send data to third-party services like analytics platforms, CRM systems, or marketing tools that don't have direct Flow connectors.
Transform data for specific formats
Process Flow data into custom formats required by your business systems, such as converting Shopify order data into your accounting software's specific structure.
Store results in data tables
Save processed results or calculations in MESA's built-in database for tracking metrics, building reports, or referencing in future workflows.

Frequently asked questions

Can I access all the same data in custom code that was available in my Flow workflow?
Yes, all data that your Flow workflow has access to gets passed through to the custom code step. This includes order details, customer information, product data, and any custom fields or calculated values from previous Flow steps.
What happens if my custom code encounters an error?
The workflow will stop at the custom code step and log the error details. You can view error messages in the MESA activity log to debug your code. Consider adding try-catch blocks in your JavaScript to handle potential errors gracefully.
Can I trigger additional MESA workflows or actions from my custom code?
Yes, you can use JavaScript to make HTTP requests to MESA's API or other webhook endpoints to trigger additional automations. You can also return data that gets passed to subsequent steps if you add more actions after the custom code step.
What is a template?
MESA templates are fully pre-configured workflows built and vetted by Shopify Experts. Unlike competitor templates that provide basic scaffolds requiring extensive setup, MESA templates come with all data variables properly mapped, required fields configured, and steps ready to activate. You can turn them on immediately and start automating.
Can I customize a template?
Absolutely! While our templates work out-of-the-box, every step can be personalized to match your exact business requirements. Add conditional logic, integrate additional apps, or build more sophisticated workflows. MESA's templates provide a solid foundation that you can expand as needed.
Are templates free?
Yes! Our entire library of expert-built, production-ready templates is free to use. Unlike platforms that charge for premium templates or provide only basic scaffolds, MESA gives you access to hundreds of fully-configured, vetted workflows at no additional cost.

Ready to start triggering custom code from your Shopify Flow workflows?

Join thousands who've automated their work and saved an average of 3.5 hours every week.

Start with this template — It's free
7-day free trial • 2 min setup • Cancel anytime