Puzzle #6: PuppyGram

Gil Goldshlager
Coda Blog
Published in
6 min readNov 30, 2018

For our sixth puzzle, we challenged you to use your doc to send puppies to your coworkers. Wanna skip straight to the solution? Scroll down!

The puzzle prompt

The Birth of PuppyGram

When we launched Packs last month, it stretched our brains in terms of what could be done in Coda, so we figured we should stretch yours with a couple puzzles!

We wanted Puzzle #6 to be a bite-sized puzzle, and we had a few goals for it. It should be simple and fun enough to be comfortably solved in under an hour. It should encourage creativity in using Packs. And it should ideally be applicable in real docs.

We loved the idea of making a doc send an email. And we knew that every Coda user had a Gmail account, so we decided to construct the puzzle around the Gmail Pack. Now the question was what to email.

The first idea we had was a ‘compliment generator’ which would also make use of the Wikipedia Pack. You would put your friends into a table, add their favorite animals, and send them an email with a picture of the animal and a compliment. (The picture would be automatically pulled from Wikipedia.) It looked like this:

We ultimately decided against it, foremost because it didn’t feel quite applicable. And second, we were still ironing out some issues with the sendEmail() function which made it difficult to get the Wikipedia-generated image to show up in the email. Fortunately, that’s been improved now, as many of you discovered in your puzzle 6 solutions.

Then we thought, what about a button that emailed people a puppy GIF? We’d save the Wikipedia Pack for Puzzle #7, and give you a nice way to reward people on your team for getting things done. Anyway, enough backstory, let’s get to the puzzle solution!

Solution

There were a few things you needed to do to make a PuppyGram. First, you had to figure out how to connect your Gmail account to your doc. I won’t go into that here, since we have some great help articles about installing packs. As a start, you can check out this one.

Once you had your account set up, you had two puzzles to solve. The first was how to pick the GIF or video to send. The second was how to get it to show up properly in an email.

Picking the Puppy

There were basically two ways to pick your puppy. When we made the puzzle, we found our favorite puppy video, hard-coded it into the button, and sent everyone the same one. Most of you did the same. That looked something like this:

However, a few bold souls like Sam Paret weren’t satisfied with that solution. The same puppy every time? Give me a whole table of puppies instead. He used our Random() formula to pick a random one each time:

We love that!

Sending the Puppy

Now, once you had a puppy picked out, you just had to figure out how to get it into an email. There were three ways to do this part. The first way was to send a YouTube link, which Gmail automatically unfurls when it receives the email. If you did that, you could put together a simple string email using the ‘+’ operator or the Concatenate() formula:

However, some of you found a different solution. You put a picture or a GIF of a puppy directly into a cell in your table, and sent that cell as the message body. The disadvantage was that you couldn’t put any text alongside the image, so you had to put the text you wanted into the subject line. The advantage is you can get GIFs directly into your emails instead of relying on Gmail unfurling the link. If you took that approach, it probably looked something like this:

Finally, a couple of you went all the way and constructed an email using HTML. For those of you who aren’t familiar, HTML is the standard language used to construct web pages, and it can also be used to construct rich emails. This solution gives you the most power, though it requires some technical knowledge to implement. If you went that route, it looked something like this:

So, there you have it. We really enjoyed seeing all your solutions to this puzzle, and we hope you enjoyed making them. Thanks for playing!

Bonus Round: PuppyGram + Automation

Okay, one last note before we go. Who wants to have to remember to click a special button each time someone completes a task to send them a puppy? With our new automations launch, you don’t have to! You can set up an automation in your doc that triggers every time someone completes a task, and automatically sends them a congratulatory puppy.

Actually there’s a squad at Coda that’s already done something similar. They’re working against a large backlog of issues, and wanted a way to thank team members for completing items and make their progress visible to the rest of the team. The solution? Not quite a PuppyGram, but not too far off. Every time someone marks a task as done in their doc, an automation triggers and uses the Slack Pack to send a message to a special channel, thanking the person for their work and broadcasting out some details about the task (including a GIF!). That way, anyone at Coda can tune into the progress that’s made.

If that sounds cool to you, go ahead and try adapting the PuppyGram to your own docs. If you find it useful, we’d love to hear about it.

Bonus Round 2: Our favorite puppy GIFs

All right, couldn’t resist adding this in as well. In a puzzle about puppies, we’d be remiss not to include a few of our favorite puzzler-submitted puppy GIFs and videos. So, in no particular order, our top three prizes go to these adorable puppies:

(topical)
(classic)
(and I mean c’mon!)

--

--