SendGrid로 연락처 동기화
Made by Twilio
SendGrid 마케팅 캠페인 연락처 목록과 동기화된 연락처 데이터의 Firestore 컬렉션을 유지합니다.
이 확장 프로그램의 작동 방식
Use this extension to add, update, or remove contacts from your SendGrid Marketing Campaigns contact list based on information added to a specified Cloud Firestore collection.
Adding a document triggers this extension to add a contact to the Marketing Campaigns contact list. Updating a document will update the contact's data and deleting the document will trigger its removal from the contact list in SendGrid.
Here's an example document that would trigger this extension:
admin.firestore().collection('contacts').add({
email: 'someone@example.com',
first_name: 'Bob',
last_name: 'Bobson'
});
In the document you can add any of the following fields to your document and they will be applied to your contact:
Field | type | |
---|---|---|
email
|
string | required |
alternate_emails
|
Array
|
|
first_name
|
string | |
last_name
|
string | |
address_line_1
|
string | |
address_line_2
|
string | |
city
|
string | |
postal_code
|
string | |
state_province_region
|
string | |
country
|
string | |
phone_number
|
string | |
whatsapp
|
string | |
line
|
string | |
facebook
|
string | |
unique_name
|
string | |
custom_fields
|
Map
|
custom_fields
must be defined within your SendGrid account and are a map of the custom field's ID to the content.
Additional setup
Before installing this extension, make sure:
- You have set up a Cloud Firestore database in your Firebase project
- You have signed up for a Twilio SendGrid Marketing Campaigns account
- You have created a SendGrid API Key with access to the Marketing APIs
Billing
To install an extension, your project must be on the Blaze (pay as you go) plan
- You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension (even if it is not used).
- This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service’s free tier:
- Cloud Firestore
- Cloud Functions (Node.js 10+ runtime. See FAQs )
- Cloud Secret Manager
Usage of this extension also requires you to have a Twilio SendGrid account and credentials in order to use the Twilio SendGrid API for marketing campaigns. You are responsible for any associated costs with your usage of Twilio SendGrid.
확장 프로그램 설치 방법
Firebase CLI 사용
Firebase CLI를 사용해 확장 프로그램을 설치하고 관리할 수도 있습니다.
1단계: 다음 npm 명령어를 실행하여 CLI를 설치하거나 최신 CLI 버전으로 업데이트합니다.
npm install -g firebase-tools작동하지 않는 경우 Firebase CLI 참조 를 살펴보거나 npm 권한 을 변경하세요.
2단계: 새 Firebase 프로젝트 디렉터리를 설정 하거나 기존 디렉터리로 이동합니다.
3단계: 다음을 실행하여 이 확장 프로그램을 확장 프로그램 매니페스트 에 추가합니다.
firebase ext:install twilio/sendgrid-sync-contacts --local --project=projectId_or_alias
Step 4 (Optional): Test this extension locally with the Firebase Emulator Suite
firebase emulators:start
5단계: 매니페스트의 확장 프로그램을 프로젝트에 배포 합니다.
firebase deploy --only extensions --project=projectId_or_alias