Skip to content

Commit 3da8c44

Browse files
authored
Merge pull request #601 from dylanfrankcom/main
Clarify Google Sheets setup instructions
2 parents c5bccee + 1851d31 commit 3da8c44

File tree

2 files changed

+61
-41
lines changed

2 files changed

+61
-41
lines changed

google-sheets/.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# description: A JSON key file for your Google Sheets service account
2-
# format: file(json)
1+
# description: The path to your Google Service account authentication JSON key file. Enter /auth.json. After deploying your application, select "Go to live application" for additional configuration steps.
2+
# format: text
33
# contentKey: GOOGLE_CREDENTIALS_CONTENT
44
# link: https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys
55
# required: true
@@ -10,7 +10,7 @@ GOOGLE_CREDENTIALS=/auth.json
1010
# required: true
1111
DOCUMENT_ID=
1212

13-
# description: The spreadsheet name to log to within your Google Sheets document
13+
# description: The sheet name to log to within your Google Sheets document
1414
# format: text
1515
# required: true
1616
SHEET_NAME=Sheet1

google-sheets/assets/index.html

Lines changed: 58 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,30 @@ <h1>
6868
</div>
6969
</h1>
7070
<section>
71-
<h2>Get started with your application</h2>
71+
<h2>Configuring your application</h2>
72+
<h3>Adding your Google Service account authentication JSON file:</h3>
73+
<p>
74+
Before you can use this application, you need to provide your Google Service account authentication JSON file.
75+
This file contains the credentials needed to access your Google Sheets document.
76+
Follow these steps to add your authentication JSON file to your application:
77+
</p>
78+
<ol class="steps">
79+
<li>Select <b>Edit this application</b> below to open the Functions and Assets Editor.</li>
80+
<li>Under <b>Assets</b>, select the <b>/auth.json</b> file.</li>
81+
<li>Paste the contents of your Google Service account authentication JSON key file into the <b>/auth.json</b> file.</li>
82+
<li>Select <b>Save</b>.</li>
83+
<li>Select <b>Deploy all</b> to redeploy your application.</li>
84+
</ol>
7285
<p>
73-
Follow these steps to try out your new app:
86+
For more information on how to obtain your authentication JSON file, refer to the
87+
<a href="https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys"
88+
target="_blank" rel="noopener">
89+
Google Cloud documentation</a>.
7490
</p>
91+
</section>
92+
<section>
93+
<h2>Get started with your application</h2>
94+
<h3>Follow these steps to try out your new app:</h3>
7595
<p>
7696
This app automatically logs text messages sent to your Twilio phone number into the
7797
specified Google Sheets document.
@@ -82,16 +102,14 @@ <h2>Get started with your application</h2>
82102
target="_blank" rel="noopener">
83103
the Google Sheets API setting in your Google Cloud Console
84104
</a>
85-
and ensure it's enabled
105+
and ensure it's enabled.
86106
</li>
87107
<li>Open the Google Sheets document whose ID you configured for use with this app.</li>
88108
<li>
89109
Click the <b>Share</b> button in the toolbar of your Google Sheets document, enter the
90110
<a href="https://console.cloud.google.com/iam-admin/serviceaccounts"
91111
target="_blank" rel="noopener">
92-
email address belonging to your service account
93-
</a>, and press Enter to give your service account access to your Google Sheets
94-
document.
112+
email address belonging to your service account</a> and press <b>Enter</b> to give your service account access to your Google Sheets document.
95113
</li>
96114
<li>Text your Twilio phone number with a message.</li>
97115
<li>
@@ -100,45 +118,47 @@ <h2>Get started with your application</h2>
100118
</li>
101119
</ol>
102120
</section>
103-
104121
<section>
105122
<!-- APP_INFO_V2 -->
106123
</section>
107124
<section>
108125
<h2>Troubleshooting</h2>
109-
<ul>
110-
<p>
111-
<li>
112-
Verify your Google Sheets configuration:
113-
<div id="check-status">
114-
<button onclick="showGoogleSheetsStatus()">Verify Configuration</button>
115-
<span id="status-message"></span>
116-
</div>
117-
If the above check reveals problems, edit this function's <code>.env</code> file via the <code>Edit This Code</code> button above, if available, and ensure that all values are correct.
118-
</li>
119-
</p>
120-
<p>
121-
If you see "Google Sheets integration error: The caller does not have permission" in your
122-
Twilio console debugger, ensure you have shared your Google Sheets document with the email
126+
<h3>Verify your Google Sheets configuration</h3>
127+
<p>
128+
Use the <b>Verify Configuration</b> button below to test your Google Sheets configuration.
129+
</p>
130+
<div id="check-status">
131+
<button onclick="showGoogleSheetsStatus()">Verify Configuration</button>
132+
<span id="status-message"></span>
133+
</div>
134+
<p>
135+
If you encounter configuration issues, edit this function's <code>.env</code> file via the <b>Edit this application</b> button above, if available, and ensure that all values are correct. Some common error messages include:
136+
</p>
137+
<ul style="list-style-type: circle;">
138+
<li>
139+
<code>Google Sheets integration error: The caller does not have permission</code>: ensure you have shared your Google Sheets document with the email
123140
address associated with your Service Account.
124-
</p>
125-
<p>
126-
<li>
127-
Check the
128-
<a href="https://www.twilio.com/console/phone-numbers/incoming"
129-
target="_blank"
130-
rel="noopener">
131-
phone number configuration
132-
</a>
133-
and make sure the Twilio phone number you want for your app has a SMS webhook
134-
configured to point at the following URL
135-
<form>
136-
<label for="twilio-webhook">Webhook URL</label>
137-
<input type="text" id="twilio-webhook" class="function-root" readonly=true value="/google-sheets">
138-
</form>
139-
</li>
140-
</p>
141+
</li>
142+
<li>
143+
<code>Google Sheets integration error. Please check the debugger in your Twilio Console</code>: ensure that you have entered the name of the <b>Sheet</b> within the Google Sheet document in the <code>SHEET_NAME</code> environment variable.
144+
</li>
141145
</ul>
146+
<p>
147+
If you continue to experience issues, please refer to the debugger in your Twilio Console.
148+
<h3>Verify SMS Webhook Configuration</h3>
149+
<p>
150+
Check the
151+
<a href="https://www.twilio.com/console/phone-numbers/incoming"
152+
target="_blank"
153+
rel="noopener">
154+
phone number configuration
155+
</a>
156+
and make sure the Twilio phone number you want for your app has a SMS webhook configured to point at the following URL:
157+
<form>
158+
<label for="twilio-webhook">Webhook URL</label>
159+
<input type="text" id="twilio-webhook" class="function-root" readonly=true value="/google-sheets">
160+
</form>
161+
</p>
142162
</section>
143163
</div>
144164
</main>

0 commit comments

Comments
 (0)