calendar-clicksend-lambda
This code aggregates events from a Google Calendar ics URL and sends them to a SMS contact list on ClickSend.
Like any npm project, you will need to run "npm install".
Then to upload to lambda, zip-up the folder and upload it to the function.
To test locally, you can define the variables with values and re-write the lambda export as a regular JavaScript function definition.
Environment Variables
calendar_url: The public ics URL of the Google Calendar that has the events to text out.
clicksend_api_key: This is used by the code to access the ClickSend account. It is like a password.
clicksend_campaign_title: This is stored as the title of the text on the ClickSend history.
clicksend_sms_id: Each contact list has a number assigned to it by ClickSend. This is used in the code to identify which contact list to send the text to.
clicksend_username: the username of the ClickSend account.
text_after_events: These are the words appended at the end of each text.
text_before_events: These are the words added at the beginning of each text.
time_format: These letters represent a time/date format to use in the text.
time_period: This represents the type of time to look forward on the calendar. For instance "days".
time_value: This represents how many of the time_period to look ahead on the calendar. So if it is 12 and time_period is days, it will look 12 days ahead to see what events there are and add them to the text. timezone: This specifies the timezone of the time_format.