Sendgrid Event Webhook sends fake emails response and not real data - node.js

I have created a post api and did put that post api inside the event webhook settings of sendgrid. But when i enabled it and check the json response on my api in local, i am getting fake messages and not real data.
Anyone know whats the reason. I checked their documentation, it is not telling anything else.
Source of information : https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook/

If you are using event webhook according to above documentation in the question. You wont get the real data as for testing purpose sendgrid sends that data from your account. Instead try implementing the API. Then you will get the real response as it would contain your sendgrid api key.

Related

How to reply a custom header using a webhook triggered by an API

I need to know what am I doing wrong with my integration. I will explain first our main goal.
We need to detect new synced projects or created projects on Everhour API using a webhook.
Use that webhook to trigger automation on Zapier and do other APIs we need to do.
The process of creating a webhook using their API is like this:
Use the create a webhook endpoint ( link )
Pass the custom webhook(I created on Pipedream with custom header)
The Everhour API requirements say that I need to reply back a custom header of "X-Hook-Secret ":
So far I have created a webhook on Pipedream which you can create a custom header response see reference here:
This is the request body from the Everhour API to create a webhook, I passed in the Pipedream's custom webhook created.
Now, the problem is when I create a new project on Everhour the webhook doesn't get triggered. I don't know if it's because of the custom webhook from Pipedream that I miss something or else others.
Any useful tips will be a huge help.

Not Receiving SMS in Twilio

I need to fetch SMS Response sent from Twilio using web hook using Twilio trial account credentials. In that, generated number is from US. And sms is sending from India number. And when message is sent back to Twilio that is not shows in incoming messages and not call the webhook url also.
I created app in twiml. And set webhook url in that also. But doesn't work.
For web hook I am using ngrok so in my local server so I can get data.
Any one have idea what is wrong I am doing.
EDITED
I have created testing twilio account. Generated number and the generated number is from US. I have set up webhook url in manage numbers.
URL is generated from ngrok so It can be used outside my network.
I have setup Twiml App also. And webhook url is also set there.
I am sending one programmable message from my node api. And that was working fine. User is getting programmable message but when user reply to that message it should call my webhook url. But it not calling my webhook url and also it not showing in my incoming message.
Thanks for any help.
For those who are struggling with this,
As of now Twilio not supports 2-way messaging in India.
Please refer this for more details.
Twilio Guidelines for India

Edit request in js before sending it to fullfillment endpoint

I need to edit request before sending it to endpoint.
Using Web Demo integration I'm able to send request to the endpoint.
But I can't edit the request in order to provide some extra data to request. Extra data is stored in localStorage so I need to do this in javascript.
I've already connected the agent to an endpoint that handle the request using fullfillment. The problem is that request misses data I can retrieve only from the browser. From fullfillment I can set headers and basic auth but statically and it is not enough.
So I need to add a step in request building/sending:
User write or tell something to embedded chat (Web Demo integration)
Dialogflow recognize intent, params, generate the request.
Additional step: Update the request in javascript
Forward cutomized request to the endpoint
Maybe it's not possible using Web Demo integration. In Documentation can't find a way to just send string or audio in order to receive the generated request.
First of all you will need a custom chat integration, not the default Dialogflow one. Something like Smooch or Kommunicate. The default web demo should only be used for testing your bot. There is NO way you would want to use that in a production environment.
I would save whatever is in the local storage in a database such as Firestore. Once that data is in the database you can use it to modify your request in your fulfillment.
So what I would do:
Have a way to identify a user and save its local storage to the database (as soon as someone clicks on your chat window or opens the chat window)
Once an intent is triggered you check which user is contacting you (through the way that you identified the user) and get all data from the database
Request the data in your fulfillment server
There is no other way in which this is possible. You can't change requests before your query hits Dialogflow.

Configure Alert Mail (SendGrid) in Azure using Webhook

I have an Alert configured to my app service. Consider I have server down check alert.
Whenever the alert gets triggered , I want the mail to be delivered to our mailbox with sufficient details. To achieve this, Iam directly calling the sendgrid api from Azure Alert Webhook. Im able to send mail with hardcoded data. I would want to utilise the details , Azure Alert possess, to include in the mail.
Webhook url is as follow:
https://api.sendgrid.com/api/mail.send.json?api_user=********&api_key=****&to=*****&toname=*&subject=&text=#workspaceid%20#applicationid&from=**
"#workspaceid" is a parameter of json that is being sent.
However the approach does not work.
I would like to have entire json content that is initiated by Azure alerts to be included in mail body.
The JSON payload send by the alert needs to be parsed, somehow, and sent onwards to SendGrid. I haven't found any way to do this elegantly, so that you could just call a parameter from the JSON and pass it along the mail call.
However, there are still way we could build this :)
Microsoft Flow
Using a flow we can trigger it from a HTTP request and have it parse the input. Once the input is parsed we can get the relevant parameters and form the SendGrid URL for sending the email.
This approach is a bit more involved but it opens a lot more doors for setting up all kinds of logic an alert could trigger.
See this link for how to create a flow triggered from a HTTP request.

Not receiving event notification from DocuSign API

I am using the DocuSign Rest API v2. During envelope creation process, we will send our rest API URL to receive the notifications.
The events are properly receiving in our live setup. But in our local development setup we are not receiving the notifications.
For this, we have whitelisted the IP ranges mentioned in the DocuSign Page on our side.
https://trust.docusign.com/en-us/trust-certifications/ip-ranges/
But still, we are not receiving notifications to the development setup.
What else we need to do to get this done?
Unfortunately I'm unable to respond to the original post, however I've experienced the same issue (reported here). It only appears to occur when envelopes are sent as far as I can tell, and I'm able to retrieve the status afterwards - but it's not in line with what the API guide tells us, nor what was happening previously.

Resources