Comments (8)
This seems to work when I tested it on my own form:
function onFormSubmit(e) {
var apiKey = 'YOUR API KEY';
var mailgunServer = 'YOUR MAILGUN SERVER';
var to = findResponse('First and last name') + ' <' + findResponse('Email') + '>';
var from = 'Hack Camp Team <[email protected]>';
var subject = 'Hack Camp applicaiton received - ' + findResponse('First and last name');
var message = 'Hey ' + findResponse('First and last name') + ', your application to Hack Camp has just been received. We\'ll get back to you within x days';
var url = 'https://api.mailgun.net/v3/' + mailgunServer + '/messages';
var payload = {
'from': from,
'to': to,
'subject': subject,
'text': message
};
var headers = {
'Authorization': 'Basic ' + Utilities.base64Encode(apiKey)
}
var options = {
'method': 'POST',
'headers': headers,
'payload': payload,
'muteHttpExceptions': false
};
var response = UrlFetchApp.fetch(url, options);
}
function findResponse (namedValue) {
var formResponses = FormApp.getActiveForm().getResponses();
var formResponse = formResponses[formResponses.length-1];
var itemResponses = formResponse.getItemResponses();
for (var j = 0; j < itemResponses.length; j++) {
var itemResponse = itemResponses[j];
if (itemResponse.getItem().getTitle() === namedValue)
return itemResponse.getResponse();
}
}
@andreadeng @jonleung What message would be good to send them?
from camp.
from camp.
Hi [Name of applicant],
We have received your application and will look over it carefully. We are doing admissions on a rolling basis and will get back to you by at least 2 weeks before the cohort starts. Let us know if you need to be notified earlier. Please feel free to reach out to us with questions!
Best,
[Sender Name]
from camp.
Hi Hacker,
We have received your application and will look over it carefully. We are doing admissions on a rolling basis and will get back to you by at least 2 weeks before the cohort starts. Let us know if you need to be notified earlier. Please feel free to reach out to us with questions!
Best,
hackEDU Team
from camp.
from camp.
I'll send a few small wording changes in a bit.
from camp.
@zachlatta You can make changes here
from camp.
Awesome! Went ahead and changed the text around a bit.
On Sun, Jul 12, 2015 at 3:01 PM, Max Wofford [email protected]
wrote:
@zachlatta https://github.com/zachlatta You can make changes here
https://script.google.com/macros/d/MdzQ1ey8oJtgIX6iWbbnHsPDp8aFBtR4M/edit?uiv=2&mid=ACjPJvFcI2Q9PdeiSYdsRn2SICrDyWmrTlEs9-LB7ZARB6_cUIV4ThC8biTAELAzO39IXDCrpr6H1jH_6PHli2KIa2qSLh0gPYbk6PnPE3MozInVO7_mrKXRLR1AxneF0c70BsLAsEBxo4U—
Reply to this email directly or view it on GitHub
#46 (comment).
from camp.
Related Issues (20)
- Create list of actionable tasks for club leaders to replicate club social environment in Hack Camp HOT 1
- Move session 3 start time to 11am HOT 2
- Retrain and reschedule Howdy HOT 1
- Set reminder for hackers to get food for lunch on time HOT 2
- Find a card game/activity to run during lunch HOT 2
- Announce precedent of hackers asking other hackers before asking mentors HOT 2
- Add schedule & documentation for 2016 session 3 day 2
- Bring HDMI to DisplayPort adapter for projector to venue HOT 3
- Find energizer to facilitate teamwork and interaction HOT 1
- Get food for Hack Camp
- Find examples for Hack Club workshops HOT 2
- Duplicate venue keys HOT 1
- Run activity during lunches to create conversation and increase productivity of hackers HOT 3
- Files with colons in their name break Windows HOT 4
- Document hypotheses not owned by Hack Camp organizers HOT 1
- Cancel 4th session for 2016 HOT 15
- Deprecate workshops that are no longer relevant HOT 1
- Refunds for Hack Campers HOT 5
- Update website to clarify Hack Camp has been discontinued
- Archive this repo? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camp.