![]() In your first function, replace the value of addyourWebhookUrlHere with the value received from FlowBuilder in step 1.4 by copying the full link. This function is shown in the screenshot below and sample code for that function can be found here. This first code you see is a generic function to our sheet that calls our FlowBuilder webhook by using the UrlFetchApp class to make an HttpRequest. Functions are "self contained" modules of code that accomplish a specific task. In the Script Editor you will see several functions. Once you get to the Script Editor page, you will see this: Once you make a copy of this spreadsheet template, access the Script Editor in Google Sheets under the Tools tab: Remember to copy the URL below as you will be needing it later on. Set Content-Type header to application/jsonĪdd a Header and input the details as below (make sure to add your own API key)Īnd that’s it! Make sure to trigger the Webhook flow with the correct variable and values in the body of the request. This is the same HTTP request that you can refer to in our Developer Documentation here. You can check our guide below on how to format this HTTP request. Add a HTTP Request stepĮnable the Body option and paste the body of the request. ![]() The name will be used to personalise the sent message, but depending on your use case, you can use these variables to represent different information, like orderId, balance, arrival date, etc.The phoneNumber will be the recipient’s phone number (WhatsApp needs this to identify the recipient).We will pull that data later from the Google Spreadsheet. In this example, we will use the name and phoneNumber variables. These can be either Message Templates or Media Templates. One or multiple WhatsApp channels installed.You can make a copy of the template Google Sheet here.A Google Sheet for which you have edit rights.Run your campaign by click on the button.Copy the function name sendHSMforEachRow into the button.Triggering campaigns from the Google Sheet.Ensure that the "name" and "phoneNumber" variables match.Create a copy of the spreadsheet template.Add a “Send WhatsApp template message” step.Create a Webhook trigger flow on Flow Builder.This guide will show you how to add WhatsApp notifications to a Google Sheet using MessageBird’s FlowBuilder and the scripting capabilities of Google Sheets.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |