Skip to main content
Solved

How to get a list of all Flows and Emails from API


Forum|alt.badge.img+1

Question 1: Do any messages exist that are not a part of a Flow or Campaign? If so, what would be the way to export ALL messages through the API, and which API would I use for this? 

Question 2: I want to export the flow data from API the same way they are exported from a UI report on flows. UI report lists individual emails/SMS for each flow. Example of an UI report:

Flow ID Flow Name Flow Message ID Flow Message Name Flow Message Channel Status Delivered Unique Opens
WEBBnY Approved SMS ViTyk5 SMS #3 SMS draft 85 0
WEBBnY Approved SMS Rf5KGu Approved SMS draft 464 0
WEBBnY Approved SMS Wfe3Pp Email #1 Email draft 865 604

 

Now, when I export the data from Flows API v3 ("https://a.klaviyo.com/api/flows”), I get a list of flows only. It does not include individual emails. I does give me an option to filter the results for specific email IDs. But I need a list of all emails so it looks similar to the above. What I get from Flows API is a list like this:
 

Name ID Creation Date
Prospecting Ucg3Ef 2020-11-29T22:29:39+00:00
Welcome Series - 10% off offer XUvRsu 2020-12-10T20:58:38+00:00
WOA21 - Session 1 Yy6YkG 2021-01-26T15:07:35+00:00

 

I don’t see any field on the API export object that would output all messages in a flow. 

Ultimately, I am looking for a way to export all messages in all flows and any single messages if they exist, so that the API output covers everything and matches the UI output. How can this be done? Thanks in advance. 

 

Best answer by Brian Turcotte

Hi @IrinaK!!

Sorry for the delay here! Per your second original question, you can get the flows and individual flow messages by calling the following two endpoints subsequently:

  1. Flow -> Flow Actions

    then,
  2. Flow Action -> Flow Messages


Best,

Brian

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @IrinaK,

 

To answer question 1 - no messages will exist outside of a flow or campaign, so no need to worry about missing those in your API call.

 

I will have to check with Engineering to answer question number 2, and I will update the thread as soon as possible.

 

Best,

Brian


Brian Turcotte
Forum|alt.badge.img+37

Hi @IrinaK!!

Sorry for the delay here! Per your second original question, you can get the flows and individual flow messages by calling the following two endpoints subsequently:

  1. Flow -> Flow Actions

    then,
  2. Flow Action -> Flow Messages


Best,

Brian