(1) Sparkpost transaction to Update a template of the newsletter composed by the Reporter


This is mockup of the (1)st #SparkPost transaction in Newsletter Mailing System


first GET – the HTML of the newsletter from the REPORTER at Speak To Me Catalog
wherever

then PUT – 
https://api.sparkpost.com/api/v1/templates/tigger_today1?update_published=true

Body (i think this should work… never tried it exactly this way however) 
{
  "options": {
    "open_tracking": true
  },
  "name": "tigger_today1”,
  "content": {
  "subject": "What you need to know about this Thursday afternoon ",
  "reply_to": "Tigger Help<customer.service@speaktomecatalog.com>",
  "html": "DATA RETIREVED FROM wherever"
  }
}

Note: This particular transaction would best even happen as a result of the REPORTER writing the newsletter within the program speaktomecatalog.com/db/reporter.php … however i am not at all sure that i have the ability to send httpd transactions from that old PHP without a lot of library insstallation.  last time i tried i got my panties all wadded up null

Comments


Okay. So you need TD support for the mailing because pasting the html newsletter into a JSON field in Postman is a bitch.

Instead of the reporting initiating the mailing, why not the other way around? Let the TD button initiate the reporter to generate the html and then retrieve it and submit the mailing?

The reporter itself is a long procedure in its own right where me and denise interactively talk about what the newsletter is to achieve and select products to be advertised.   Typically that happens over several hours and is frequently interrupted.  The final click when we are finished the design writes the HTML.  For that all to be under a TD click is hard to imagine.

But it is easy to just do a GET from TD of the HTML once it is written.

Alternatively i could put the POST to spark post in the REPORTER php program to happen the same place it is writing the HTML.   +$50 if you want to do it that way … as that would save a complete step in the procedure.  I just was not able to do that in the old PHP at speaktomecatalog.com.

I could put the emailing at the end of the reporter, but it seems less stable and flexible.

I personally would want to look at the final HTML before it got used, and then, what about test verses live? That seems better done as TD based buttons than trying to put all that in the reporter output. Having it on the TD side would allow you to tweak the JSON involved anytime you wanted … on the PHP side it would all be burned in.

And yes, just have the reporter produce HTML. Too much being done there to initiate it from TD.
  1. Reporter makes HTML.
  2. TD buttons for “test” and “live” each retrieve the HTML and submit it to sparkpost.
  3. The JSON under the buttons can be tweaked anytime desired.
  4. The bounces button already works as needed and the dates in it are easily tweaked with the TD editor.


the final step in the REPORTER shows me the newsletter on the screen, just like a customer would see it.  Then step (3a) sends it out to me and denise in test.  Typically denise reads it in her gmail then,  and makes changes and then i regenerate before sending it out live (3b).

But shucks i agree doing it in the TD script works just fine if that script can GET  from speaktomecatalog.com/newsletters/2017-05-10.html   and POST that in the Jason to sparkpost.  The name of the file does not even need to vary … it could always be something like current_newsletter.html .


Yes. Easy to grab html especially if in one file name.

So steps 1, 3, 3, and 4 in Newsletter Mailing System are covered.

How to cover step 2?

p.s. Suggest writing the HTML to both a date based file and a constant file name. That way you have a back copy record as well.


I’ll write a thought for 2 … give me a moment … it is a POST and does not need any variables.

totally agree on p.s.   … all i need to do on that is leave it the way it is and just add an extra write for the separate constant file “current_newsletter.html” … we never juggle more than one of these at a time.


#done see  (2) Post the mailing list to SparkPost

seth,

I am ready to test a sparkpost emailing.

I need the exact body above to try, not a rough one (except the html content object which I will dynamically fill in).

… also, if you can make up a test email list that includes just you and me that would be swell.

nsbawden@gmail.com


okay give me a moment. #done

the test list with just you and me is at www.speaktomecatalog.com/tiggerandhobbs.csv

but that does not go into this particular transaction above which just registers the actual email to send out, but does not send it out.

if it works the template will show up in the #SparkPost templates at  https://app.sparkpost.com/templates
to sign on to the dashboard … see (comment 77862).


Well, we either need to figure out what you are talking about for step #2 and converting formats and using it to create the test email list … or … you can simply put the tiggerandhobbs email list up at sparkpost so we can do test emailings and see if the publish status and all else works.

Because all I need to activate the “send test emails” button and test the whole process is a valid email list to refer to by name.

yes … which is why i created the “tigger and hobs email list” upon your request … the data is here … i already FTP’d it for us …. http://www.speaktomecatalog.com/tiggerandhobbs.csv

if you click that it should downlonad to your local computer … then step 2 should (ideally) ask for an upload (of what you just downloaded by example)  and convert the data for the Json object.   Typically this data will be about 10k of records.

it is ideal for my work if i don’t need to FTP from denise’s computer to the web to send the list to sparkpost.  That would be an extra step that i prefer to eliminate.  So i’d like to upload to the TD procedure directly from denise’s hard drive.  Unfortunately i do need to interface with this legacy FoxPro system on her computer which is a bitch to connect to the web.

… and to be fair to you … another +$50 for the upload ability.

sorry null, #connecting at times is like opening a can of worms and combing the hair null

So Denise’s computer can access FBI okay? That actually surprises me considering it’s age and that FBI relies on HTML 5.

well it can … but i don’t actually user her computer for the web interface.   rather i go on her computer and generate the list to her hard drive.  then i go on my mac and call up fastblogit and then upload choosing the file on denises hard drive in the process.  our computers are networked together.

Okay. That is easier.

i modified REPORTER to put the subject of the email in the <title> element of the HTML newsletter.

#done → seth

Okay. The script is already modified to use the input field if not empty and the <title> otherwise.


any new emails generated by the REPORTER should have a title now.  
it’s great that we can also overide that with an input field in the procedure itself.
#thanks & #kudos → nathan