Question

Adding a user to a list by API (v2) is NOT triggering the flow. How do i do this?

  • 10 January 2022
  • 2 replies
  • 34 views

Badge

Hi. I have written a little php script using cURL and the v2 Klaviyo API to simply ADD a new user / profile to a given list i have set up on Klaviyo.

I was HOPING that this would trigger a flow rule i have on klaviyo (when someone is added to this list trigger this email flow), but no luck.

I think (im just guessing), that adding by API is not the same as triggering by a user subscribing (like via shopify integration or something)... just adding them to my list doesn't trigger the flow.

 

So i'm wondering if it's because i should be using the TRACK api versus the RESTful v2 api? I've reached the end of my knowledge and ability, so turning to the API-Experienced-Devs here :)

DEVS-Do you know what's going on here? If so how can you help?

Thanks.
Tom.

see attached screenshots.
1. simple code im using to test api >> fake user gets onto klaviyo list from this curl. GREAT
2. klaviyo screenshot showing user was created on that list. GREAT
3. the flow rule that never gets triggered: NOT GREAT :(

 


2 replies

Userlevel 5
Badge +30

Hi there @TomBot2000,

Welcome to the Community! I hope I can help provide some info that leads you to a solution.

If I'm understanding correctly, you're wanting to use our API to trigger a Flow in your account for a number of profiles. We don't currently have an API that would accomplish triggering any Flow from the start for a profile. Instead, you would need to have the respective profile trigger the Flow naturally to start going through it.
If you were wanting to trigger a List-Triggered Flow, you could use our List API V2 endpoint to subscribe profiles to your List. Alternatively, if you were wanting to trigger a Metric-Triggered Flow based on a custom metric you set up, you would be able to build your metric using our Track API: Track and Identify API Reference.

Hope this cleared things up!
Alex
 

Badge

hi @alex.hong  and thank you for the reply.

Unfortunately that is not the issue. In face i am successuflly and simply able to use the subscribe endpoint (list api v2) … no issues!

 

I post to the correct list with the list_id and authenticate with my key, no issues. 

 

from my server side PHP script i am able to submit an email address / create the profile and subscribe that user to a testlist no issue. 

 

the problem is that the FLOW i built on this list never triggers!

 

the list is not set to double opt in (default). i actually turned that off // to single. the flow is just simple: trigger when someone subscribes to the list, and send a notification to me.  but testing it, the php script repeatedly succeeds in adding new profiles, and subscribing them to that list, and yet, the automation (flow) never responds. the actions are set to LIVE not draft. but the stats show 0 events, 0 notifications, 0 emails sent out. WHY??

 

thanks!

Tom.

Reply