I have a feedback survey form need to send out daily when i received a new list of recipients. Is it possible we can schedule a particular survey email invitations to be send out daily/weekly at certain time (eg midnight 12AM) with the new contacts list (will be different, or same email address may repeat) each day. At the same time, i still want to keep track the old recipients responses/bounced messages each time/in total. Or what is the best approach?
I m planning to update the same email invitation recipients list(Collectors) thru API with a pre-create recipients list.
Here are some findings from SUrveyMonkey APIs doc site: - contacts_write: to Create/Modify Contacts
- collectors_write: to Create/Modify Collectors - /collectors/{id}/messages/{id}/recipients/bulk - /collectors/{COLLECTOR_ID}/messages/{MESSAGE_ID}/send
Any better approaches can share with me?
Thanks
Yes the two endpoints you specified would be the way to go. There's a number of ways to do this. One way is to have a script run on a cron job .
Something like 00 00 * * * ./your_script
.
Then make sure your script pulls the recipients you want to send to from whatever data source you have for that and then call SurveyMonkey's API to:
1) Create a new message on the collector
POST /v3/collectors/<collector_id>/messages
{
"type": "invite"
}
2) Insert all the recipients you pulled into the message
POST /v3/collectors/<collector_id>/messages/<message_id>/recipients/bulk
{
"contacts": [{
"email": "test@example.com",
"first_name": "Test",
"last_name": "Example"
}...]
}
3) Then send out the message immediately
POST /v3/collectors/<collector_id>/messages/<message_id>/send
{}
That's one way to have a scheduled task run, using the SurveyMonkey API.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.