XM Cloud Forms - Integrate with Google sheet via Sitecore Connect and Webhooks
XM Cloud Forms - Integrate with Google sheet via Sitecore Connect and Webhooks
XM Cloud Forms is a SaaS based Forms Solution, there is no CD Server, no Forms Database to store the data.
XM Cloud Forms offers an easy
way to send data to 3rd party applications without capturing user data with the
use of Webhooks.
We can say
that XM Cloud Forms has the ability to facilitate the secure transmission of
data to third-party applications via webhooks
ü Ensuring user data is not captured
ü But
efficiently passed across various touchpoints.
We already
learned about Creating XM Cloud Forms, Defining Webhooks and Integrating
webhooks to Sitecore Connect.
Sitecore
Connect recipe action have several applications available to connect with
external systems like Sitecore Send, GraphQL, Slack, Gmail, Google Sheet etc.
Considering
a simple use case of capturing user details from a website.
Here, we
will see how the data filled in XM Cloud Form can be captured inside Google
Sheet using webhooks via Sitecore Connect.
So we
already have the recipe created from the last blog (Sitecore XM Cloudforms webhook integration via Sitecore Connect) to get XM Cloud form data inside Sitecore
Connect using webhook.
We will
extend the same recipe for this use case.
Access
Sitecore Connect, Open the same Recipe and click on Edit Recipe
Click on
the + icon to Add step or Action
Now we need to select from available Actions
- - Action in app
- - Recipe function
- - IF Condition
- - Repeat for each
- - Repeat while
- - Stop job
- - Handle errors
Here we will choose “Action in
app”
Now we need to Choose an app, we will search for “Google Sheets” here in the app list, and select it
Now we need to Choose an Action to be performed in the selected app.
We want to add a row inside Google Sheet when lead is
generated from website, so we will select “Add a row” action from the list
Connect to Google Sheets
Here we need to stablish a connection with google account
where the Google Sheet is added and we need to capture data in that sheet.
We can search for an existing connection or can create a new
connection here.
If we need to create a New connection, click on New Connection button
- - Provide Connection Name
- - Authentication type
- - Disable formula Yes/No
- - And click on Sign in with Google button
Here we need to provide email if and password for authentication and then it will ask us for the access to Workato, click continue.
And Allow your Google Account access to Workato, click Allow
Now the connection is established to Google Account.
We need to select
- - Google Drive
- - Spread sheet
- - Enforce top-left insert
- - Sheet
Note: Before making connection to
Google Sheet, the Sheet should have Column Header and One row inserted with
data in it.
We will see all the columns from the selected sheet
We need to map the columns from the payload to set data mapping, we can directly select and column and map it from the payload field in the Recipe data section
Likewise map all the column and fields and we are all set.
Now the last thing remain is to complete the Recipe by adding Stop job action.
Select the field - In job report, mark stopped job as – Successful or Failed
Now click on Test Recipe button from top middle
Click Test recipe button
Now the recipe is checking for a new trigger event, Go to XM cloud form, fill up
We can see the payload is generated, click on submit to send it to webhook
So the webhook is submitted successfully.
Now switch the sitecore Connect recipe and see the event was successful.
I hope this will help you!
Stay connected for more updates. We will see in the next blog - How we can
capture data in other Apps/ External system with some other use cases.
Thank you!
Comments
Post a Comment