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 it 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
@@ -43,19 +59,41 @@ ___
43
59
<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
60
45
61
-`It is important to note that the first cell in the Sheet should be named as 'Key' for the Read function to work.`
46
-
___
62
+
63
+
64
+
**Examples**
65
+
66
+
- Daily Reminders: Match today’s date to a schedule column and send the corresponding message.
67
+
68
+
- User Lookup: Pull registration details based on phone number or ID.
69
+
70
+
- Dynamic Menu: Read items from a sheet and send them as interactive list options.
71
+
72
+
73
+
### Why to use Write Mode of Google Sheet
74
+
75
+
Write Mode lets you send data from WhatsApp conversations directly into Google Sheets, removing the need for manual entry and ensuring immediate updates.
76
+
77
+
### When to use Write Mode
78
+
79
+
- Use this when you need to:
80
+
- Record survey answers in real time.
81
+
- Collect event registrations or sign-ups
82
+
- Track responses, feedback, or status updates.
83
+
84
+
47
85
48
86
## Configuring Readable Google Sheet in the Flow
49
87
50
-
9 . Create a new flow and open it for editing
88
+
1 . Create a new flow and open it for editing
51
89
52
-
10. Use `link Google sheet` node
90
+
2. Use `link Google sheet` node
53
91
54
-
1. Select `Link google Sheet`
92
+
3. Select `Link google Sheet`
55
93
56
-
2. In the second drop-down select the sheet
94
+
4. In the second drop-down select the sheet
57
95
58
-
3. In `Select row` add any variable that uniquely defines the `Key` column of the linked Google sheet
96
+
5. In `Select row` add any variable that uniquely defines the `Key` column of the linked Google sheet
59
97
60
98
<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
99
@@ -68,13 +106,23 @@ These all are the below calendar functions that can be used :
68
106
To write date and time, use the following expression:
- Survey Submission: Write answers to a new row for each participant.
121
+
- Registration Forms: Save participant name, contact number, and event preferences.
122
+
- Attendance Logs: Record check-ins directly into the sheet.
123
+
124
+
125
+
78
126
___
79
127
80
128
## Send template messages using Google Sheets
@@ -96,9 +144,9 @@ Let us dive in a bit deeper by looking at the steps involved :
96
144
97
145
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
146
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}"]) %>`
147
+
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
148
101
-

149
+
102
150
103
151
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
152
@@ -121,18 +169,18 @@ Let's dive in a bit deeper to see how it works.
121
169
122
170
<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
171
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 :
172
+
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
173
<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
174
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 :
175
+
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
176
<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
177
130
178
- 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
179
- 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
180
- 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
181
134
182
135
-
5. The next node consists of `Send contact an interactive message` node and this is how it is configured
183
+
6. The next node consists of `Send contact an interactive message` node and this is how it is configured
136
184
<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
185
138
186
- The interactive message we've created is chosen from the dropdown.
@@ -141,7 +189,7 @@ Let's dive in a bit deeper to see how it works.
141
189
- 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
190
- 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
191
144
-
6. Now since the flow is configured, let's test the flow
192
+
7. Now since the flow is configured, let's test the flow
145
193
<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
194
147
195
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