How to parse a certain string of text from a google sheet

Non-coder, looking for a simple solution to this automation.
Tyring to parse text from a cell in a google sheet.
The cell may look something like this:
Header = Social Profiles
Cell Contents: (2 examples)

Row 1: Without Data
{“twitter”:null,“facebook”:null,“linkedIn”:null}

Row 2: With Data
{“twitter”:null,“facebook”:“https://www.facebook.com/FIRSTLASTNAME",“linkedIn”:"https://www.linkedin.com/in/FULLNAME”}

My goal is that if the row has the social media profiles URL’s inside it, I want to parse that out, specifically JUST the Linkedin URL so that I can use it in the next step.

I’ve tried different things, nothing works. I don’t know JS or other codes, so keeping this simple would be very helpful.

Thanks in advance.

Welcome to the Make community!

1. This forum might have or already changed your text

When pasting text into this forum, you should format the example text using the rich-text editor, otherwise the forum software might modify the displayed text, and you might get incorrect answers from others because of it.

Some things this forum software might do to mangle your text:

– remove extra spaces (which may be necessary)
– convert links to titles (when copied is incorrect)
– incorrect joined links
– convert single and double quotes to smart angled quotes ()
– emojis
– etc.

This interferes with you receiving correct answers, because it:

– makes JSON invalid (you can verify when copy-paste into https://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

A. Type code fence manually
Either add three backticks ``` before and after the text, like this:

```
content goes here
```

B. Highlight and click the format button
Or use the format code button in the editor:
Screenshot_2023-10-02_191027

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 butchered, and you need to make a re-copy of the text, and format it 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!

1 Like

Hi @Brad_Costanzo
Created a sample sheet as follows:
image

A sample workflow:
image

We have implemented a filter within the search module to allow rows to pass only if they contain at least one social media link.


For example,we have mapped those values into a set variable.You can change the module as required:

Output:

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

1 Like

If your google sheet actually has what appears to be JSON, you can use the Parse JSON module to convert the incoming row of data into a bundle of key value pairs and then use that in the google sheet directly.

1 Like