31 lines
2.8 KiB
Markdown
31 lines
2.8 KiB
Markdown
Okay so I want your help to create email buttons for all the listed pages.
|
|
|
|
The simplebutton system has a rest api we can use curl to call. Here is a example of that curl authentication and subsequent button creation:
|
|
|
|
`
|
|
bunker-admin@bunker-admin-ThinkCentre-M73:~/Change-Maker-V3.9.7-Free-Alberta-Production$ curl -X POST http://localhost:5001/api/auth/login -H "Content-Type: application/json" -d '{"username":"admin","password":"freeyoda134"}'
|
|
{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjdhNmFhYzU0ZTY3NWNkYTNmZThhZCIsInVzZXJuYW1lIjoiYWRtaW4iLCJpYXQiOjE3NDAzNDY4MTQsImV4cCI6MTc0MDQzMzIxNH0.-S_envi_xSSOd24QFrzOBPBxT1EtCUnqvi1wLspitkQ"}bunker-admin@bunker-admin-ThinkCentre-M73:~/Change-Maker-V3.9.7-Free-Alberta-Production$ curl -X POST http://localhost:5001/api/buttons -H "Content-Type: application/json" -H "x-auth-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjdhNmFhYzU0ZTY3NWNkYTNmZThhZCIsInVzZXJuYW1lIjoiYWRtaW4iLCJpYXQiOjE3NDAzNDY4MTQsImV4cCI6MTc0MDQzMzIxNH0.-S_envi_xSSOd24QFrzOBPBxT1EtCUnqvi1wLspitkQ" -d '{"name":"Test Button","slug":"test-button","subject":"Test Email","body":"This is a test email","to_email":"test@example.com","button_text":"Click Me","showEmailText":true}'
|
|
{"name":"Test Button","slug":"test-button","subject":"Test Email","body":"This is a test email","to_email":"test@example.com","button_text":"Click Me","count":0,"showEmailText":true,"_id":"67bb95cfc54e675cda3fea0c","__v":0}bunker-admin@bunker-admin-ThinkCentre-M73:~/Change-Maker-V3.9.7-Free-Alberta-Production$
|
|
`
|
|
|
|
Here is example text for a button from one of the .md files:
|
|
|
|
Button Name: rest-williams
|
|
|
|
URL Slug: rest-williams
|
|
|
|
To Email: mha.minister@gov.ab.ca
|
|
|
|
Subject Line: Mental Health and Work-Life Balance in Alberta
|
|
|
|
Dear Minister Williams, As your constituent, I'm deeply concerned about mental health and burnout in our workforce. With many Albertans working 60+ hour weeks and struggling with work-life balance, we're facing a mental health crisis that needs immediate attention. Would you consider: - Expanding mental health support services - Implementing workplace mental health standards - Creating programs to address workplace burnout - Supporting initiatives for better work-life balance These issues affect our productivity, healthcare system, and community wellbeing. Could we discuss potential solutions? Thank you for your consideration,
|
|
|
|
Display Email Text Above Button: True
|
|
|
|
Work through each page and create email buttons where the email text is never over 1000 characters for each of these pages in the above style.
|
|
|
|
From the source material .md file, we also want to update the file with the new button using a markdown link. For example:
|
|
|
|
[Email Minister Jones](https://influence.freealberta.org/campaign/startover){ .md-button }
|
|
|
|
https://influence.freealberta.org/campaign/energy-reform |