-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs/deploy cloud function as webhook #449
Conversation
✅ Deploy Preview for dlt-hub-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Should I change the Heading to "Deploy webhook on GCP Cloud Function", presently its too lengthy. @AstrakhantsevaAA @adrianbr |
@@ -0,0 +1,83 @@ | |||
# Deploy GCP cloud function as webhook for event ingestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this part?
---
title: Deploy GCP Cloud Function as a Webhook
description: Deploy GCP Cloud Function as a Webhook for event ingestion
keywords: [how to, deploy, gcp, cloud function, webhook]
---
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy GCP Cloud Function as a Webhook
this is my suggestion for a title
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This title is not visible to me and changed the title.
|
||
With this `dlt` google cloud event ingestion webhook, you can ingest the data and load it to the destination in real time as soon as a post request is triggered by the webhook. You can use this cloud function as an event ingestion webhook on various platforms such as Slack, Discord, Stripe, PayPal and any other as per your requirement. | ||
|
||
You can setup gcp cloud function webhook using `dlt` as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abbreviation should be capitalized : GCP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
8. In the requirements.txt file, specify the necessary packages: | ||
|
||
```python | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete please extra line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
pipeline.run(Event, table_name='webhook') #table_name can be customized | ||
|
||
return 'Event received and processed successfully.' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete please extra line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
9. Click on "Deploy" to complete the setup. | ||
|
||
> You can now use this cloud function as a webhook for event ingestion on various platforms such as Slack, Discord, Stripe, PayPal, and any other as per your requirement. Just remember to use the “Trigger URL” created by the cloud function when setting up the webhook. The Trigger URL can be found in the Trigger tab. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra tabulation (shift+tab)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
print('Message sent successfully.') | ||
else: | ||
print('Failed to send message. Error:', response.text) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra tabulation (shift+tab), whole code block except import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
## 2. **Monitor (and manually trigger) the webhook** | ||
|
||
1. To manually test the function you have created, you can send a manual POST request as a webhook using the following code: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need numeration. we have only one point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes done.
No description provided.