Automatically format text the way you want


So near, and yet so far. That’s the feeling more often than not when trying to get apps to work together. You export data out of one app, try to import it into another—and it looks perfect, right until it doesn’t. Turns out, the text is in the wrong format or order, names are together when they should be split into first and last, dates and phone numbers are formatted incorrectly, and so on.

Back to the drawing board. You could manually edit everything, splitting first and last names by hand or typing in each date line by line—but that’d take forever. The better option is to get your apps to do the work for you.

There are often several ways to do that. You could reformat the text on your computer, or you could speed things up with Zapier’s Formatter tool, which can automatically format your text the way you want. Here are some of the most popular ways to reformat text including step-by-step instructions.

Table of contents

Zapier is the most connected AI orchestration platform—integrating with thousands of apps from partners like Google, Salesforce, and Microsoft. Use interfaces, data tables, and logic to build secure, automated, AI-powered systems for your business-critical workflows across your organization’s technology stack. Learn more.

What is Zapier Formatter?

First, a quick intro. You want to move data—say, your contact list—from one app to another, right? Zapier‘s the tool for that. It’s a workflow automation tool that connects thousands of apps—from Airtable to Zoho CRM and everything in between—so when someone new buys your products or fills out your form or anything else, Zapier can copy that data and add it to the correct app.

Sometimes getting the data in the right format needs a bit of help, which is where Formatter comes in. Formatter’s a built-in Zapier tool that tweaks your data to get it working the way you need.

Say you need to copy Shopify customers into a Mailchimp mailing list. Shopify shows your customers’ full names and the detailed time and date they bought your product—but all you want is their first name and the day of the week. Just add a Formatter step to your Zap, and Zapier can format text the way you want before adding it to Mailchimp.

Now let’s learn to use Formatter to edit your text so it’s just right.

How to split names and other text

A screenshot of a window in the Zap editor with the Transform field set to Split Text, the Input field mapped to "Name: Steph Spector," and empty fields for the Separator and Segment Index fields.

You have all the data you need from one app—but it’s all in one field, and you need to split it up before you can add it to another app. You don’t need a full name; you need first and last names. You don’t need the whole address; you just need the postal code and country.

Formatter can help with that. First, add a Formatter step to your Zap, select the Text action event, then choose the Split Text transform option. Add the text you want to split to the Input field. (To map dynamic data from previous steps, click the + button or type a forward slash (/), which opens a modal that lets you select and insert values.) Then add the delimiter that’s splitting up the text to the Separator field.

In the Segment Index field, select which part of the text you want to pull—you can choose the first, second, last, or next-to-last part of the text. Then test your action to make sure it works the way you want. Want to pull all the segments? Just add more Formatter steps, each time selecting the correct segment you want.

Finally, add the action steps you want to put your newly split text to work in your other apps.

How to extract email addresses, website links, and numbers

A screenshot of a window in the Zap editor with the Transform field set to Extract Email Address and no value chosen in the Input field.

Someone emailed you a link, and you’d love to copy the link and save it somewhere—only you’d like to do that automatically without copying. Or maybe you need to pull phone numbers out of a document or email addresses out of a note.

Formatter can help there, too. It includes Extract Email Address, Extract URL, Extract Phone Number, and Extract number transforms to find those items from your text. Select the transform option for the item you want to find. Then, in the Input field, select the text you want to find by mapping data from a previous step.

Test the action, and Zapier will find the first URL, email address, or number it comes across in your text. You can use that in your next action step to save the URL, send an email, add the number to your inventory, and more.

Want to find the second link, email, or number in that text? Just add a Formatter text replace step to remove that first item you found, followed by another Formatter text extract step to find the next item.

How to capitalize text the way you want

A screenshot of a window in the Zap editor with the Transform field set to Titlecase and a Google Doc title mapped to the Input field.

You’re rushing to write a blog post, and everything looks great at a quick glance, so you hit publish. Only later do you notice that your entire title is in all caps—apparently you hit Caps Lock instead of Shift. Or maybe it’s something simpler. Perhaps you just want to automatically share blog posts to Bluesky and Facebook, but want to make your post title look more natural instead of a standard capitalized title.

Formatter’s got your back. Add a Formatter Text action to your Zap, then select the Capitalize, Lowercase, Titlecase, or Uppercase transform options to format your text the way you want. Zapier will then automatically check your text capitalization, fix anything that’s off, and then send the formatted text to your other action apps. It’s like spellcheck for your style guide.

How to find and replace text

A screenshot of a window in the Zap editor with the Transform field set to Replace and the contents of a Google Doc mapped to the Input field; the Find and Replace fields are set to change "awsome" to "awesome"

Keep misspelling a word over and over, and want to check everything you write before you publish it? Need to make sure you don’t accidentally put last year’s date in next year’s documents? Or do you just want to replace the commas in a list with a different delimiter, like a pipe (|)?

