A user messages me on WhatsApp, and I ask him “Tell me the phone number of the person who invited you”
The user responds with a phone number.
Now comes the challenge: I want to automatically send a message to that phone number, (which will already be in my contacts list, so it won’t actually be a new number for me).
That’s it. I don’t know how to achieve this, isn’t there a “forward message” block that I could add to kickstart the new conversation? All ideas are welcomed.
I have WhatsApp Business, I have the consent of all users involved, so it’s just a technical question.
I hope one of you guys can find the solution!
Best answer by Fabio Gaulke
Hi, @Seeburg!
This is possible using Manychat's own API (https://api.manychat.com/swagger) and External Requests in the flow… But it relies too much in the contact sending the right phone number in the right format. And in today's world, it's hard to remember anyone's phone number without looking at the saved contacts… this makes the user leave the conversation and maybe get distracted by other things or even can make them share the contact directly in WhatsApp, which won’t work to the automation.
That said…
First you have to create a Custom User Field and a simple automation with just an Action and setting the value as the WhatsApp ID
This Automation must be set with a trigger for every new contact created
To populate existing contacts, make a broadcast to all contacts just with this action step
This is necessary because to find a Contact ID (necessary to send a flow), the system fields available are only Email and Phone. But here's the catch… If you're using WhatsApp, probably your contacts just have the WhatsApp ID as phone numbers, and this is not the same as the Phone field…
Next…
You'll need two more Custom User Fieds
One for saving the informed phone numbers.
Another to store the User ID from the contact that did the indication.
Use the Data Collection block to get the phone number
Set the type to Phone
DISABLE all the toggles to save the phone as WhatsApp ID or System Field - If you let this activated, the number informed will be saved to the contact sending it.
Select the Custom User Field you created to store the informed number
As Action on reply, inset a External Request searching for the phone number in the custom field you created and populated at the beginning.
To get the field_id, go to Settings/Fiels and hover the mouse cursos over the Field. It will show the ID.
Change the Request Type to GET
The field_value will receive the variable for the field containing the informed phone number.
Remember to insert your API Key as Authorization headers
Map the ID in the response in your second Custom Field
Another Action with an External Request. Now to send a flow to the informed contact
Set it to POST and use the sendFlow request
subscriber_id will get the Custom Field previously used in the Response mapping
flow_ns you find in the flow URL
You could also do it with an external automation tool linke Make, Zapier, n8n… but the logic and the drawbacks (no form of phone validation) continue the same.
This is possible using Manychat's own API (https://api.manychat.com/swagger) and External Requests in the flow… But it relies too much in the contact sending the right phone number in the right format. And in today's world, it's hard to remember anyone's phone number without looking at the saved contacts… this makes the user leave the conversation and maybe get distracted by other things or even can make them share the contact directly in WhatsApp, which won’t work to the automation.
That said…
First you have to create a Custom User Field and a simple automation with just an Action and setting the value as the WhatsApp ID
This Automation must be set with a trigger for every new contact created
To populate existing contacts, make a broadcast to all contacts just with this action step
This is necessary because to find a Contact ID (necessary to send a flow), the system fields available are only Email and Phone. But here's the catch… If you're using WhatsApp, probably your contacts just have the WhatsApp ID as phone numbers, and this is not the same as the Phone field…
Next…
You'll need two more Custom User Fieds
One for saving the informed phone numbers.
Another to store the User ID from the contact that did the indication.
Use the Data Collection block to get the phone number
Set the type to Phone
DISABLE all the toggles to save the phone as WhatsApp ID or System Field - If you let this activated, the number informed will be saved to the contact sending it.
Select the Custom User Field you created to store the informed number
As Action on reply, inset a External Request searching for the phone number in the custom field you created and populated at the beginning.
To get the field_id, go to Settings/Fiels and hover the mouse cursos over the Field. It will show the ID.
Change the Request Type to GET
The field_value will receive the variable for the field containing the informed phone number.
Remember to insert your API Key as Authorization headers
Map the ID in the response in your second Custom Field
Another Action with an External Request. Now to send a flow to the informed contact
Set it to POST and use the sendFlow request
subscriber_id will get the Custom Field previously used in the Response mapping
flow_ns you find in the flow URL
You could also do it with an external automation tool linke Make, Zapier, n8n… but the logic and the drawbacks (no form of phone validation) continue the same.
I did follow all your steps and it’s working perfectly well, so congratulations, the tutorial was excellent, I’m very greatfull.
I wanted to ask you a very specific question.
Right now, I can send a flow to an external contact, just as you greatly taught me, the issue is that this “external contacts” we have not been chatting with for more than 24h, therefore, when the flow tries to be sent, it doesn’t work if we hadn’t chatted with this contact in the last 24h.
Therefore, I wonder if there is a way to either: A) Send the flow, (even if we have to pay per each cold sent) B) Send a template message (I have one approved, but I don’t see a URL that I could paste into the existing automation to trigger the sending of that message template.
Message templates can be sent to contact with whom we’ve not recently spoken.