Solved

Send email with dynamic content to specific user via the API


Badge +1

I am aware that this question has been asked several times, but none of the answers I have found have been able to find satisfy my own requirements.

I have a 3rd party integration that requires the ability to send an email to a specific user. The email must contain a link with a dynamic key for the user.

Unfortunately, it seems like the Render and send-api endpoint has been deprecated. The documentation says we should instead look into “metric-triggered flow, then send one or more Track API calls”. However, a metric-triggered flow doesn’t seem to satisfy my requirements as I’m only able to choose triggers based on transactional events in our Shopify integration. The email I want to send should be conditionally triggered based on information from our 3rd party integration, which is unknown to Shopify or Klaviyo at this point.

 

I found a post from 8 months ago saying that this functionality is simply not supported. Is this still the case? 

 

icon

Best answer by David To 6 May 2022, 22:10

View original

4 replies

Userlevel 7
Badge +60

Hello @Lasse,

Welcome to the Klaviyo Community!

From your scenario it does sound like using a metric-triggered flow would achieve your goal. Does this third-party tool happen to have an integration with Klaviyo or have you created a custom integration for this tool to send events to Klaviyo using our Track API? 

I believe the misunderstanding here with not finding an appropriate flow trigger you want to use is that the third-party tool may not be connected to your Klaviyo account and/or it’s not sending any events/data to Klaviyo yet. You would not be able to act on data that is not already recorded or shared with Klaviyo. This means even if you did already set up your own custom integration to connect this third-party tool with Klaviyo, if there hasn’t been any events or data recorded in Klaviyo from this tool, you wouldn’t see this event as an available trigger when creating your flow. For this reason, it’s typically common to manually text your custom integration in order to record an event in Klaviyo. 

Additionally, if you were testing your own custom integration, but aren’t seeing an event recorded, you may want to review how your custom integration is set up with your developer. I would also suggest taking a look at some of our additional resources on creating and passing your own custom events to Klaviyo using our Track API from the resources below:

 

I hope this helps!

David

Badge +1

So to summarize, the process for sending an email to a specific user with a dynamic string from a platform without a built-in Klaviyo integration would be:

  1. Manually send a track API event to Klaviyo
  2. Set up a Klaviyo flow with a trigger pointing to the event from step 1 (only possible after step 1 has been triggered)
  3. Include a wild-card in the email template
  4. Set up a trigger on our 3rd-party integration which sends the same track API event as in step #1 with the dynamic string and the requested user as a payload
  5. Klaviyo’s flow triggers, populates the template with the dynamic string and sends an email to the requested user

Have I understood the process correctly?

Userlevel 7
Badge +60

Hey @Lasse,

Yup! The process you’ve outlined is commonly how most people trigger flows and send emails based on custom events. 

David

Badge +1

I see. Thank you very much!
I’ll try and make it work. And if it doesn’t, we’ll just have to also integrate with a transactional email service.

Reply