The replace function in Formatter can do that for you. Add a Formatter action to your Zap, choose Text as your action event, select the Replace transform, and tell Zapier what text you want to search through. Then tell the Zap what you want to find—anything from text to spaces to line breaks. Finally, add what you want to replace that text with. (Or leave the replacement blank if you just want to delete that text.)

It’s a great way to clean up your text before things get published or added to your other apps.

How to format dates and times

A screenshot of a window in the Zap editor with the Transform field set to Format and a Shopify transaction selected in the Input field.

Let’s say that Shopify shows your customer bought your product at 2022-08-19T16:34:00-4:00, but you’d rather know that they bought your product on Friday, Aug 19th. Or maybe you’re trying to schedule appointments with your customers, but your U.S.-based calendar app has trouble figuring out what date your customer means when they type 12/08/2022 in international format.

Formatter’s date and time formatting function can help. Just add a Formatter step with a Date/Time action event to your Zap, and select Format as the Transform. Map the date that needs to be changed to the Input field, then select the date style you want in the To Format field.

You can get as specific as you want. Zapier includes a number of default date/time styles, like January 22, 2022 or 01-22-2022, that you can choose from. Or select Use a Custom Value and type in the date and time format you want. Just want the day of the week? Type dddd in the field. Want 01/Jan/2022? Type YY/MMM/YYYY instead. Check this table in our Formatter help docs for all the custom date and time styles you can choose from.

Zapier will typically guess the original date and time format you’re converting from. But you can set that as well if you need. You can also set original and new time zones as a quick way to switch those Pacific times from Shopify to Eastern if you’d like, too.

How to convert Markdown text to HTML or a document

A screenshot of a window in the Zap editor that shows the output of a tested Convert Markdown to HTML Formatter step.

Write in Word or Google Docs’ rich formatting and copy it over to your blog, and you’ll likely lose some formatting in the process. Write in HTML, and it’s all too easy to forget a </a> closing tag or some other tiny character.

Markdown is the best of both worlds. It’s easy to write in, with *single asterisks* for italics or - dashes for bullet points. You can write Markdown text in any text editor or word processor, even from your phone, and include all the formatting easily.

All that’s left is to convert that text to HTML and publish it on your site—or to convert it to a formatted PDF and perhaps print it out. Formatter to the rescue again.

First add a Formatter step to your Zap. Pick Text as your action event and select Convert Markdown to HTML in the Transform field. Next, add your Markdown text—perhaps from an Evernote note, email, or even a note in your CRM or project management app. Zapier will then turn that Markdown into standard HTML you can use anywhere. Have Zapier add that to WordPress or save it as an HTML file in Dropbox that syncs to your site. Or, if you want a PDF version, send the HTML to PDF.co, which can convert it into a polished PDF file and save it to Google Drive for easy sharing.

Here’s a pre-made Zap to help you take new issues from GitHub, turn the Markdown into HTML, and post it to your website using Ghost:

How to find related data

A screenshot of a window in the Zap editor with the Transform field set to Lookup Table, the Lookup Key set to a name in Sheets, and the Lookup Table containing Sharon, @sharon, Bob, and @bob, with a Fallback Value field set to @customersupport.

A customer messages with Bob on your team, but he’s user a932sz922 in Salesforce, @bobthebob in Slack, and @bobtester in Help Scout. Your customers don’t know that—they only know they need to contact Bob.

The same thing happens with orders, where widget might be product 0137204 in your inventory and WIDGET_V2 in your accounting software. Or on your calendar, which doesn’t know lunch means 12PM. And on and on. The same data can have widely different names in different apps.

Zapier’s Lookup Table formatter function makes sure Zapier always finds the right data. You add each of the entries that will come in from the first app on the left column, and their equivalent in another app on the right—and add a fallback option just in case Zapier doesn’t find any match. Then the next time someone asks to speak with Bob or wants to order a widget, Zapier looks up Bob or widget in the list, finds out what the other app thinks it’s called, and sends the correct data to that app instead of sending the exact thing your customer typed.

That’s not all. Formatter can also trim whitespace, truncate text, pluralize English words, format currency and phone numbers, add or subtract time from dates, run standard spreadsheet functions, and much more.

When you’re trying to automate anything in Zapier, and can’t figure out how to get two apps to fit together, Formatter’s the tool that’s most likely to help. Just add it to your Zap, and with a little tweaking you should be able to get your text the way you need before sending it to the next app.

Formatter’s not the only powerful built-in Zapier tool—there are dozens of other handy features included, from tools to send SMS messages or emails to filters to sort through your data. Learn more about ways to use Zapier’s built-in tools.

This article was originally written in September 2017 by Matthew Guay with later updates from Tyler Robertson and Will Harris. It was most recently updated by Steph Spector.

Leave a Reply

Your email address will not be published. Required fields are marked *