Skip to main content
All CollectionsAdvanced Features
How to send an HTTP request from a scenario?
How to send an HTTP request from a scenario?

Learn how to send HTTP requests from Inrō scenarios to integrate with external systems and automate workflows using various HTTP methods.

Updated over 4 months ago

Inrō allows you to integrate with other systems by sending HTTP requests from your scenarios or campaigns. This feature is useful for connecting Inrō with external applications and automating various workflows.

Introduction to HTTP Requests in Inrō

HTTP requests can be used to send data to or receive data from another system. In Inrō, you can send requests via various methods such as GET, POST, PATCH, PUT, or DELETE.

These requests can be customized with headers and parameters, making it possible to send specific information like contact details or trigger messages.

Setting Up an HTTP Request

  1. Create or Edit a Scenario:

    • Navigate to the Scenarios and create a new scenario or edit an existing one.

  2. Add an HTTP Request Action:

    • In the scenario editor, select the option to add an action and choose
      "Send HTTP Request"

      HTTP Action in Scenarios

  3. Configure the Request:

    • Method: Choose the HTTP method (GET, POST, PATCH, PUT, DELETE) depending on the action you want to perform.

    • URL: Enter the URL of the endpoint you want to send the request to.

    • Headers: If required, add headers by clicking "Add Header" and entering the header key and value.

    • Body Parameters: Add the parameters by clicking “Add Parameter” you need to send in the body of the request.

      Send HTTP Request Action

Example Configuration:

Method: GET URL: <https://api.example.com/data> Headers: Authorization: Bearer YOUR_TOKEN Body: contact_id: {{ contact.id }} username: {{ contact.username }}

Customising with Variables

You can customise your HTTP request’s headers, parameters, and URL with variables to dynamically insert data from Inrō. This allows you to pass contact details, trigger messages, and other information to your external system such as :

  • {{ contact.name }}

  • {{ contact.username }}

  • {{ contact.id }}

  • {{ trigger.message }}

  • {{ trigger.comment }}

Example Usage:

URL: <https://api.example.com/update?user=>{{ contact.username }}&message={{ trigger.message }}

This flexibility ensures that your HTTP requests are tailored to the specific data and context of each interaction, enhancing the integration capabilities of Inrō.

Practical Example

Suppose you want to send a contact’s ID and username to your system to update their profile or trigger another scenario. Here’s how you can set it up:

  1. Create the Scenario:

    • Go to Scenarios > Create New Scenario > Add Trigger (e.g., when a contact sends a DM).

  2. Add HTTP Request Action:

    • Configure the request:

      • Method: POST

      • Headers: Add any necessary authentication headers.

      • Body Parameters:

        { "contact_id": "{{ contact.id }}", "username": "{{ contact.username }}" }

  3. Save and Test:

    • Save the scenario and test it by triggering the defined action (e.g. sending a DM from the contact)

Inrō Insider Tips

  • Test thoroughly: Always test your HTTP request configurations with sample data to ensure they work as expected before deploying them live.

  • Secure your requests: Ensure any sensitive data in your requests is encrypted and securely handled to protect user privacy.

  • Send unique Instagram variables: Utilize as many relevant variables as possible to make your requests more specific and useful. We recommend unique Instagram-specific variables that your CRM/CDP might not have and can help track customer behaviour.

Feedback

If you have any questions or need further assistance, feel free to reach out to our support team or leave a review on this article.

Did this answer your question?