login about faq

To prove you're not a spammer, email newuser.lgqa@gmail.com with the subject "Account Request" to request an account.

Hi, I was wondering if it's possible to create a QR code from text with Automator.

If you add text to this URL, you will see the text in QR code:


For Example: http://chart.apis.google.com/chart?cht=qr&chs=400x400&chl=Cookie

alt text

I tried to make a workflow that would add input text to the URL, but couldn't find the right action for it.

What do you think?

Same Question on Apple Discussions

Same Question on Forumbytes

By the way, check out:



The names are self-explanatory.

asked Aug 13 '10 at 13:19

BrunoMCP's gravatar image


edited Aug 14 '10 at 21:44

Hey! Just created an app around this.

Try it, and tell me what you think.

Do you think it's better to download the code, or just show the web page?

This app will download it, and call it 'qrcode'. I wanted it to crop the over-sized white edge, but sometimes it would crop the code itself.

answered Aug 15 '10 at 09:06

BrunoMCP's gravatar image


edited Aug 15 '10 at 22:28

It seems to work well. Thank you! :)

(Aug 15 '10 at 18:30) chris ♦♦ chris's gravatar image

Wild! I don't know about Automator, but... this is a nifty little discovery! :)


answered Aug 13 '10 at 22:10

chris's gravatar image

chris ♦♦

edited Aug 13 '10 at 22:10

Thanks. I discovered it by looking at the code of a bookmarklet.


I was searching for a Safari extension after your video about the Chrome extension, and found that a bookmarklet does the job perfectly.

I even asked the community:


(Aug 14 '10 at 21:11) BrunoMCP BrunoMCP's gravatar image

answered Aug 13 '10 at 22:34

chris's gravatar image

chris ♦♦

As you need at least two variables to check and combine with google's API url, I can't see this being possible within Automator. Luckily, Automator is simply a GUI shell over AppleScript and both work with each other seamlessly. So, open up automator, create a custom workflow and add a "Run AppleScript" node to it (delete the pre-made code inside it). Add the following code to the node:

on run {input, parameters}

    display dialog "Resolution?" default answer "128"
    set the theRes to the text returned of the result

    display dialog "URL?" default answer "http://www.google.com"
    set the theURL to the text returned of the result

    set input to "http://chart.apis.google.com/chart?cht=qr&chs=" & theRes & "x" & theRes & "&chl=" & theURL

    return input
end run

Now simply place a "Download URLs" node after it, then hit run... you're done. It should save into your default downloads directory or you can specify in the node's options.

answered Aug 14 '10 at 22:13

Granit's gravatar image


Thank you. That's a more advanced approach. But the 'Download URLs is a cool extra. I could even add a 'crop image' to trim the white space. (Btw, the idea is not to be a URL, but any text.)

(Aug 15 '10 at 08:40) BrunoMCP BrunoMCP's gravatar image

Oh that was just an example, you could of modified it in anyway. So you just change "URL?" to "Text?" or something. The issue with Automator is that only one variable can be sent down the workflow at a time so it was impossible to get both a resolution and the text.. I didn't know you simply just wanted the text with a static resolution.

(Aug 15 '10 at 12:27) Granit Granit's gravatar image


By red_menace, Apple Discussions:

There isn't an action included that adds arbitrary text to an URL, but you can use the Run AppleScript action to make one.

Tested workflow:

1) Ask for Text { Question: Insert Code: Default Answer: Cookie }

2) Run AppleScript:

 on run {input, parameters}

 return "http://chart.apis.google.com/chart?cht=qr&chs=400x400&chl=" & first item of the input

 end run

3) Display Webpages


It works perfectly. Only if there was a way to choose the Safari window size...

answered Aug 15 '10 at 07:26

BrunoMCP's gravatar image


edited Aug 15 '10 at 07:31

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Aug 13 '10 at 13:19

Seen: 5,255 times

Last updated: Aug 15 '10 at 22:28