Skip to content

Twilio Content Proxy

A simple HTTP proxy workflow that forwards POST requests to Twilio's Content API, enabling external applications to create content templates through a standardized webhook interface.

Purpose

No business context provided yet — add a context.md to enrich this documentation.

This workflow serves as a proxy layer between external applications and Twilio's Content API, allowing systems to create content templates without directly managing Twilio authentication or API specifics.

How It Works

  1. Webhook Reception: The workflow listens for incoming POST requests on the /tmp-twilio-content-proxy endpoint
  2. Request Forwarding: It extracts the request body and forwards it to Twilio's Content API
  3. Response Relay: The Twilio API response is returned directly to the original caller

This creates a transparent proxy that handles authentication while preserving the original request structure.

Workflow Diagram

graph TD
    A[External Application] -->|POST Request| B[WebhookIn]
    B --> C[CallTwilioContent]
    C -->|Twilio API Call| D[Twilio Content API]
    D -->|Response| C
    C -->|Response| A

Trigger

Webhook Trigger: POST requests to /tmp-twilio-content-proxy - Method: POST only - Response mode: Returns the output from the last node (Twilio API response)

Nodes Used

Node Name Type Purpose
WebhookIn Webhook Receives incoming POST requests and extracts the request body
CallTwilioContent HTTP Request Forwards the request to Twilio's Content API with authentication

External Services & Credentials Required

Twilio Content API

  • Service: Twilio Content API (https://content.twilio.com/v1/Content)
  • Authentication: HTTP Basic Auth
  • Required Credential: "Twilio Basic Auth" (ID: CL3oydUj5yb2Z7aQ)
    • Username: Twilio Account SID
    • Password: Twilio Auth Token

Environment Variables

No environment variables are used in this workflow. All configuration is handled through n8n credentials.

Data Flow

Input

  • Format: JSON payload in the request body
  • Source: External applications making POST requests to the webhook
  • Content: Any valid Twilio Content API payload (content templates, media, etc.)

Processing

  • The workflow takes the incoming request body and forwards it as-is to Twilio
  • Authentication is handled automatically using stored credentials

Output

  • Format: JSON response from Twilio Content API
  • Content: Twilio's response including created content details, errors, or status information
  • Delivery: Returned directly to the original webhook caller

Error Handling

This workflow uses basic error handling: - HTTP errors from Twilio API are passed through to the caller - Authentication failures will result in 401 responses - Network issues will cause the workflow to fail and return error responses

No custom error handling or retry logic is implemented.

Known Limitations

  • This is marked as a temporary workflow (_tmp_ prefix)
  • No input validation is performed on incoming requests
  • No rate limiting or request filtering
  • Authentication credentials are shared for all requests
  • No logging or monitoring of proxy usage

No related workflows identified from the current context.

Setup Instructions

1. Import the Workflow

  1. Copy the workflow JSON
  2. In n8n, go to Workflows → Import from JSON
  3. Paste the JSON and save

2. Configure Twilio Credentials

  1. Go to Credentials in n8n
  2. Create a new "HTTP Basic Auth" credential named "Twilio Basic Auth"
  3. Set username to your Twilio Account SID
  4. Set password to your Twilio Auth Token
  5. Save the credential

3. Activate the Workflow

  1. Open the imported workflow
  2. Click "Active" to enable the webhook
  3. Note the webhook URL provided by n8n

4. Test the Setup

  1. Send a POST request to the webhook URL with a valid Twilio Content API payload
  2. Verify the response matches Twilio's API documentation
  3. Check that content is created in your Twilio console

5. Integration

  • Use the webhook URL in your applications that need to create Twilio content
  • Ensure your applications send properly formatted JSON payloads according to Twilio's Content API specification