try.directtry.direct

Testing a Directus to Chatwoot Pipe with Stacker - Step-by-Step

What You'll Test

Deploy Directus and Chatwoot on the same server, create a data pipe between them, and verify that data flows from the headless CMS to the support platform. This is a practical test of Stacker's PIPE system.

Directus data change → webhook → PIPE → Chatwoot incoming message

Quick Answer

# Deploy both apps
docker compose -f docker-compose.yml -p project up -d

# Scan for endpoints
stacker pipe scan --app directus --container project-directus-1
stacker pipe scan --app chatwoot --container project-chatwoot-1

# Create and activate pipe
stacker pipe create directus chatwoot
stacker pipe activate <pipe-id>

# Test
stacker pipe trigger <pipe-id> --data '{"event":"item.created","collection":"posts"}'
Use --container flag for reliable endpoint discovery.

Step 1: Deploy Both Apps

Deploy Directus and Chatwoot with a combined compose file:

docker compose -f docker-compose.yml -p project up -d

This creates all necessary containers on the same Docker network.

Step 2: Scan for Endpoints

Use the --container flag for reliable discovery. The default remote_app scope returns empty for most apps.

stacker pipe scan --app directus --container project-directus-1
stacker pipe scan --app chatwoot --container project-chatwoot-1

Note: Directus uses non-standard API paths (/items/*), so the probe may not find endpoints automatically. Use manual endpoints as a fallback.

Step 3: Create the Pipe

stacker pipe create directus chatwoot

If the interactive prompt fails, use the --name flag:

stacker pipe create directus chatwoot --name "directus-chatwoot"

For apps with non-standard paths, specify endpoints manually:

stacker pipe create directus chatwoot \
  --source-endpoint "POST /items" \
  --target-endpoint "POST /api/v1/conversations" \
  --source-fields "name,email,message" \
  --target-fields "content" \
  --name "directus-chatwoot"

Step 4: Activate the Pipe

stacker pipe activate <pipe-id>

Step 5: Test the Pipe

stacker pipe trigger <pipe-id> --data '{"event":"item.created","collection":"posts"}'

Check the execution log:

stacker pipe history <pipe-id>

Known Issues

remote_app Scope Returns Empty

The agent doesn't pass resolved containers to the probe when using remote_app scope. Use --container flag to force direct_container scope.

Agent Must Be on Same Docker Network

The status-panel agent and project containers are on different Docker networks by default. Bridge them:

docker network connect project_app-network statuspanel_agent

CLI Auth Token Expires

Run stacker login before pipe commands if you get authentication errors.

Container Name Mismatch

Stacker generates the main app service as app, producing containers named project-app-1. If your app code doesn't match, rename the compose service:

sed -i 's/^  app:/  directus:/' .stacker/docker-compose.yml

Troubleshooting Commands

# Check agent status
stacker agent status

# View agent logs
docker logs statuspanel_agent | grep -i 'probe\|match\|resolve'

# Check container labels
docker inspect <container> --format '{{range $k,$v := .Config.Labels}}{{$k}}={{$v}}{{"\n"}}{{end}}'

# Verify network connectivity
docker exec statuspanel_agent curl -s http://project-directus-1:8055/items

Frequently Asked Questions

Can I test pipes without the agent?

No. The agent executes pipe commands. Without it, stacker pipe trigger hangs and times out.

Why does endpoint discovery fail for Directus?

Directus uses /items/* instead of standard /api/* paths. The agent's probe only checks standard paths. Use manual endpoints.

How do I verify the pipe is working?

Check stacker pipe history <pipe-id> for execution results. A successful trigger shows status: completed with the target response.

What data format does the pipe expect?

JSON. Pass data with --data '{"key":"value"}'. The pipe maps source fields to target fields based on the pipe configuration.

Key Takeaways

  • Use --container flag for reliable endpoint discovery
  • Manual endpoints work when discovery fails
  • Agent must be on the same Docker network as project containers
  • Run stacker login before pipe commands
  • Check stacker pipe history for execution results

Try It Yourself

Deploy this stack or browse pre-built templates in the marketplace. Your first deployment is always free.