diff --git a/docs/3. Product Features/02. Speed Sends.md b/docs/3. Product Features/02. Speed Sends.md index 4de807235..d95dcf87c 100644 --- a/docs/3. Product Features/02. Speed Sends.md +++ b/docs/3. Product Features/02. Speed Sends.md @@ -1,12 +1,11 @@ -> ### **2 minutes read                                                                                                                         `Beginner`** +> ### **2 minutes read                                                                                                                         `Beginner`** Speed Sends is a functionality in Glific to create a message or save the messages and reuse it in future chats. ## Create Speed Sends -1. Create a Speed Sends message. Click on the `+CREATE SPEED SEND` button. - -SS SC1 +1. Create a Speed Sends message. Go to `Quick tools`, find `Speed Sends` click on `+Create` +Screenshot 2024-02-29 at 1 22 27 PM 2. Fill in the details of the Speed Sends message. @@ -18,7 +17,7 @@ Speed Sends is a functionality in Glific to create a message or save the message 1. Provide the URL of the message in the `Attachment URL` field. -SS SC2 +Screenshot 2024-02-29 at 1 14 01 PM diff --git a/docs/3. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md b/docs/3. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md index 1ab1be87a..0ceaf9dbd 100644 --- a/docs/3. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md +++ b/docs/3. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md @@ -1,4 +1,5 @@ -> ### **5 minute read                                                                                                                         `Advanced`** +> ### **10 minutes read                                                                                                                         `Intermediate`** + ___ ## Video Tutorial @@ -6,27 +7,24 @@ ___ + +_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_ ___ ## Add Readable Google Sheet 1 . Log in to your Glific account. -2 . Click on `Flows` from the left panel - -![image](https://user-images.githubusercontent.com/32592458/219550636-0748c911-8170-4cca-b4ba-f960ab51ec97.png) +2 . Click on `Flows` from the left panel and find `Google sheets` -3 . From the bottom of the `Flow` page. Click on `Google Sheet` link. +4 . Click on `+Create` button to add a sheet to read from -![image](https://user-images.githubusercontent.com/32592458/219550651-2b7ea8e7-cfa5-4353-bbce-bf95858dcf82.png) +Screenshot 2024-02-29 at 1 35 52 PM -4 . Click on `Add Sheet` button -![image](https://user-images.githubusercontent.com/32592458/219550669-89eb822d-8da1-4201-b3f6-bf8332e41f31.png) +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 -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. See **6** below for how to get the URL - -![image](https://user-images.githubusercontent.com/32592458/219550682-60dff177-319e-4024-a330-834b350fed7f.png) +Screenshot 2024-02-29 at 1 38 46 PM 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` @@ -40,11 +38,9 @@ ___ 7. Paste the copied URL in the Google Sheet Integration screen in Glific and click on `SAVE` button -![image](https://user-images.githubusercontent.com/32592458/219550739-65492d06-4c38-4d31-95e7-cec5f6b5004f.png) - 8. You can click on the link button to open the added sheet -![image](https://user-images.githubusercontent.com/32592458/219550770-2842aca1-6ee7-4c5d-affa-2e1fd3fdacc7.png) +Screenshot 2024-02-29 at 1 42 44 PM - `It is important to note that the first cell in the Sheet should be named as 'Key' for the Read function to work.` ___ @@ -53,23 +49,23 @@ ___ 9 . Create a new flow and open it for editing -![image](https://user-images.githubusercontent.com/32592458/219550788-7e8aa739-174e-44eb-845a-95f096e3fc3e.png) - 10. Use `link Google sheet` node -![image](https://user-images.githubusercontent.com/32592458/219550800-b41f6599-467c-4033-be8c-e5b3c62918d6.png) - -![image](https://user-images.githubusercontent.com/32592458/219550813-c43ee789-af23-48fd-8d4f-cbd59cc90f52.png) - 1. Select `Link google Sheet` 2. In the second drop-down select the sheet -3. In **Select row** add `@calendar.current_date` or any variable that uniquely defines the `Key` column of Google sheet +3. In `Select row` add any variable that uniquely defines the `Key` column of the linked Google sheet + +Screenshot 2024-02-29 at 1 47 48 PM + +_As per above example, the sheet `Daily Acitivity` is used to read the content from, and the variable `@calendar.current_date` being passed from Glific to the Google sheet is being used as the search key to identify the relevant row to send the content from_ + +4. Click on `OK` -Click on `OK` and use the column name like below and access the value of cell values. +5. Use column header like below and access the relevant column of the identified row. -`@results.sheet.message_1` +`@results.sheet.col_nameA` ![image](https://user-images.githubusercontent.com/32592458/219550825-82831f46-a239-4600-b95e-bf0533f0565b.png) ___ @@ -82,7 +78,8 @@ Let us dive in a bit deeper by looking at the steps involved : 1. Create the template messages that you'd like to send via Google Sheets using the normal method. Refer [Creating Template Messages](https://glific.github.io/docs/docs/Product%20Features/Templates/#hsm-template-creation--approval-submission) 2. Once the template is created, make note of the UUID of the template messages you need to share using Google Sheets. Refer the screenshot below : - Screenshot 2023-09-15 at 8 54 26 AM + +Screenshot 2024-02-29 at 1 58 09 PM 3. Create a Google Sheet with two headers, `Key` and `template_uuid` as shown below. Usually the `key` column will be having dates on which the individual templates need to be sent. Screenshot 2023-09-15 at 1 25 33 PM @@ -112,10 +109,12 @@ Let's dive in a bit deeper to see how it works. 2. Add the above created Google Sheet on the Glific. Please find the steps to do that [here](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Link%20Google%20Sheets/#add-readable-google-sheet) -3. Now create a sample `Interactive Message` with a list message (can do similarly for button options too). Only the first option needs to be entered as shown below with some sample data, as it will be rewrited by the values on the sheet- hence the rest of the options could be left empty. The idea is to fetch values for the options list dynamically from the sheet. -Screenshot 2023-09-19 at 11 04 36 AM +3. Now create a sample `Interactive Message` with a list message (can do similarly for button options too). +- Please note the first option needs to be entered as shown below with some sample data. This is to ensure the interactive message is created and saved. The list or options will be rewritten by the values on the sheet, hence the rest of the options could be left empty. + +Screenshot 2024-02-29 at 2 08 50 PM -3. Now since we have the Google Sheets linked & the interactive message created, let's create a sapmple flow to understand how it works : +3. Now since we have the Google Sheets linked & the interactive message created, let's create a sample flow to understand how it works : Screenshot 2023-09-19 at 11 51 38 AM 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 : @@ -153,29 +152,27 @@ As you can see on the preview above, the list of options we had given in the Goo 3. Select your project name as the service account and choose JSON as the key format. Download the generated JSON file containing the credentials. -4. Go to your Glific account, navigate to Settings, and select Google Sheet. +4. Go to your Glific account, click on `NGO main account`, click `Settings` and find the menu for `Google Sheet`. -Screenshot 2023-05-19 at 12 03 31 AM +Screenshot 2024-02-29 at 2 13 36 PM -Paste the service account credentials in the provided field, and click on the **Save** button. -Screenshot 2023-05-19 at 12 10 26 AM +Paste the service account credentials in the provided field, and click on the `Save` button. -### Link Writable Google Sheet in Glific -5. Go to the Google Sheet screen as mentioned in the above steps. +### Link Writable Google Sheet in Glific -![image](https://user-images.githubusercontent.com/32592458/219550651-2b7ea8e7-cfa5-4353-bbce-bf95858dcf82.png) +5. Go to the `Google Sheet` screen as mentioned in the above steps. -6. Click on the Add Sheet button. +6. Click on the `+Create` button to add a sheet to write to. +Screenshot 2024-02-29 at 1 35 52 PM -![image](https://user-images.githubusercontent.com/32592458/219550669-89eb822d-8da1-4201-b3f6-bf8332e41f31.png) -7. Add the Sheet URL and Name of the sheet you want to integrate. Check the `Write` checkbox and click on the Save button. Refer to *Step 8* below for instructions on how to get the URL. +7. Add the Sheet URL and Name of the sheet you want to integrate. Check the `Write` from drop down and click on the Save button. Refer the following steps to ensure the google sheet has right permission before you get the URL. -Screenshot 2023-05-18 at 11 17 01 PM +Screenshot 2024-02-29 at 2 19 43 PM -8. Open the Google Sheet you want to write data on and click on the share button on the right-hand side. Update the sheet permissions and add the Service Account Identifier (The client email on the service account) as a user invited in the spreadsheet's Collaboration Settings with `Editor` permission. +9. Open the Google Sheet you want to write data on and click on the share button on the right-hand side. Update the sheet permissions and add the Service Account Identifier (The client email on the service account) as a user invited in the spreadsheet's Collaboration Settings with `Editor` permission. Screenshot 2023-05-18 at 11 23 49 PM @@ -184,11 +181,8 @@ Paste the service account credentials in the provided field, and click on the ** Screenshot 2023-05-18 at 11 22 26 PM 10. Paste the copied URL in the Google Sheet Integration screen in Glific and click on the `SAVE` button. -Screenshot 2023-05-18 at 11 27 28 PM - -11. You can click on the link button to open the added sheet. -Screenshot 2023-05-18 at 11 40 48 PM +Screenshot 2024-02-29 at 2 21 32 PM ### Configuring Writable Google Sheet in the Flow @@ -201,28 +195,25 @@ Paste the service account credentials in the provided field, and click on the ** 13. Here's how the imported flow would look like -Screenshot 2023-05-18 at 11 43 21 PM - -14. The first node is the `Send Message` node, which asks the contact for input to be added to the sheet. +Screenshot 2024-02-29 at 2 40 13 PM -Screenshot 2023-05-18 at 11 45 13 PM -15. The second node is the `Wait for Response` node with the result name sheet_input. The response from the contact will be saved in this result and can be referenced as @results.sheet_input. +14. The first node is the `Send Message` node, which asks the contact for input to be added to the sheet. -Screenshot 2023-05-18 at 11 45 36 PM +15. The second node is the `Wait for Response` node with the result name sheet_input. The response from the contact will be saved in this result and can be referenced as `@results.sheet_input`. 16. The third node is the `Link Google sheet` node, used to add the user-entered text into the Google sheet. Click on this node to configure it. -Screenshot 2023-05-18 at 11 51 07 PM - +Screenshot 2024-02-29 at 2 34 22 PM -17. Under Action, select **Write** from the dropdown menu. +17. Under Action, select `Write` from the dropdown menu. ![Screenshot6](https://github.com/glific/docs/assets/130072273/9a29141e-8a68-49f1-91d2-ae5a19e895f5) -18. Select the sheet from the dropdown that was added in *Step 7* above i.e. Sample Sheet +18. Select the sheet from the dropdown that was added in step above i.e. Sample Sheet + -Screenshot 2023-05-18 at 11 51 58 PM +Screenshot 2024-02-29 at 2 35 02 PM 19. Specify the Sheet range from which you would like to enter the data in the Google sheet. For example, Sheet1!A10:D will add data from row 10 of column A in subsheet Sheet1 up to column D. This means that four data values will be added in 20. @@ -231,19 +222,20 @@ Paste the service account credentials in the provided field, and click on the ** 20. Enter the data to be written in the Google sheet under Input data to update in sheet. You can use values like @results.sheet_input, @contact.name, @contact.fields.age, etc. -Screenshot 2023-05-18 at 11 54 24 PM -21. After configuring the flow, click on the Preview button located on the bottom right side of the screen to run the flow in the simulator. -Screenshot 2023-05-18 at 11 59 10 PM +Screenshot 2024-02-29 at 2 35 43 PM + +21. After configuring the flow, click on the `Preview` button located on the top right side of the screen to run the flow in the simulator. + +23. In the simulator, you will see the first message from the `Send Message` node, which prompts you to enter text. -22. In the simulator, you will see the first message from the `Send Message` node, which prompts you to enter text. +24. Type the desired text that you want to see in the sheet, and then press Enter. -23. Type the desired text that you want to see in the sheet, and then press Enter. -Screenshot 2023-05-18 at 11 56 48 PM +Screenshot 2024-02-29 at 2 36 46 PM -24. This will move the flow forward, and the data will be written to the Google Sheet. +25. This will move the flow forward, and the data will be written to the Google Sheet. -25. Open the Google Sheet to check the newly inserted data. +26. Open the Google Sheet to check the newly inserted data. Screenshot 2023-05-18 at 11 58 31 PM ___