Zapier

When we built WebMerge, our highest priority was building a system that would automate your document creation and easily integrate with any service on the web.  Utilizing our API, any service can grab a list of your documents, the fields you have in those documents, and send data to create merged documents.  One service that has taken advantage of our API is an awesome company called Zapier.

Zapier allows you to automate integrations between almost 200 different services – without writing a single line of code!  Create contracts from Salesforce leads, create custom receipts for Stripe payments, and much more!

Setting up a “Zap” is really easy.  Simply choose the service (trigger) where the data will be coming from (Highrise, Freshbooks, etc) and then choose WebMerge as the “action”.  When you select WebMerge, it will give you an option to create a Document Merge or create a Data Route Merge.  Choose that appropriate option based on your needs.

On the next step, Zapier will ask for your account information.  If you have not setup an API Key for WebMerge yet, go to My Account > API Access inside WebMerge and generate a new API Key (give it the name “Zapier”).  Once the API Key is created, you will want to copy the Key and Secret into the setup of Zapier.

Once you’ve setup the account information for each service, you’ll have to select the document (or data route) that you want to send the data to.  After you select the document, it will load the fields from that document.  Simply map those document fields to the fields that are coming from your trigger service – this will tell Zapier what data to send to WebMerge.

When you’ve mapped all the fields, you’re done, run a few tests to make sure everything is setup correctly and then you’re done!  When you are ready to start merging documents, make your Zap live and they’ll take it from there.

We are really excited about this - the possibilities with Zapier are endless!  They are constantly adding new services and integrations.  Feel free to reach out to them directly for help or contact us if you have any questions.

Have more questions? Submit a request

9 Comments

  • Avatar
    Samantha Wong

    Hey just a heads up - in the 3rd paragraph you say create a "Document Merge or create a Data Route Merge. Choose the appropriate option based on your needs". Could you please first explain what each of these things do - it's not clear to me. Also - you should consider using Elev.io for your support. It integrates with Zendesk knowledge base but given me a bit more help where I need it - I honestly am finding it difficult to get a solution on my own.

  • Avatar
    Jeremy Clarke

    Hi Samantha,

    Thanks for your feedback. I'd suggest taking a look at our blog for specific use cases (how-to articles) - https://www.webmerge.me/blog

    You can find more information on our Data Routing feature here: https://webmerge.zendesk.com/hc/en-us/sections/201531326-Data-Routing

    If you have any specific questions, please do not hesitate to create a support ticket and we'll get you pointed in the right direction!

  • Avatar
    Lars Prakken

    Hi,

    I'm struggling to properly catch a JSON array in a Zapier webhook and passing it to Webmerge.

    It seems Zapier converts all of my Arrays to strings , and refuses to properly generate a JSON array for usage in a Webmerge document (for each) loop. Do you guys maybe have an example of this ?

    I'd like to create a document with a bunch of (order) line items in 1 request.

  • Avatar
    Jeremy Clarke

    Hi Lars,

    When you're sending over JSON in a single field, then you need to use the Field Map (https://webmerge.zendesk.com/hc/en-us/articles/206526086-Field-Map) to convert it back to an array. If your field was called "products" and you're sending over the data as JSON, simply enter {$products} in the Field Map and we'll auto-detect the JSON and convert it to an array.

    Thanks!

  • Avatar
    Lars Prakken

    Thanks! Ooh... If it is possible to send a string of Json in a single field and have webmerge convert it back to an Array, my problems would be solved. I'm fiddling around with it .... Can you enlighten as to what structure webmerge expects in that field ?

    Right now , I've tried :
    {products: [{'name':'lars'},{'name':'lars2'},{'name':'lars3'},{'name':'lars4'}]};

    as well as:
    [{'name':'lars'},{'name':'lars2'},{'name':'lars3'},{'name':'lars4'}]

    But Webmerge keeps treating it as a string..

    Thanks in advance.

  • Avatar
    Jeremy Clarke

    Hi Lars,

    It should just be:

    [{'name':'lars'},{'name':'lars2'},{'name':'lars3'},{'name':'lars4'}]

    But make sure you've entered the field in the Field Map - we don't automatically look for the JSON string.

  • Avatar
    Lars Prakken

    HI Jeremy,

    Fixed it !! Don't ask me how it took, but it works.It's quite dirty though. ;)

    For people that are facing the same problem :
    Make sure your initial payload that you send to the webhook contains a key-value pair containing the (stringified) JSON you want to send through to Webmerge.

    The zapier webhook will leave the string untouched. In my case, I needed added a code step to my Zap to do some sanitizing to my string (strip the leading and trailing quotes and remove all escape characters that where added by PHP). This code step step returns a simple JSON object use in your Webmerge step, e.g. :
    outputJSON = {'myStringifiedJson':sanitizedInputJSON};   This is needed, because Zapier will not allow you to pass Raw JSON through an action.

    You can send this string to Webmerge, but as Jeremy points out, make sure to create a map for this field in your Webmerge fieldmap. If you don't, Webmerge will treat the string as a string instead of handling it as a JSON array.

    Thanks for your fast help !

    Edited by Lars Prakken
  • Avatar
    Giovanni De Smet

    Hello all,

    I'm 'trying' do test some things out.
    Merge a document through Zapier when a zendesk ticket is created.

    I keep getting the following error:
    www.webmerge.me returned (400) Error and said "Please send HTTP POST variables"

    Can anyone help me out?

  • Avatar
    Jeremy Clarke

    Hi Giovanni,

    This means that Zapier isn't sending over any data to merge. Please double check that you've matched up all your merge fields in the WebMerge step of your Zap.

    Thanks!

Please sign in to leave a comment.
Powered by Zendesk