Where do I find the workflow id of an automation in Mailchimp?
Asked Answered
E

2

8

I would like to use Mailchimp Api 3.0 to add a subscriber to an automation workflow, but I can't find where the workflow_id or workflow_email_id are located... this is from the documentation:

POST /automations/{workflow_id}/emails/{workflow_email_id}/queue Add a subscriber to a workflow email

http://developer.mailchimp.com/documentation/mailchimp/reference/automations/emails/queue/

Can anyone tell me to find it? It's probably somewhere really obvious. I mean the list_id is well covered, but I can't find any info about this.

Estivation answered 2/12, 2016 at 3:6 Comment(3)
It seems like I have found the answer, so for anyone who may have had the same question, here is what you need to do to get the workflow id: Using the API endpoint: Get automations developer.mailchimp.com/documentation/mailchimp/reference/… You'll see that the Response body parameters return everything about the automations, including the id.Estivation
Instead of posting a comment containing the answer, please post your own answer below and accept it 48 hours later, so it can help anyone who read this question.Durant
Thanks @Durant I've answered the question now.Estivation
E
2

The answer is found in the official mailchimp knowledge base: It explains that you simply go into the workflow and read the id from the URL.

Other ways to get id information about anything:

  1. Using the API endpoint, detailed here: http://developer.mailchimp.com/documentation/mailchimp/reference/automations/ You'll see that the Response body parameters return everything about the automations, including the id.
  2. Probably the easier way: use the developer playground https://us1.api.mailchimp.com/playground/?_ga=1.218336095.774374564.1480036371

So, once you set up your lists and automations, go into the playground, and you'll find all the ids you'll need for everything.

Estivation answered 22/12, 2016 at 3:57 Comment(1)
Using the playground worked to get the automation id but reading the url from the workflow did not work for me. The url looked like "...mailchimp.com/campaigns/wizard/autocampaigns?id=1922417" and "1922417" was not the workflow idGuerin
L
5

I found this confusing as well. Here is how I got the answer:

  1. Send a GET request to https://us9.api.mailchimp.com/3.0/automations to find the workflow_id
  2. With the workflow_id, send a GET request to https://us9.api.mailchimp.com/3.0/automations/<workflow_id>/emails to find the workflow_email_id. The workflow_email_id will be the "id" in the array that's returned.
  3. From there you can make POST requests to https://us9.api.mailchimp.com/3.0/automations/<workflow_id>/emails/<workflow_email_id>/queue

Keep in mind you might need to subscribe an email address to a list first for the post request to work. To subscribe you can use: https://us9.api.mailchimp.com/3.0/lists/<list_id> with your data:

{
  "members": [{
        "email_address" : "[email protected]",
        "status": "subscribed"
  }]
}
Ligroin answered 17/11, 2017 at 22:4 Comment(1)
This is the answer that works for me. Also, using MailChim.Net.V3, you can call mailChimpManager.Automations.GetAllAsync(). Then from the results use the Id and call mailChimpManager.AutomationEmails.GetAllAsync(workflowId) as suggested above.Agrigento
E
2

The answer is found in the official mailchimp knowledge base: It explains that you simply go into the workflow and read the id from the URL.

Other ways to get id information about anything:

  1. Using the API endpoint, detailed here: http://developer.mailchimp.com/documentation/mailchimp/reference/automations/ You'll see that the Response body parameters return everything about the automations, including the id.
  2. Probably the easier way: use the developer playground https://us1.api.mailchimp.com/playground/?_ga=1.218336095.774374564.1480036371

So, once you set up your lists and automations, go into the playground, and you'll find all the ids you'll need for everything.

Estivation answered 22/12, 2016 at 3:57 Comment(1)
Using the playground worked to get the automation id but reading the url from the workflow did not work for me. The url looked like "...mailchimp.com/campaigns/wizard/autocampaigns?id=1922417" and "1922417" was not the workflow idGuerin

© 2022 - 2024 — McMap. All rights reserved.