Can you send custom event properties to Amplitude via SendGrid?

  • 10 August 2022
  • 4 replies
  • 57 views

I’m aware that you can send the amp_user_id field to SendGrid, to identify a user that’s engaging w/ an email with an ID other than the email, but I want to send other event properties through the SendGrid event that gets sent to Amplitude via the integration.

 

I can’t seem to find any documentation on Amplitude or SendGrid that mentions if you can add on custom  event properties in addition to the ones that are generated by SendGrid automatically.

 

Can you just send it via the `custom_args` listed in the SendGrid docs here https://docs.sendgrid.com/for-developers/tracking-events/event#event-objects and Amplitude will recognize it?


4 replies

Userlevel 4
Badge +6

Hi @amanda.post - great question! I think this may be a feature request, but please allow me to double check on this internally, and I’ll get back to you.

Userlevel 4
Badge +6

Hi @amanda.post - I’m still waiting to hear back from our integrations team. I hope to be in touch asap!

Userlevel 4
Badge +6

Hi @amanda.post - apologies for the delay here & appreciate your patience!

Amplitude’s Engineering team tested sending custom_args into the events, and it seems like it should be included successfully! Below is the payload & sample response --

{

  "api_key": "{{API_KEY}}",

  "events": [

    {

      "event_id": 699816350,

      "event_properties": {

        "attempt": "1",

        "custom_args": {

          "user_id": {{USER_ID}},

          "sample_data": "Hello World"

        },

        "email_category": "SPACE CONTENT ADDEDD",

        "response": "Email was deferred due to the following reason(s): [IPs were throttled by recipient server]",

        "sg_message_id": "GumQWe0iSSeZbNh_Gjg-pQ.filterdrecv-5766dd8c75-qzh67-1-627D17DF-90.0",

        "smtp-id": "<GumQWe0iSSeZbNh_Gjg-pQ@geopod-ismtpd-5-0>",

        "tls": 0

      },

      "event_type": "[Sendgrid] deferred",

      "user_id": "{{USER_ID}}"

    }

  ]

}

-----

{

    "code": 200,

    "server_upload_time": 1661189475680,

    "payload_size_bytes": 21087,

    "events_ingested": 1

}

@jmagg Thanks so much for looking into that. We will give it a try on our end. :)

Reply