LoopCLI

HTTP Connectors

LoopCLI ships with a native HTTP action. Each step can perform REST, GraphQL, or webhook calls and pass responses to later steps.

Configure an HTTP step

loopcli loop add-http enrich-leads "Fetch new leads" GET https://api.example.com/leads \
  --header "Authorization: Bearer {{CRM_TOKEN}}" \
  --save-response recentLeads

Useful options

  • --method – defaults to GET. Accepts POST, PUT, DELETE, PATCH.
  • --header – repeat for each header.
  • --body – path to a JSON file or inline JSON for POST/PUT requests.
  • --save-response – stores the parsed JSON for later steps ({{recentLeads}}).
  • --extract key=path – map fields into template variables (e.g. --extract count=$.meta.total).

Retrying requests

Set per-step retry behavior:

loopcli loop update-http enrich-leads "Fetch new leads" --retries 3 --timeout 30000

Timeouts are in milliseconds. The hosted runner uses exponential backoff between attempts.

Consuming responses

Inside CLI steps you can reference saved data:

loopcli loop add-cli enrich-leads "Summarize" "node scripts/summarize.js"

Environment variables such as LOOPCLI_CTX_recentLeads hold the JSON payload.

Best practices

  • Redact secrets with loopcli loop secrets set instead of hardcoding tokens.
  • Use staging endpoints when testing; switch to production before deploying.
  • Monitor error rates with loopcli loop executions --loop <name> --json.

Related Documentation

Continue learning with these related topics