I am using zapier chatbot and below is the embed code of the chatbot
<script async type='module' src='https://interfaces.zapier.com/assets/web-components/zapier-interfaces/zapier-interfaces.esm.js'></script>
<zapier-interfaces-chatbot-embed is-popup='true' chatbot-id='*****************'></zapier-interfaces-chatbot-embed>
Using this code, I see the chat icon at the bottom right; it works fine when we click on it(having iframe structure).
Now I have a Contact Us button in the header and when I click on the Contact Us button, I want to open the chatbot automatically
How can I do this?
2
Answers
Try this one It worked on this page
https://zapier.com/ai/chatbot
(in the console)Example implementation (alternatively use a mutationobserver):
If jQuery exists:
or pure js:
Edition after receiving comment:
if ChatBot is in an Iframe and the target website allows cross-origin then we have to go deep inside the iframe: