# How to send a custom Welcome Message?

**URL:** <https://devforum.zoom.us/t/how-to-send-a-custom-welcome-message/46701>\
**Category:** API and Webhooks\
**Created:** [March 26, 2021, 5:25pm UTC](https://devforum.zoom.us/t/how-to-send-a-custom-welcome-message/46701 "2021-03-26T17:25:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![galadriel](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@galadriel](https://devforum.zoom.us/u/galadriel)\
**Post date:** [March 26, 2021, 5:25pm UTC](https://devforum.zoom.us/t/how-to-send-a-custom-welcome-message/46701/1 "2021-03-26T17:25:25Z")

</div>

I’m trying to setup a custom welcome message for a chatbot as described here: [https://marketplace.zoom.us/docs/guides/chatbots/installation-and-authentication#configuring-a-dynamic-welcome-message](https://marketplace.zoom.us/docs/guides/chatbots/installation-and-authentication#configuring-a-dynamic-welcome-message)

I’m receiving the **bot\_installed** event and payload, and sending the response, but the message never appears. It just prompts “Say Hi to [App]”

The chat subscription endpoint is set to [host]/command

The code is like this:

```
app.post('/command', async function (req, res) {
	if (req.body.event == 'bot_installed') {
		res.json({
		  "head": {
			"text": `Welcome ${req.body.payload.userName}!`
		  },
		  "body": [{
			"type": "message",
			"text": "Thanks for installing."
		  }]
		})
		console.log('ok')
	}
})

```

I can see via ngrok that the response is being sent as so:

```
HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 93
ETag: W/"5d-eoFs5n6rjVUJ+yrf7VxofwIijpk"
Date: Fri, 26 Mar 2021 17:18:35 GMT
Connection: keep-alive
Keep-Alive: timeout=5

{"head":{"text":"Welcome Name!"},"body":[{"type":"message","text":"Thanks for installing."}]}

```

But it never appears in the client.

The docs are a bit vague and I can’t find any working examples of how this is supposed to work.

Any ideas?

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [March 26, 2021, 9:30pm UTC](https://devforum.zoom.us/t/how-to-send-a-custom-welcome-message/46701/2 "2021-03-26T21:30:30Z")

</div>

Hey @galadriel,

Thank you for reaching out to the Zoom Developer Forum. Make sure that you are using the [Base JSON Structure](https://marketplace.zoom.us/docs/guides/chatbots/customizing-messages#customizing-messages) that is required when sending custom messages. Specifically, make sure that you have the proper IDs and the content object.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/0/30a2617d18744af32481cf8871f82f1d53369f1d.png)

Let me know if that helps.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![galadriel](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@galadriel](https://devforum.zoom.us/u/galadriel)\
**Post date:** [March 27, 2021, 7:53am UTC](https://devforum.zoom.us/t/how-to-send-a-custom-welcome-message/46701/3 "2021-03-27T07:53:03Z")

</div>

OK thanks, that works.

But why do the docs say NOT to send the base json structure? The part you’ve included above says “respond to the HTTP POST request with a Chatbot Message content object". The content object is _within_ the base json structure, so clearly doesn’t include it.

And the example given is labelled as the “Response body” – ie. the entire response body – and only contains the content object, as is specified in the docs.

 ![Screenshot 2021-03-27 at 07.47.24](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/b/2b988a1fac2b6beefa35bb76ab149daa8af25794.png)

If the response needs the base json structure too, then it would be useful if the docs said so, and the example was corrected.

Thanks

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [March 29, 2021, 8:15pm UTC](https://devforum.zoom.us/t/how-to-send-a-custom-welcome-message/46701/4 "2021-03-29T20:15:07Z")

</div>

Hey @galadriel,

Great! I’m glad to hear that worked for you. I agree that our documentation could be a little clearer on this, thank you for mentioning that. I’ll work with our documentation team to see if we can improve the wording here. We should be clearer that the entire JSON structure is required.

When it comes to the _Response Body_ section - I think it is correct. That should be an example of what you get in response when making your _request_ with the full JSON structure. Let me know if that makes sense.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![galadriel](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@galadriel](https://devforum.zoom.us/u/galadriel)\
**Post date:** [March 30, 2021, 11:11am UTC](https://devforum.zoom.us/t/how-to-send-a-custom-welcome-message/46701/5 "2021-03-30T11:11:34Z")

</div>

> When it comes to the _Response Body_ section - I think it is correct. That should be an example of what you get in response when making your _request_ with the full JSON structure. Let me know if that makes sense.

I don’t think this is correct. Sending a welcome message is different to sending a normal message.

When sending a normal message, you make a request and would expect a response body.

In this case however, you’re _responding_ to a request from Zoom. It’s more like a webhook action than an API call.

So the response body is _what you’re responding with_ after receiving a bot\_installed event. There can be no response to that as it’s already a response itself.

So the example given is incorrect, because it doesn’t include the base json structure which is apparently required.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 30, 2021, 5:16pm UTC](https://devforum.zoom.us/t/how-to-send-a-custom-welcome-message/46701/6 "2021-03-30T17:16:04Z")

</div>

Hey @galadriel ,

You are correct. I have just tested this and we are working to update the docs. (DEVELOPERS-1091) 🙂

Thank you for reporting this issue!

-Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [April 30, 2021, 3:16am UTC](https://devforum.zoom.us/t/how-to-send-a-custom-welcome-message/46701/7 "2021-04-30T03:16:08Z")

</div>

Closed on April 30, 2021, 3:16am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
