#!/usr/bin/env node /** * Script to update all campaign email content based on documentation * Run with: node scripts/update-campaign-content.js */ const https = require('https'); // NocoDB Configuration const NOCODB_API_URL = 'https://db.freealberta.org'; const NOCODB_API_TOKEN = 'H3z5PEgvrC25LDRuvRpF1wuzsByG9PCem5DHyjPj'; const PROJECT_ID = 'plc0u50kgobr2xh'; const CAMPAIGNS_TABLE_ID = 'mh98emvhot9gjrg'; // Campaign content definitions based on documentation const campaignContent = { // === FREETO CAMPAIGNS === // Freedom to Learn 'learning-access': { title: 'Access to Learning', description: 'Education should be a lifelong journey, not just something we do until we can get a job. Support access to learning for all Albertans regardless of age or financial situation.', email_subject: 'Support for Accessible Education in Alberta', email_body: `Dear Minister, I am writing as a concerned Albertan regarding access to education in our province. Education is a lifelong journey, yet many Albertans face barriers to learning including financial constraints, limited access to programs, and lack of flexible learning options. We need to invest in: - Affordable post-secondary education without crippling debt - Lifelong learning opportunities for career changes - Accessible adult education programs - Support for skills retraining and professional development An educated population is an innovative population. I urge you to take action to make education more accessible for all Albertans. Thank you for your consideration. Sincerely, [Your Name]` }, 'learn-glubish': { title: 'Technology in Education', description: 'Technology and innovation should support learning opportunities for all Albertans, helping bridge the digital divide and create new pathways to education.', email_subject: 'Technology and Innovation in Education', email_body: `Dear Minister Glubish, I am writing regarding the role of technology and innovation in Alberta's education system. In today's digital age, technology should be empowering learners, not creating barriers. I believe we need: - Affordable internet access for all students - Digital literacy programs across all age groups - Technology-enabled distance learning options - Innovation in educational delivery methods Please consider how your ministry can better support technology-enabled learning for all Albertans. Thank you for your attention to this matter. Sincerely, [Your Name]` }, 'higher-learning': { title: 'Higher Education Access', description: 'Post-secondary education should be accessible to all Albertans who wish to pursue it, without requiring decades of debt repayment.', email_subject: 'Making Higher Education Accessible', email_body: `Dear Minister, I am writing to advocate for more accessible higher education in Alberta. Too many Albertans are forced to choose between education and financial stability. The current system saddles graduates with decades of debt. We need: - Reduced tuition fees and more funding for post-secondary institutions - Expanded scholarship and grant programs - Support for mature students returning to school - Career change and retraining programs Investing in higher education is investing in Alberta's future. Please take action to make post-secondary education accessible to all who seek it. Sincerely, [Your Name]` }, // Freedom to Rest 'mental-health-rest': { title: 'Rest and Mental Health', description: 'Mental health and the ability to rest are fundamental to wellbeing. Albertans deserve support for work-life balance and mental health services.', email_subject: 'Support for Mental Health and Work-Life Balance', email_body: `Dear Minister, I am writing regarding the mental health crisis facing many Albertans, particularly as it relates to burnout and the inability to rest. Our worth isn't measured by our productivity. Alberta has a culture of overwork that damages mental health, families, and communities. We need: - Better mental health services and support - Policies that support work-life balance - Recognition that rest is essential, not weakness - Reduced stigma around mental health challenges Well-rested workers are more productive and healthier. Please take action to support Albertans' mental health and right to rest. Sincerely, [Your Name]` }, 'rest-nixon': { title: 'Social Support for Rest', description: 'Social services should support Albertans in achieving work-life balance and accessing the rest they need for wellbeing.', email_subject: 'Social Services Support for Work-Life Balance', email_body: `Dear Minister Nixon, I am writing regarding how social services can better support Albertans' need for rest and recovery. Many Albertans, particularly those relying on social supports, face impossible choices between working multiple jobs and caring for their wellbeing. We need: - Social programs that don't penalize rest and recovery - Support for caregivers who need respite - Services that recognize rest as essential to health - Community spaces for relaxation and rejuvenation Please consider how your ministry can better support Albertans' fundamental need for rest. Sincerely, [Your Name]` }, 'work-life': { title: 'Work-Life Balance', description: 'The freedom to have a life outside of work is essential. Alberta needs policies that support reasonable working hours and genuine work-life balance.', email_subject: 'Work-Life Balance Policy for Alberta Workers', email_body: `Dear Minister, I am writing about the urgent need for work-life balance policies in Alberta. Our province has a culture of overwork where 60-hour weeks are normalized and burnout is treated as a badge of honor. Countries with better work-life balance actually have higher productivity. We need: - Enforcement of reasonable working hours - Protection of vacation time and sick leave - Support for flexible work arrangements - Policies that value workers as people, not machines I urge you to champion policies that give Albertans the freedom to have lives outside of work. Sincerely, [Your Name]` }, // Freedom to Love 'love-smith': { title: 'Community and Connection', description: 'All Albertans deserve the freedom to love and build families and communities without discrimination or interference.', email_subject: 'Supporting Love and Community in Alberta', email_body: `Dear Premier Smith, I am writing regarding the importance of supporting all Albertans' freedom to love and build meaningful relationships. Love comes in many forms, and our province is stronger when all families and relationships are valued. We need leadership that: - Supports LGBTQ2S+ rights and protections - Values diverse family structures - Creates inclusive communities - Ensures equal rights for all relationships Freedom to love strengthens our communities. Please ensure Alberta remains a place where everyone can love freely. Sincerely, [Your Name]` }, 'love-ellis': { title: 'Safe Communities for All', description: 'Public safety should mean safety for everyone, including LGBTQ2S+ Albertans and diverse families.', email_subject: 'Safety for All Albertan Families', email_body: `Dear Deputy Premier Ellis, I am writing to advocate for public safety that protects all Albertans, including diverse families and LGBTQ2S+ individuals. True public safety means everyone feels safe in their communities. This requires: - Protection against hate crimes and discrimination - Training for law enforcement on diverse communities - Safe spaces for all families - Support for victims of discrimination Please ensure your public safety approach protects all Albertans equally. Sincerely, [Your Name]` }, 'love-turton': { title: 'Supporting All Families', description: 'Children and Family Services should support all family structures and ensure every child has a loving, supportive environment.', email_subject: 'Support for Diverse Family Structures', email_body: `Dear Minister Turton, I am writing about the importance of supporting all family structures in Alberta's Children and Family Services. Families come in many forms, and every child deserves love and support regardless of their family structure. Your ministry should: - Support diverse family arrangements - Ensure LGBTQ2S+ families have equal access to services - Train staff on inclusive family support - Protect children in all family configurations Please ensure your ministry supports all Alberta families. Sincerely, [Your Name]` }, 'love-williams': { title: 'Mental Health and Identity', description: 'Mental health services should support Albertans of all identities and help build healthy, loving relationships.', email_subject: 'Inclusive Mental Health Services', email_body: `Dear Minister Wilson, I am writing about the importance of inclusive mental health services that support all Albertans. Mental health is deeply connected to our ability to live authentically and love freely. We need mental health services that: - Are affirming of LGBTQ2S+ identities - Support healthy relationship building - Address the mental health impacts of discrimination - Help all Albertans thrive Please ensure mental health services in Alberta are inclusive and supportive of all identities. Sincerely, [Your Name]` }, 'community-spaces': { title: 'Community Gathering Spaces', description: 'Arts and cultural spaces bring communities together. Albertans need accessible spaces to gather, celebrate, and build connections.', email_subject: 'Support for Community Cultural Spaces', email_body: `Dear Minister, I am writing to advocate for community cultural spaces where Albertans can gather and build connections. Strong communities need places to come together. We need: - Accessible community centers in all neighborhoods - Funding for cultural celebrations and events - Spaces for diverse communities to gather - Support for local arts and cultural programs Please prioritize investment in community spaces that bring Albertans together. Sincerely, [Your Name]` }, 'public-spaces': { title: 'Public Gathering Places', description: 'Public spaces for gathering and recreation are essential for community building and should be accessible to all Albertans.', email_subject: 'Public Spaces for Community Building', email_body: `Dear Minister, I am writing regarding the importance of public spaces where Albertans can gather and build community. In an age of increasing isolation, public gathering spaces are more important than ever. We need: - Well-maintained public parks and plazas - Free community event spaces - Accessible facilities for all abilities - Year-round gathering options Please support investment in public spaces that build stronger Alberta communities. Sincerely, [Your Name]` }, // Freedom to Create 'arts-support': { title: 'Arts and Culture Support', description: 'A thriving creative sector strengthens Alberta\'s economy and culture. Artists and creators deserve support and funding.', email_subject: 'Support for Alberta\'s Arts and Creative Sector', email_body: `Dear Minister, I am writing to advocate for stronger support for arts and culture in Alberta. A thriving creative sector makes our communities vibrant and contributes to economic diversification. We need: - Increased funding for artists and arts organizations - Support for creative spaces and studios - Investment in cultural programming - Recognition that arts create jobs and economic value Creative industries can help diversify Alberta's economy while enriching our communities. Please increase support for arts and culture. Sincerely, [Your Name]` }, // Freedom to Gather 'assembly-rights': { title: 'Freedom of Assembly', description: 'The freedom to peacefully gather and protest is fundamental to democracy. Albertans must be able to assemble without fear.', email_subject: 'Protection of Assembly Rights in Alberta', email_body: `Dear Minister, I am writing regarding the fundamental right to peaceful assembly in Alberta. The freedom to gather - for protests, community meetings, cultural celebrations - is essential to democracy. Please ensure: - Protection for peaceful protesters - Clear guidelines that respect assembly rights - No excessive use of force against peaceful gatherings - Support for community organizing The right to assemble is how democracy functions. Please protect this fundamental freedom. Sincerely, [Your Name]` }, 'gathering-spaces-municipal': { title: 'Municipal Community Spaces', description: 'Municipalities need support to provide community gathering spaces where residents can come together, organize, and build community.', email_subject: 'Support for Municipal Community Spaces', email_body: `Dear Minister, I am writing about the need for municipal community gathering spaces across Alberta. Strong communities need places to come together. Municipalities require support to: - Build and maintain community centers - Provide accessible gathering spaces - Support community events and programs - Create year-round indoor and outdoor venues Please work with municipalities to ensure all Albertans have access to community gathering spaces. Sincerely, [Your Name]` }, // Freedom to Associate 'association-rights-jobs': { title: 'Worker Association Rights', description: 'Workers have the right to organize, form unions, and collectively advocate for better conditions. These rights must be protected.', email_subject: 'Protection of Worker Association Rights', email_body: `Dear Minister, I am writing to advocate for the protection of worker association rights in Alberta. The freedom to associate - to form unions, professional organizations, and advocacy coalitions - is fundamental. Workers need: - Protected right to organize without retaliation - Fair collective bargaining processes - Support for worker-led organizations - Protection from union-busting activities Strong worker associations build strong communities. Please protect these fundamental rights. Sincerely, [Your Name]` }, 'cultural-association-rights': { title: 'Cultural Association Rights', description: 'Cultural communities should be free to associate, organize, and preserve their traditions. These rights strengthen Alberta\'s diversity.', email_subject: 'Support for Cultural Community Organizations', email_body: `Dear Minister, I am writing about the importance of supporting cultural associations and community organizations in Alberta. Our province's diversity is strengthened when cultural communities can freely associate and organize. We need: - Support for cultural community organizations - Funding for cultural preservation programs - Protection for cultural practices and celebrations - Recognition of the value of cultural diversity Please support the right of cultural communities to associate and thrive. Sincerely, [Your Name]` }, // Freedom to Start Over 'career-transition': { title: 'Career Transition Support', description: 'Albertans should have the freedom to change careers without penalty. Support for retraining and transition programs is essential.', email_subject: 'Support for Career Transition Programs', email_body: `Dear Minister, I am writing about the need for better career transition support in Alberta. The average person changes careers 5-7 times in their lifetime. Alberta needs systems that support, not penalize, career changes: - Funded retraining programs - Support during career transitions - Recognition of transferable skills - Pathways between industries As Alberta's economy evolves, workers need the freedom to start over. Please invest in career transition support. Sincerely, [Your Name]` }, 'social-support': { title: 'Social Services for New Beginnings', description: 'Social services should support Albertans through major life transitions, providing a safety net for those starting over.', email_subject: 'Social Services Support for Life Transitions', email_body: `Dear Minister, I am writing about how social services can better support Albertans through major life transitions. Sometimes people need to start over - after job loss, relationship breakdown, health challenges, or other life changes. We need: - Transitional support programs - Housing assistance during transitions - Mental health support for major life changes - Programs that help people rebuild Please ensure social services provide a genuine safety net for Albertans starting over. Sincerely, [Your Name]` }, // === FREEFROM CAMPAIGNS === // Freedom from Surveillance 'privacy-rights': { title: 'Privacy Rights', description: 'Privacy is a fundamental right. Albertans should be free from excessive surveillance and have control over their personal data.', email_subject: 'Protection of Albertans\' Privacy Rights', email_body: `Dear Premier, I am writing about the urgent need to protect Albertans' privacy rights in an increasingly surveilled world. Just because we have nothing to hide doesn't mean we should live in glass houses. We need: - Strong data protection laws - Limits on government and corporate surveillance - The right to be forgotten - Control over our personal information - Protection from invasive technologies Privacy isn't about hiding bad things - it's about maintaining basic human dignity. Please champion privacy rights for all Albertans. Sincerely, [Your Name]` }, 'tech-privacy': { title: 'Technology and Privacy', description: 'As technology advances, privacy protections must keep pace. Albertans need protection from invasive digital surveillance.', email_subject: 'Protecting Privacy in the Digital Age', email_body: `Dear Minister, I am writing regarding the protection of privacy as technology advances in Alberta. From smart devices to facial recognition, technology increasingly invades our private lives. We need: - Encryption protections - Limits on data collection - Transparency about surveillance technologies - Digital privacy education - Strong penalties for privacy violations Please ensure your ministry prioritizes protecting Albertans' digital privacy. Sincerely, [Your Name]` }, // Freedom from Discrimination 'immigration-rights': { title: 'Immigration and Newcomer Rights', description: 'Newcomers to Alberta deserve equal rights and freedom from discrimination. Our diversity makes us stronger.', email_subject: 'Support for Newcomer Rights in Alberta', email_body: `Dear Minister, I am writing to advocate for the rights of newcomers and immigrants in Alberta. Our province's diversity is a strength, not a weakness. Newcomers face discrimination in employment, housing, and daily life. We need: - Strong anti-discrimination protections - Support for newcomer integration - Recognition of international credentials - Cultural competency in public services - Protection from xenophobia and racism Please ensure Alberta remains welcoming to newcomers and free from discrimination. Sincerely, [Your Name]` }, 'gender-equity': { title: 'Gender Equity', description: 'All Albertans deserve equal treatment regardless of gender. Gender-based discrimination has no place in our province.', email_subject: 'Advancing Gender Equity in Alberta', email_body: `Dear Minister, I am writing about the ongoing need for gender equity in Alberta. Despite progress, gender-based discrimination persists in workplaces, institutions, and daily life. We need: - Equal pay enforcement - Protection against gender-based discrimination - Support for women in leadership - Trans rights protections - Programs addressing gender-based violence Please continue working toward true gender equity for all Albertans. Sincerely, [Your Name]` }, // Freedom from Colonization 'indigenous-relations': { title: 'Indigenous Relations', description: 'True reconciliation requires honoring treaties, respecting Indigenous sovereignty, and addressing the ongoing impacts of colonization.', email_subject: 'Advancing Reconciliation and Indigenous Rights', email_body: `Dear Minister, I am writing regarding the critical importance of advancing Indigenous relations in Alberta. True reconciliation requires more than words - it requires action. We need: - Honoring treaty obligations - Respecting Indigenous sovereignty - Supporting Land Back initiatives - Addressing systemic discrimination - Meaningful nation-to-nation relationships Reconciliation without decolonization is just colonization with better PR. Please take meaningful action on Indigenous relations. Sincerely, [Your Name]` }, 'land-use': { title: 'Land Use and Indigenous Rights', description: 'Land use decisions must respect Indigenous rights and treaty obligations. Development cannot ignore Indigenous sovereignty.', email_subject: 'Respecting Indigenous Rights in Land Use Decisions', email_body: `Dear Minister, I am writing about the importance of respecting Indigenous rights in land use decisions. Treaties are agreements between nations, not surrender documents. Land use decisions must: - Respect treaty territories - Include meaningful Indigenous consultation - Recognize Indigenous land rights - Protect sacred sites - Support Indigenous-led development Please ensure your ministry respects Indigenous rights in all land use decisions. Sincerely, [Your Name]` }, // Freedom from Police Violence 'police-accountability': { title: 'Police Accountability', description: 'Public safety means safety for everyone. We need police accountability, civilian oversight, and community-centered approaches to safety.', email_subject: 'Strengthening Police Accountability in Alberta', email_body: `Dear Minister, I am writing about the urgent need for police accountability in Alberta. Public safety means building communities where everyone feels safe. We need: - Independent civilian oversight of police - Consequences for misconduct - Mental health first responders for crisis calls - De-escalation training and requirements - Community-led safety initiatives Reform without accountability is just oppression with better PR. Please take action on police accountability. Sincerely, [Your Name]` }, 'asirt-investigation': { title: 'Independent Police Investigations', description: 'Serious incidents involving police must be independently investigated. Public trust requires independent accountability.', email_subject: 'Strengthening Independent Police Investigations', email_body: `Dear ASIRT Director, I am writing to advocate for strong, independent investigations of serious incidents involving police in Alberta. Public trust in policing requires genuine accountability. ASIRT investigations must be: - Truly independent - Transparent in process and outcomes - Timely and thorough - Supportive of affected families - Leading to real consequences when warranted Please ensure ASIRT fulfills its critical role in maintaining police accountability. Sincerely, [Your Name]` }, // Freedom from State Violence 'human-rights': { title: 'Human Rights Protection', description: 'All Albertans deserve protection of their fundamental human rights. The Human Rights Commission must be empowered to investigate and act.', email_subject: 'Strengthening Human Rights Protections', email_body: `Dear Alberta Human Rights Commission, I am writing to advocate for stronger human rights protections in Alberta. State violence encompasses many forms - systemic discrimination, economic violence, environmental racism. We need: - Stronger enforcement of human rights - Resources to investigate complaints - Protection for marginalized communities - Systemic change, not just individual complaints - Proactive human rights education Please ensure the Commission has the resources and mandate to protect all Albertans' human rights. Sincerely, [Your Name]` }, 'ombudsman-investigation': { title: 'Government Accountability', description: 'The Ombudsman must investigate government actions that harm Albertans. Government accountability is essential to democracy.', email_subject: 'Strengthening Government Accountability', email_body: `Dear Alberta Ombudsman, I am writing to advocate for strong government accountability in Alberta. When government actions harm citizens, there must be recourse. The Ombudsman should: - Investigate government wrongdoing thoroughly - Have sufficient resources and mandate - Provide accessible complaint processes - Recommend meaningful remedies - Hold government accountable Please ensure the Ombudsman's office can effectively protect Albertans from government overreach. Sincerely, [Your Name]` }, // Freedom from Corruption 'anti-corruption': { title: 'Anti-Corruption Measures', description: 'Democracy requires freedom from corruption. Corporate money should not determine government policy.', email_subject: 'Strengthening Anti-Corruption Measures in Alberta', email_body: `Dear Minister, I am writing about the urgent need for stronger anti-corruption measures in Alberta. When money talks louder than voters, democracy suffers. We need: - Strong conflict of interest laws - Real whistleblower protection - Transparency in political donations - Limits on corporate lobbying - Independent oversight of government A system that consistently favors the powerful isn't broken - it's corrupted. Please champion anti-corruption measures. Sincerely, [Your Name]` }, 'legal-accountability': { title: 'Legal System Accountability', description: 'The justice system must be accountable and serve all Albertans fairly, not just those with resources.', email_subject: 'Strengthening Justice System Accountability', email_body: `Dear Minister, I am writing about the need for greater accountability in Alberta's justice system. Justice should be blind to wealth and status. We need: - Equal access to legal representation - Accountability for prosecutorial misconduct - Transparent court processes - Alternatives to incarceration - Restorative justice options Please work to ensure Alberta's justice system serves everyone fairly. Sincerely, [Your Name]` }, // Freedom from Government Overreach 'government-reform': { title: 'Government Reform', description: 'Good government knows its limits. Albertans need protection from unnecessary bureaucracy and government overreach.', email_subject: 'Government Reform and Individual Rights', email_body: `Dear Premier, I am writing regarding the balance between necessary government services and individual freedom. Good government protects rights rather than restricting them. We need: - Privacy protections from government surveillance - Simplified regulations and reduced red tape - Transparent and accountable government agencies - Protection of digital rights - Respect for personal autonomy The goal isn't no government - it's good government that knows when to back off. Please champion sensible government reform. Sincerely, [Your Name]` }, 'justice-reform': { title: 'Justice System Reform', description: 'The justice system should protect rights, not just enforce laws. Meaningful reform is needed for a fairer system.', email_subject: 'Justice System Reform in Alberta', email_body: `Dear Minister, I am writing to advocate for meaningful justice system reform in Alberta. Our justice system should protect everyone's rights equally. We need: - Reduced reliance on incarceration - Investment in prevention and support - Restorative justice programs - Fair treatment regardless of wealth - Protection of civil liberties Please work toward a justice system that serves all Albertans fairly. Sincerely, [Your Name]` }, // Freedom from Corporate Control 'economic-reform': { title: 'Economic Reform', description: 'The economy should work for people, not just corporations. Fair wages, worker rights, and corporate accountability are essential.', email_subject: 'Economic Reform for Working Albertans', email_body: `Dear Minister, I am writing about the need for economic reforms that serve working Albertans. Our economy should work for everyone, not just shareholders. We need: - Living wages that keep pace with costs - Worker protections and rights - Support for small businesses - Corporate accountability - Economic diversification When we fight corporate dominance, small businesses can compete and workers keep more of their earnings. Please champion economic reform. Sincerely, [Your Name]` }, 'corporate-oversight': { title: 'Corporate Oversight', description: 'Corporations must be held accountable for their impacts on workers, communities, and the environment.', email_subject: 'Strengthening Corporate Accountability', email_body: `Dear Minister, I am writing to advocate for stronger corporate oversight in Alberta. Corporations have responsibilities to workers, communities, and the environment. We need: - Real consequences for corporate wrongdoing - Whistleblower protections - Environmental accountability - Consumer protections - Worker safety enforcement Corporate freedom isn't the same as human freedom. Please strengthen corporate oversight. Sincerely, [Your Name]` }, // === FREENEEDS CAMPAIGNS === // Education 'education-reform': { title: 'Education Reform', description: 'Quality education should be accessible to all Albertans. Investment in our education system is investment in our future.', email_subject: 'Investment in Alberta\'s Education System', email_body: `Dear Minister, I am writing to advocate for investment and reform in Alberta's education system. Knowledge shouldn't come with crippling debt. We need: - Reduced tuition and student debt - Fully funded K-12 education - Support for teachers and educational staff - Updated curricula for the modern economy - Education focused on learning, not just job training When education is accessible, innovation increases and communities thrive. Please invest in education. Sincerely, [Your Name]` }, 'higher-education': { title: 'Higher Education Access', description: 'Post-secondary education should be a pathway to opportunity, not a sentence to decades of debt.', email_subject: 'Making Higher Education Accessible', email_body: `Dear Minister, I am writing about the accessibility of higher education in Alberta. The current system forces students to choose between education and financial stability. We need: - Reduced tuition and fees - Expanded grants and scholarships - Support for students from all backgrounds - Vocational training options - Lifelong learning opportunities Countries with accessible higher education have higher standards and more innovation. Please make higher education accessible. Sincerely, [Your Name]` }, // Healthcare 'health-reform': { title: 'Healthcare Reform', description: 'Healthcare is a right, not a privilege. Albertans deserve comprehensive, accessible healthcare without financial barriers.', email_subject: 'Comprehensive Healthcare for All Albertans', email_body: `Dear Minister, I am writing about the need for healthcare reform in Alberta. Having a pulse shouldn't be a luxury item. Albertans need: - Timely access to care without excessive waits - Mental health parity with physical health - Dental and vision coverage - Affordable prescription medications - Preventive care focus True healthcare freedom means never choosing between paying rent and getting care. Please champion comprehensive healthcare. Sincerely, [Your Name]` }, 'mental-health': { title: 'Mental Health Services', description: 'Mental health is health. Albertans need accessible, affordable mental health services without stigma.', email_subject: 'Expanding Mental Health Services in Alberta', email_body: `Dear Minister, I am writing to advocate for expanded mental health services in Alberta. Our brains are part of our bodies, yet mental health services remain underfunded and inaccessible. We need: - Reduced wait times for mental health care - Affordable counseling and therapy - Crisis services that respond without police - Support for addiction treatment - Reduced stigma around mental health Please prioritize mental health as an essential component of healthcare. Sincerely, [Your Name]` }, // Housing 'seniors-housing': { title: 'Seniors Housing', description: 'Seniors deserve dignified, affordable housing. No Albertan should face homelessness in their golden years.', email_subject: 'Affordable Housing for Alberta Seniors', email_body: `Dear Minister, I am writing about the housing crisis facing Alberta's seniors. After lifetimes of contribution, our seniors deserve secure, dignified housing. We need: - More affordable seniors housing units - Support for seniors aging in place - Protection from predatory rent increases - Quality care in assisted living facilities - No senior left homeless Please prioritize housing security for Alberta's seniors. Sincerely, [Your Name]` }, 'family-housing': { title: 'Family Housing Support', description: 'Families need stable, affordable housing. Children deserve to grow up with a secure roof over their heads.', email_subject: 'Affordable Housing for Alberta Families', email_body: `Dear Minister, I am writing about the housing affordability crisis facing Alberta families. No child should grow up without stable housing. Alberta families need: - More affordable family housing units - Rent support for struggling families - Protection from renovictions - Safe, quality housing standards - Pathways to home ownership Please take action to ensure all Alberta families have access to affordable housing. Sincerely, [Your Name]` }, // Food 'food-security': { title: 'Food Security', description: 'In a province with more cattle than people, no one should go hungry. Food security is a basic human right.', email_subject: 'Addressing Food Security in Alberta', email_body: `Dear Minister, I am writing about food security in Alberta - a province with abundant agricultural resources. In a land of plenty, too many Albertans face food insecurity. We need: - Support for local food production - Affordable access to nutritious food - Community food programs - Food desert solutions - Living wages so people can afford groceries Alberta produces enough food to feed the world. Please ensure Albertans don't go hungry. Sincerely, [Your Name]` }, 'food-access': { title: 'Food Access', description: 'All Albertans deserve access to nutritious food. Food banks shouldn\'t be permanent fixtures in a wealthy province.', email_subject: 'Improving Food Access for All Albertans', email_body: `Dear Minister, I am writing about food access for vulnerable Albertans. Too many Albertans rely on food banks and go without nutritious meals. We need: - Expanded food assistance programs - Community food initiatives - Support for food-insecure families - Accessible food in all communities - Solutions that address root causes No Albertan should have to choose between paying bills and eating well. Please improve food access. Sincerely, [Your Name]` }, // Water 'water-protection': { title: 'Water Protection', description: 'Clean water is a human right. Alberta\'s water sources must be protected from pollution and overuse.', email_subject: 'Protecting Alberta\'s Water Resources', email_body: `Dear Minister, I am writing about the protection of Alberta's precious water resources. Nothing says freedom like having to boil tap water while corporations use millions of liters. We need: - Strong protections for watersheds - Corporate accountability for water use - Updated water infrastructure - Clean drinking water for all communities - Climate adaptation for water security Water is life. Please prioritize protecting Alberta's water resources. Sincerely, [Your Name]` }, 'water-access': { title: 'Clean Water Access', description: 'Every Albertan deserves access to clean, safe drinking water. This is especially critical for underserved communities.', email_subject: 'Clean Water Access for All Albertans', email_body: `Dear Minister, I am writing about access to clean drinking water in Alberta. In 2026, boil water advisories still affect Alberta communities, especially Indigenous communities. We need: - Universal access to clean tap water - Infrastructure investment in underserved communities - End to boil water advisories - Fair water pricing - Public water systems, not privatization Please ensure every Albertan has access to safe, clean drinking water. Sincerely, [Your Name]` }, // Air Quality 'air-quality-protection': { title: 'Air Quality Protection', description: 'Clean air is a fundamental right. Alberta needs stronger protections against air pollution and industrial emissions.', email_subject: 'Protecting Alberta\'s Air Quality', email_body: `Dear Minister, I am writing about air quality protection in Alberta. Nothing says freedom like checking the air quality index before letting kids play outside. We need: - Stronger emission controls on industry - Real-time air quality monitoring - Accountability for polluters - Wildfire prevention and response - Transition to cleaner energy Our right to breathe clean air is more important than corporate profit margins. Please strengthen air quality protections. Sincerely, [Your Name]` }, 'air-quality-health': { title: 'Air Quality Health Impacts', description: 'Poor air quality causes serious health problems. Alberta must address the health impacts of air pollution.', email_subject: 'Addressing Health Impacts of Air Pollution', email_body: `Dear Minister, I am writing about the health impacts of air pollution in Alberta. Orange skies and smoke-filled days are becoming normalized. The health costs include: - Increased respiratory illness - Higher rates of asthma - Chronic health conditions - Mental health impacts from reduced outdoor activity - Healthcare system strain Please address air quality as a public health priority. Sincerely, [Your Name]` }, // Environment 'environment-protection': { title: 'Environmental Protection', description: 'A healthy environment is essential for healthy communities. Alberta must balance development with environmental stewardship.', email_subject: 'Strengthening Environmental Protection in Alberta', email_body: `Dear Minister, I am writing to advocate for stronger environmental protection in Alberta. Breathing shouldn't be a premium service, and clean water shouldn't require a purchase. We need: - Strong environmental regulations with enforcement - Protected wilderness areas - Corporate accountability for environmental damage - Transition to renewable energy - Environmental assessments with teeth A healthy environment is good for business and for Albertans. Please strengthen environmental protections. Sincerely, [Your Name]` }, 'clean-energy': { title: 'Clean Energy Transition', description: 'Alberta has the resources and expertise to lead in clean energy. The transition creates jobs and protects our environment.', email_subject: 'Supporting Clean Energy Transition in Alberta', email_body: `Dear Minister, I am writing about Alberta's transition to clean energy. Our province has abundant renewable resources - sun, wind, and geothermal. Clean energy means: - New jobs in growing industries - Reduced environmental damage - Energy independence - Lower long-term costs - Leadership in emerging markets Alberta can be an energy leader in the clean economy. Please support the clean energy transition. Sincerely, [Your Name]` }, // Transportation 'transport-reform': { title: 'Transportation Reform', description: 'Albertans deserve transportation options beyond expensive personal vehicles. Public transit is freedom to move.', email_subject: 'Transportation Reform for Alberta', email_body: `Dear Minister, I am writing about the need for transportation reform in Alberta. Our right to move around shouldn't require a $70,000 pickup truck. We need: - Expanded public transit options - Inter-city rail connections - Protected bike infrastructure - Walkable community design - Affordable transportation alternatives True transportation freedom means options beyond expensive car ownership. Please champion transportation reform. Sincerely, [Your Name]` }, 'municipal-transit': { title: 'Municipal Transit', description: 'Local transit systems need provincial support to provide service that gets Albertans where they need to go.', email_subject: 'Provincial Support for Municipal Transit', email_body: `Dear Minister, I am writing about provincial support for municipal transit systems. Strong local transit benefits everyone, including those who drive. Municipalities need support for: - Frequent, reliable bus service - Light rail and rapid transit expansion - Transit-oriented development - Accessibility improvements - Year-round service regardless of weather Please support investment in municipal transit across Alberta. Sincerely, [Your Name]` }, // === FREETHINGS CAMPAIGNS === // Energy 'energy-reform': { title: 'Energy Policy Reform', description: 'In a province swimming in energy resources, utility bills shouldn\'t break the bank. Energy policy must serve Albertans.', email_subject: 'Energy Policy Reform for Albertans', email_body: `Dear Minister, I am writing about energy policy in Alberta. We're sitting on an ocean of resources, yet paying some of Canada's highest utility bills. We need: - Fair utility pricing - Investment in renewables - End to energy poverty - Public options for utilities - Proper use of resource revenues for Albertans If we can subsidize oil companies, we can ensure Albertans can afford to heat their homes. Please reform energy policy. Sincerely, [Your Name]` }, 'utilities-reform': { title: 'Utilities Reform', description: 'Deregulation hasn\'t delivered lower prices. Utilities are essential services that should be affordable for all.', email_subject: 'Making Utilities Affordable for Albertans', email_body: `Dear Minister, I am writing about utility affordability in Alberta. Seniors are choosing between heat and food. Families are struggling with utility bills. We need: - Price stability and predictability - Support for those in energy poverty - Accountability for utility companies - Fair billing practices - Affordable rates for essential services Please take action to make utilities affordable for all Albertans. Sincerely, [Your Name]` }, // Communications 'tech-innovation': { title: 'Technology and Innovation', description: 'Technology should serve Albertans, not gouge them. Innovation must include digital inclusion and fair access.', email_subject: 'Technology Innovation for All Albertans', email_body: `Dear Minister, I am writing about technology and innovation policy in Alberta. The internet is essential infrastructure, not a luxury. We need: - Affordable broadband for all - Rural connectivity solutions - Digital literacy programs - Support for tech innovation - Consumer protection from tech monopolies Please ensure technology policy serves all Albertans, not just corporate profits. Sincerely, [Your Name]` }, 'telecom-reform': { title: 'Telecommunications Reform', description: 'Canadians pay among the highest telecom prices in the world. Alberta can advocate for fairer telecommunications.', email_subject: 'Telecommunications Reform', email_body: `Dear Minister, I am writing about telecommunications policy affecting Albertans. Our "competitive" telecom market features three companies charging the same high prices. We need: - Real competition in telecommunications - Affordable phone and internet plans - Rural coverage requirements - No more misleading "unlimited" plans - Consumer protection enforcement If our telecom bill is higher than our grocery bill, something is wrong. Please advocate for telecom reform. Sincerely, [Your Name]` }, // Public Services 'public-services-reform': { title: 'Public Services Reform', description: 'Public services should be accessible without excessive fees. Proving you exist shouldn\'t come with a price tag.', email_subject: 'Making Public Services Accessible', email_body: `Dear Minister, I am writing about fees and accessibility for public services in Alberta. We already fund these services with our taxes. Additional fees are double-charging. Please: - Reduce or eliminate administrative fees - Streamline service delivery - Expand digital access - Ensure accessibility for all abilities - Stop treating public services as profit centers If corporations can register accounts for free, Albertans should be able to access basic services affordably. Sincerely, [Your Name]` }, 'public-services-vision': { title: 'Public Services Vision', description: 'Public services exist to serve the public. Alberta needs a vision for accessible, efficient government services.', email_subject: 'A Vision for Public Services in Alberta', email_body: `Dear Premier, I am writing about the future of public services in Alberta. Public services should make life easier for Albertans, not harder. We need a vision that includes: - Accessible services for all Albertans - Reduced bureaucratic barriers - Digital-first where appropriate - Maintained in-person options - Services designed for citizens, not bureaucracy Please champion a vision for public services that truly serves Albertans. Sincerely, [Your Name]` }, // Recreation 'recreation-tourism': { title: 'Recreation and Tourism', description: 'Alberta\'s natural beauty belongs to all of us. Recreation shouldn\'t be paywalled from the public.', email_subject: 'Accessible Recreation for All Albertans', email_body: `Dear Minister, I am writing about recreational access in Alberta. In a province blessed with mountains, lakes, and parks, we've somehow paywalled access to nature. We need: - Affordable access to provincial parks - Free community recreation facilities - Investment in public recreation infrastructure - Support for community sports programs - Nature access for all income levels If we can build million-dollar hockey arenas, we can make recreation accessible to everyone. Please support accessible recreation. Sincerely, [Your Name]` }, 'recreation-parks': { title: 'Parks and Recreation Access', description: 'Parks and natural areas belong to the public. Access should be maintained and fees kept reasonable.', email_subject: 'Maintaining Public Access to Parks', email_body: `Dear Minister, I am writing about public access to Alberta's parks and natural areas. Nature belongs to everyone, not just those who can afford access fees. We need: - Maintained trails and facilities - Affordable camping options - Protected wilderness areas - Public facilities in parks - No privatization of public lands Please protect public access to Alberta's beautiful natural areas. Sincerely, [Your Name]` }, // === LANDBACK CAMPAIGNS === 'landback': { title: 'Land Back Movement', description: 'Real freedom starts with addressing the ongoing impacts of colonization. Land Back is about returning stolen lands and honoring treaties.', email_subject: 'Support for Land Back and Indigenous Rights', email_body: `Dear Minister, I am writing as a settler on Treaty territory to advocate for the Land Back movement. We cannot claim to love Alberta while disrespecting its original caretakers. True reconciliation requires: - Return of stolen lands - Respect for treaty rights - Indigenous sovereignty - Economic justice for Indigenous peoples - Environmental co-stewardship Land Back isn't radical - colonization was radical. Please support meaningful action toward Land Back. Sincerely, [Your Name]` }, 'land-rights': { title: 'Indigenous Land Rights', description: 'Indigenous peoples have inherent rights to their traditional territories. These rights must be respected and upheld.', email_subject: 'Respecting Indigenous Land Rights', email_body: `Dear Minister, I am writing to advocate for respect of Indigenous land rights in Alberta. Treaties are agreements between nations - not surrender documents. Indigenous land rights include: - Recognition of traditional territories - Meaningful consultation on development - Protection of sacred sites - Resource revenue sharing - Self-determination over ancestral lands Please ensure your ministry respects Indigenous land rights in all decisions. Sincerely, [Your Name]` }, 'protected-areas': { title: 'Protected Areas', description: 'Alberta\'s wild spaces need protection. Parks and protected areas preserve our natural heritage for future generations.', email_subject: 'Protecting Alberta\'s Natural Heritage', email_body: `Dear Minister, I am writing about the protection of Alberta's natural areas. Our parks and wild spaces are invaluable - for wildlife, for recreation, for our future. We need: - Expanded protected areas - No privatization of public lands - Proper funding for park management - Protection from industrial development - Indigenous co-management of protected areas Please prioritize protecting Alberta's natural heritage. Sincerely, [Your Name]` } }; // Update campaign function async function updateCampaign(slug, content) { // First get the campaign to find its ID return new Promise((resolve, reject) => { const getOptions = { hostname: 'db.freealberta.org', port: 443, path: `/api/v1/db/data/v1/${PROJECT_ID}/${CAMPAIGNS_TABLE_ID}?where=(Campaign%20Slug,eq,${slug})`, method: 'GET', headers: { 'xc-token': NOCODB_API_TOKEN } }; const getReq = https.request(getOptions, (res) => { let data = ''; res.on('data', chunk => data += chunk); res.on('end', () => { try { const result = JSON.parse(data); if (!result.list || result.list.length === 0) { resolve({ success: false, slug, reason: 'not found' }); return; } const campaign = result.list[0]; const id = campaign.Id || campaign.ID || campaign.id; // Update the campaign const updateData = JSON.stringify({ 'Campaign Title': content.title, 'Description': content.description, 'Email Subject': content.email_subject, 'Email Body': content.email_body }); const updateOptions = { hostname: 'db.freealberta.org', port: 443, path: `/api/v1/db/data/v1/${PROJECT_ID}/${CAMPAIGNS_TABLE_ID}/${id}`, method: 'PATCH', headers: { 'Content-Type': 'application/json', 'xc-token': NOCODB_API_TOKEN, 'Content-Length': Buffer.byteLength(updateData) } }; const updateReq = https.request(updateOptions, (updateRes) => { let updateResult = ''; updateRes.on('data', chunk => updateResult += chunk); updateRes.on('end', () => { if (updateRes.statusCode >= 200 && updateRes.statusCode < 300) { resolve({ success: true, slug }); } else { resolve({ success: false, slug, reason: `status ${updateRes.statusCode}` }); } }); }); updateReq.on('error', err => resolve({ success: false, slug, reason: err.message })); updateReq.write(updateData); updateReq.end(); } catch (e) { resolve({ success: false, slug, reason: e.message }); } }); }); getReq.on('error', err => resolve({ success: false, slug, reason: err.message })); getReq.end(); }); } async function main() { const slugs = Object.keys(campaignContent); console.log(`Updating ${slugs.length} campaigns with proper email content...`); console.log('='.repeat(60)); let successCount = 0; let failCount = 0; for (const slug of slugs) { try { const result = await updateCampaign(slug, campaignContent[slug]); if (result.success) { console.log(`✓ ${slug}: "${campaignContent[slug].title}"`); successCount++; } else { console.log(`✗ ${slug}: ${result.reason}`); failCount++; } // Rate limiting await new Promise(resolve => setTimeout(resolve, 100)); } catch (error) { console.error(`✗ ${slug}: ${error.message}`); failCount++; } } console.log('='.repeat(60)); console.log(`Done! Updated: ${successCount}, Failed: ${failCount}`); } main().catch(console.error);