Skip to main content

Automation Debugger

Courier’s automation debugging tool can be used to run a test event through your automation template and debug any errors you may come across.

Creating a Test Run Context

Similar to notification templates, automations can now be tested with test run contexts passed in and saved as test events. These tests can mimic an incoming payload passed through Segment, inbound events, or an adhoc automation call. You can create a test event from the Debug tab in your automation template.
Automation Test Event

Running The Test Run Context

With your automation test event configured, you can execute a test run through the debugging tool to simulate the event passed through the automation workflow. When ready, click on the Run Again button and select each node to see the data being passed.
Test Event Trigger

Verifying Test Data

After running your simulated run, you can select each node in your workflow to verify that the data is passed through to each consecutive node. This can be helpful if you have several nodes that rely on incoming data payloads.
Data Passed to Each Node

Run your Automation

After testing with the debugger, invoke your automation via API with the data payload you want to pass. POST https://api.courier.com/automations/:template_id/invoke
{
  "data": {
    "order_id": "ORD-12345",
    "status": "shipped"
  },
  "profile": {
    "email": "user@example.com",
    "phone_number": "+12345678910",
    "name": "Jane"
  }
}
The automation run context shows a successful run with the data you passed.
Successful Run Context

Testing GET Profile Nodes

Use the debugger to test a GET Profile node before promoting your template to production. The debugger shows the run context passed down your automation after fetching a profile.
GET Profile Node