https://github.com/suin/google-cloud-functions-email-router
A Google Cloud Function that routes EmailData
https://github.com/suin/google-cloud-functions-email-router
email-automation google-cloud-function google-cloud-pubsub
Last synced: about 1 year ago
JSON representation
A Google Cloud Function that routes EmailData
- Host: GitHub
- URL: https://github.com/suin/google-cloud-functions-email-router
- Owner: suin
- License: mit
- Created: 2020-07-24T13:11:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T12:20:56.000Z (over 3 years ago)
- Last Synced: 2025-01-22T18:51:48.154Z (over 1 year ago)
- Topics: email-automation, google-cloud-function, google-cloud-pubsub
- Language: TypeScript
- Homepage:
- Size: 3.33 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @suin/google-cloud-functions-email-router
## Setting Up
### Deploying The Stacks To Your GCP
```bash
./deploy.sh
```
## Test Drive
```bash
# Setting up
gcloud pubsub topics create 'test%40example.com'
gcloud pubsub subscriptions create --topic 'test%40example.com' testDrive
# Test
gcloud pubsub topics publish allEmail --message '{"correlationId":"dummy","data":{"to":[{"name":"","address":"test@example.com"}],"cc":[],"replyTo":[],"subject":"Test","from":[]}}'
gcloud pubsub subscriptions pull testDrive \
--format="flattened(ackId,message.messageId,message.publishTime,message.attributes,message.data.decode(base64).encode(utf-8))" \
--limit=10 \
--auto-ack
# Cleaning up
gcloud pubsub subscriptions delete testDrive
gcloud pubsub topics delete 'test%40example.com'
```