How to use RecallSync agents with GHL (Instagram)

This document outlines the steps to set up and use RecallSync AI agents with GoHighLevel (GHL) for the Instagram channel, based on the provided video content.

Written By ReCallSyncAI

Last updated 5 months ago

Prerequisites

  1. RecallSync Account: Ensure you have an active RecallSync account.

  2. GoHighLevel (GHL) Integration: GoHighLevel must be connected within your RecallSync settings.

    • Navigate to Settings β†’ Integrations.

    • Verify that GoHighLevel is showing as Connected. (Note: The video shows it is already connected).

  3. OpenAI Key Configuration: The OpenAI API key must be configured in RecallSync.

    • Navigate to Settings β†’ API Keys.

    • Ensure the OpenAI (GPT-4.5-mini) key is Active and set as Primary. (Note: The video shows it is already configured).

  4. RecallSync Agent: An active RecallSync Agent configured for the Instagram channel is required.

    • Navigate to Agents in RecallSync.

    • Identify the desired Qualification Agent (or any other agent) that has Instagram listed as an Active channel.

Step-by-Step Setup in GoHighLevel (GHL) Workflow

The setup involves creating a Webhook in a GHL Workflow that triggers the RecallSync agent when a new Instagram message is received from a contact.

1. Copy the Agent ID (from RecallSync)

  • In the RecallSync platform, go to Agents.

  • Locate the specific agent you want to trigger (e.g., "Qualification Agent").

  • Click the Copy icon next to the agent's ID under the agent name.

2. Configure the GoHighLevel Workflow

  • Navigate to your GHL account and go to Automation β†’ Workflows.

  • Open or create a new workflow (e.g., "Instagram Agent Trigger").

A. Workflow Trigger:

  • Set the trigger to initiate the workflow upon an event related to a new message.

    • In the video, the workflow is listening to New Replies.

B. Conditional Logic (To Check if Agent is already Active):

  • Add an If/Else condition step immediately after the trigger.

  • The purpose is to ensure the agent is only triggered for new conversations or if it hasn't been tagged as triggered already, preventing endless loops or re-triggers.

  • Condition: Check if the contact's Tags does NOT include a specific tag, such as "IG trigger".

    • If the condition is met (i.e., the tag is NOT present), the flow continues to trigger the agent.

    • If the condition is not met (i.e., the tag IS present), the flow ends to prevent re-triggering the agent on subsequent replies.

C. Webhook Action (Triggering the RecallSync Agent):

  • In the path where the tag is NOT present, add a Webhook action step.

  • Action Name: Name it something descriptive, like "Trigger Agent IG".

  • Method: Set to POST.

  • URL: Paste the base RecallSync Webhook URL and modify it to include the agent ID.

    • The base URL structure is: https://app.recallsync.com/api/agent/ followed by the Agent ID copied in Step 1.

    • The complete URL should look like: https://app.recallsync.com/api/agent/[YOUR_AGENT_ID] (e.g., https://app.recallsync.com/api/agent/4f762dd8-d21b-42f8-8313-2d9c123f11d).

  • Custom Data: The video shows the following key-value pairs are configured to send contact information:

    • channels: INSTAGRAM

    • initialMessage: message.body (This sends the content of the initial message to the agent).

D. Add Tag Action:

  • Immediately after the Webhook step, add an Add Tag action.

  • Tag: Add the tag you checked for in the condition, e.g., "IG trigger".

  • This ensures that subsequent messages from the same contact will follow the "None" (End) path in the conditional step, allowing the agent to continue the conversation without being re-triggered.

E. Save and Publish:

  • Save the workflow.

  • Ensure the workflow is Published (Active).

3. Testing the Agent

  • Open your Instagram direct messages (DMs).

  • Send an initial message to the connected Instagram business account.

Expected Flow and Verification:

  1. Initial Message Sent: The contact sends a message on Instagram.

  2. GHL Workflow Triggered: The GHL workflow runs, checks for the "IG trigger" tag (which should be absent for a new conversation), and executes the Webhook.

  3. Agent Triggered: The Webhook sends the message and the contact details to the RecallSync agent.

  4. Agent Conversation: The RecallSync agent processes the message and sends a reply back to the contact on Instagram.

  5. Tag Added: The GHL workflow adds the "IG trigger" tag to the contact.

  6. Conversation Tracking:

    • In RecallSync, navigate to Conversations. The new conversation with the AI agent's replies and the user's messages will be visible.

    • In GHL Contacts, open the contact record. The IG trigger tag should be present, and the conversation will be recorded in the contact's activity.

  7. Subsequent Messages: When the contact replies again, the GHL workflow will check the condition, find the "IG trigger" tag, and end the workflow, allowing the RecallSync agent to continue the ongoing conversation via the active channel without a new trigger.