Skip to main content
Answered

Configuración Typeform

  • February 18, 2025
  • 1 reply
  • 15 views

¿Cómo puedo incluir un Typeform al final de una conversación de manera automática?

Best answer by mateusz.leszkiewicz

Hi ​@Leydi Cuartas It’s Mat from the Support Engineering Team 😀

Automatically Including a Typeform at the End of a Conversation

 

📌 Goal

 

You want to automatically send a Typeform link at the end of a conversation in Intercom.

✅ Solution: Use Workflows (No Code Approach)

 

Intercom Workflows allow you to automate message sending at key moments, like when a conversation is closed.

 

Steps to Set Up a Workflow:

1. Go to Intercom → Automations → Workflows.

2. Create a New Workflow → Choose “After a conversation ends”.

3. Set the Trigger:

“When a conversation is closed” (by a teammate or the system).

4. Add an Action:

“Send a message” → Choose Chat Message.

Include the Typeform URL with a message, e.g.:

“Thanks for chatting with us! We’d love to hear your feedback. Please fill out this quick survey: [Typeform Link] 🚀”

5. Save & Enable the Workflow.

 

Effect: The Typeform link will automatically be sent whenever a conversation is closed.

💻 Alternative: API-Based Approach (For More Control)

 

If you want more customization, you can use Intercom’s API to send a message when a conversation is closed.

 

1️⃣ Listen for Conversation Closures via Webhook

• Subscribe to the conversation.closed webhook:

{
  "type": "notification_event",
  "topic": "conversation.closed",
  "data": {
    "item": {
      "id": "12345",
      "user": {
        "id": "67890"
      }
    }
  }
}

 

• This triggers every time a conversation is closed.

 

2️⃣ Send a Follow-up Message with Typeform

 

Make a POST request to send a message using the Intercom Conversations API:

import requests

INTERCOM_ACCESS_TOKEN = "your_access_token"

url = "https://api.intercom.io/messages"
headers = {
    "Authorization": f"Bearer {INTERCOM_ACCESS_TOKEN}",
    "Intercom-Version": "2.9",
    "Content-Type": "application/json"
}

data = {
    "message_type": "inapp",
    "body": "Thanks for chatting with us! We'd love your feedback: [Typeform Link] 🚀",
    "from": {
        "type": "admin",
        "id": "YOUR_ADMIN_ID"
    },
    "to": {
        "type": "user",
        "id": "USER_ID_FROM_WEBHOOK"
    }
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

Effect: Every time a conversation is closed, a message with the Typeform link is automatically sent.

🚀 Best Approach

• If you don’t need custom logic → Use Intercom Workflows for an easy, no-code solution.

• If you need more control over message timing and conditions → Use the API-based method.

 

Let me know if you need further setup help! 🚀

Just to be sure we're on the same page, could you take a look at the articles below in case you haven't seen it already?

Typeform app

How to send app in Messages?

Workflows explained

View original
Did this topic help you find an answer to your question?

1 reply

mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi ​@Leydi Cuartas It’s Mat from the Support Engineering Team 😀

Automatically Including a Typeform at the End of a Conversation

 

📌 Goal

 

You want to automatically send a Typeform link at the end of a conversation in Intercom.

✅ Solution: Use Workflows (No Code Approach)

 

Intercom Workflows allow you to automate message sending at key moments, like when a conversation is closed.

 

Steps to Set Up a Workflow:

1. Go to Intercom → Automations → Workflows.

2. Create a New Workflow → Choose “After a conversation ends”.

3. Set the Trigger:

“When a conversation is closed” (by a teammate or the system).

4. Add an Action:

“Send a message” → Choose Chat Message.

Include the Typeform URL with a message, e.g.:

“Thanks for chatting with us! We’d love to hear your feedback. Please fill out this quick survey: [Typeform Link] 🚀”

5. Save & Enable the Workflow.

 

Effect: The Typeform link will automatically be sent whenever a conversation is closed.

💻 Alternative: API-Based Approach (For More Control)

 

If you want more customization, you can use Intercom’s API to send a message when a conversation is closed.

 

1️⃣ Listen for Conversation Closures via Webhook

• Subscribe to the conversation.closed webhook:

{
  "type": "notification_event",
  "topic": "conversation.closed",
  "data": {
    "item": {
      "id": "12345",
      "user": {
        "id": "67890"
      }
    }
  }
}

 

• This triggers every time a conversation is closed.

 

2️⃣ Send a Follow-up Message with Typeform

 

Make a POST request to send a message using the Intercom Conversations API:

import requests

INTERCOM_ACCESS_TOKEN = "your_access_token"

url = "https://api.intercom.io/messages"
headers = {
    "Authorization": f"Bearer {INTERCOM_ACCESS_TOKEN}",
    "Intercom-Version": "2.9",
    "Content-Type": "application/json"
}

data = {
    "message_type": "inapp",
    "body": "Thanks for chatting with us! We'd love your feedback: [Typeform Link] 🚀",
    "from": {
        "type": "admin",
        "id": "YOUR_ADMIN_ID"
    },
    "to": {
        "type": "user",
        "id": "USER_ID_FROM_WEBHOOK"
    }
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

Effect: Every time a conversation is closed, a message with the Typeform link is automatically sent.

🚀 Best Approach

• If you don’t need custom logic → Use Intercom Workflows for an easy, no-code solution.

• If you need more control over message timing and conditions → Use the API-based method.

 

Let me know if you need further setup help! 🚀

Just to be sure we're on the same page, could you take a look at the articles below in case you haven't seen it already?

Typeform app

How to send app in Messages?

Workflows explained


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings