You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<td style={{ paddingLeft: '40px' }}><b>Last Updated: October 2025</b></td>
7
+
</tr>
8
+
</table>
9
+
</h3>
2
10
3
-
___
11
+
**The Link Google Sheets action allows you to connect your flows in Glific directly to Google Sheets so you can read, write, and update data in real time.**
4
12
5
-
##Video Tutorial
13
+
### When to use Read from Google Sheet
6
14
15
+
**Use this when you need to:**
7
16
8
-
<iframewidth="800"height="500"src="https://www.youtube.com/embed/tdFPJg1aLXU"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"allowfullscreen></iframe>
17
+
- Send reminders, schedules, or event details stored in a central sheet.
9
18
19
+
- Populate lists or menus dynamically from sheet data.
20
+
21
+
### How to set Google Sheet:
22
+
23
+
- Google Sheets API is linked with Glific.
24
+
25
+
- The service account has Viewer or Editor access to the sheet.
26
+
27
+
- The sheet is shared with the service account email.
10
28
11
-
_Please note: Glific has a new UI, so the visuals from the video will not match the present UI, but the functionality and buttons will remain the same_
12
-
___
13
29
14
30
## Add Readable Google Sheet
15
31
16
-
1. Log in to your Glific account.
32
+
1. Log in to your Glific account.
17
33
18
-
2. Click on `Flows` from the left panel and find `Google sheets`
34
+
2. Click on `Flows` from the left panel and find `Google sheets`
19
35
20
-
4 . Click on `+Create` button to add a sheet to read from
36
+
3. Click on `+Create` button to add a sheet to read from
21
37
22
38
<imgwidth="1468"alt="Screenshot 2024-02-29 at 1 35 52 PM"src="https://github.com/glific/docs/assets/141305477/d0605089-b71e-41ba-85c2-593dabf49b40" />
23
39
24
-
25
-
5 . Add the `Sheet URL` and `Name` of the sheet which you want to integrate. Check the `Read` checkbox and Click on the`Save` button. Follow next steps to get the URL
40
+
4. Add the `Sheet URL` and `Name` of the sheet which you want to integrate. Check the `Read` checkbox and Click on the`Save` button. Follow next steps to get the URL
26
41
27
42
<imgwidth="413"alt="Screenshot 2024-02-29 at 1 38 46 PM"src="https://github.com/glific/docs/assets/141305477/2612f184-eb99-4e02-aca9-6b4c1adbec16"/>
28
43
29
-
6. Open the Google sheet and click on share button on the right hand side to update the sheet permission to at least `Anyone with the link` can `View`
44
+
5. Open the Google sheet and click on share button on the right hand side to update the sheet permission to at least `Anyone with the link` can `View`
<imgwidth="1298"alt="Screenshot 2024-02-29 at 1 42 44 PM"src="https://github.com/glific/docs/assets/141305477/1a1d5fcf-5d18-4ffe-bfa8-22f0ffabc5d3" />
44
59
45
60
-`It is important to note that the first cell in the Sheet should be named as 'Key' for the Read function to work.`
46
-
___
61
+
62
+
63
+
**Examples**
64
+
65
+
- Daily Reminders: Match today’s date to a schedule column and send the corresponding message.
66
+
67
+
- User Lookup: Pull registration details based on phone number or ID.
68
+
69
+
- Dynamic Menu: Read items from a sheet and send them as interactive list options.
70
+
71
+
72
+
### Why to use Write Mode of Google Sheet
73
+
74
+
Write Mode lets you send data from WhatsApp conversations directly into Google Sheets, removing the need for manual entry and ensuring immediate updates.
75
+
76
+
### When to use Write Mode
77
+
78
+
- Use this when you need to:
79
+
- Record survey answers in real time.
80
+
- Collect event registrations or sign-ups
81
+
- Track responses, feedback, or status updates.
82
+
83
+
47
84
48
85
## Configuring Readable Google Sheet in the Flow
49
86
50
-
9 . Create a new flow and open it for editing
87
+
1 . Create a new flow and open it for editing
51
88
52
-
10. Use `link Google sheet` node
89
+
2. Use `link Google sheet` node
53
90
54
-
1. Select `Link google Sheet`
91
+
3. Select `Link google Sheet`
55
92
56
-
2. In the second drop-down select the sheet
93
+
4. In the second drop-down select the sheet
57
94
58
-
3. In `Select row` add any variable that uniquely defines the `Key` column of the linked Google sheet
95
+
5. In `Select row` add any variable that uniquely defines the `Key` column of the linked Google sheet
59
96
60
97
<imgwidth="505"alt="Screenshot 2024-02-29 at 1 47 48 PM"src="https://github.com/glific/docs/assets/141305477/f15cce2a-7882-4f83-901e-48b7d7bba09d" />
61
98
@@ -68,13 +105,23 @@ These all are the below calendar functions that can be used :
68
105
To write date and time, use the following expression:
- Survey Submission: Write answers to a new row for each participant.
120
+
- Registration Forms: Save participant name, contact number, and event preferences.
121
+
- Attendance Logs: Record check-ins directly into the sheet.
122
+
123
+
124
+
78
125
___
79
126
80
127
## Send template messages using Google Sheets
@@ -96,9 +143,9 @@ Let us dive in a bit deeper by looking at the steps involved :
96
143
97
144
As you can see, the row input field is given an expression `@calendar.current_date` which tries to match the current date value with a `Key` value. If a match is found, then that row is chosen.
98
145
99
-
5. In the next step, `Send contact a message` is used and an expression is given in place of the template selection drop-down. The expression reads `<%= Glific.send_template("{uuid}", ["{variables}"]) %>`
146
+
5. In the next step, `Send contact a message` is used and an expression is given in place of the template selection drop-down. The expression reads `<%= Glific.send_template("@results.sheet.template_uuid", ["@contact.name"] ) %>` and if no variables then `<%= Glific.send_template("@results.sheet.template_uuid", [] ) %>`
100
147
101
-

148
+
102
149
103
150
In this expression, the `template_uuid` matching the row in the given date gets send to the user. The expression also passes the value of the contact's name. You can pass multiple variables in this expression, if the template message demands it, using comma separation.
104
151
@@ -121,18 +168,18 @@ Let's dive in a bit deeper to see how it works.
121
168
122
169
<imgwidth="1294"alt="Screenshot 2024-02-29 at 2 08 50 PM"src="https://github.com/glific/docs/assets/141305477/e5c8b2b4-c33f-4360-9f6d-ff14a76c12f3"/>
123
170
124
-
3. Now since we have the Google Sheets linked & the interactive message created, let's create a sample flow to understand how it works :
171
+
4. Now since we have the Google Sheets linked & the interactive message created, let's create a sample flow to understand how it works :
125
172
<imgwidth="738"alt="Screenshot 2023-09-19 at 11 51 38 AM"src="https://user-images.githubusercontent.com/132430123/268859289-c3af33c5-8bc2-4eb0-96ff-d2d8aa4cba01.png"/>
126
173
127
-
4. As you can see, the flow starts with a Link Google Sheets node, where the readable google sheets from which the options to be fetched inside the interactive message is added. This is how the Google Sheets node is configured :
174
+
5. As you can see, the flow starts with a Link Google Sheets node, where the readable google sheets from which the options to be fetched inside the interactive message is added. This is how the Google Sheets node is configured :
128
175
<imgwidth="628"alt="Screenshot 2023-09-19 at 11 53 27 AM"src="https://user-images.githubusercontent.com/132430123/268859658-2780aa59-e56c-4b7d-aecf-9b55ff47496e.png"/>
129
176
130
177
- In the node above, the sheet we created have been linked & the corresponding action is marked as `Read` since the options for `Interactive Message` are being read from the Google Sheets.
131
178
- Here 1 is added in `Select row` field, as the values for the interactive message are present on the row with the key value as 1 and it is stored under the variable name `sheet`
132
179
- Instead of 1, you can also use dynamic values like [flow variables or contact variables](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Variables/Flow%20variables%20vs%20Contact%20variables), functions like @calendar.current_date etc.
133
180
134
181
135
-
5. The next node consists of `Send contact an interactive message` node and this is how it is configured
182
+
6. The next node consists of `Send contact an interactive message` node and this is how it is configured
136
183
<imgwidth="611"alt="Screenshot 2023-09-19 at 2 14 22 PM"src="https://user-images.githubusercontent.com/132430123/268894962-90c136b4-3775-426d-9962-269e7407feba.png"/>
137
184
138
185
- The interactive message we've created is chosen from the dropdown.
@@ -141,7 +188,7 @@ Let's dive in a bit deeper to see how it works.
141
188
- The `id` and `variable` values need to be filled. The id could be any unique value for referencing & variable value is being fetched from the linked Google Sheet.
142
189
- The variable names are filled as `@results.sheet.course1`, `@results.sheet.course2` and so on representing each row value from the row we've chosen to read from.
143
190
144
-
6. Now since the flow is configured, let's test the flow
191
+
7. Now since the flow is configured, let's test the flow
145
192
<imgwidth="286"alt="Screenshot 2023-09-19 at 12 07 16 PM"src="https://user-images.githubusercontent.com/132430123/268862637-8919962e-840e-47dd-9865-919dd902b483.png"/>
146
193
147
194
As you can see on the preview above, the list of options we had given in the Google Sheets are shown as a list of options inside the Interactive Message.
0 commit comments