Build Full People Search URL from Webhook Data

Hi everyone,

I’m building a Make.com scenario to generate a full Apollo.io People Search URL based on data coming from a webhook. The webhook provides multiple filters such as seniority levels, locations, employee ranges, tags, keywords, and pagination info.

The goal is to

Turn webhook input like this:

{
  "page": 1,
  "seniority": ["owner", "founder", "c_suite"],
  "location": ["United Kingdom"],
  "employeeRanges": ["1,10", "11,20"],
  "tags": ["SEO", "Site audits"],
  "includedKeywordFields": ["tags", "social_media_description"]
}


To end with an Apollo search like this: https://app.apollo.io/#/people?page=1&
personSeniorities[]=owner&
personSeniorities[]=founder&
personSeniorities[]=c_suite&
personLocations[]=United%20Kingdom&
organizationNumEmployeesRanges[]=1%2C10&
organizationNumEmployeesRanges[]=11%2C20&
qOrganizationKeywordTags[]=SEO&
qOrganizationKeywordTags[]=Site%20audits&
includedOrganizationKeywordFields[]=tags&
includedOrganizationKeywordFields[]=social_media_description&
sortAscending=false&
sortByField=recommendations_score

I've realised inside Make I need the final assembly to look something like this: 

https://app.apolloio/#/people?page={{1.page}}&{{2.seniorityFinal}}&{{3.locationFinal}}&{{4.employeeRangesFinal}}&{{5.tagsFinal}}&{{6.includedFieldsFinal}}&sortAscending=false&sortByField=recommendations_score

but I’ve been having a lot of trouble with the actual of construction the first variable seniorityFinal.

I hope that makes sense and thanks in advance for your input! If anyone has any tips at all, URL encoding etc, I’d love to hear.

1. This forum might have or already changed your text

When pasting code/text examples into this forum, you should format the content using the richtext editor, otherwise this forum’s software (Discourse) will modify the content, and you might get incorrect answers from others because of it.

This interferes with you receiving correct answers, because it:

– makes JSON invalid (you can check by copy-pasting into any JSON editor/formatter like jsonformatter.org)
– makes incorrect text examples when we need to build a pattern for text parsing

2. To prevent this in future, please format text in code blocks

These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

3. You might need to re-copy the original text

Once the post has been submitted, it’s too late to format it since it’s already modified in the database, and you need to make a re-copy of the text and format it correctly before submitting the forum post.

Please let us know once you have corrected the issue. This will avoid others potentially providing wrong answers based on incorrect text in your question.

Thank you!

@samliew

That should be sorted now :saluting_face: