Add hashtags programatically to facebook posts using make and wordpress

I have wordpress hooked to facebook so when we create a post, it gets auto posted to our facebook page. I am wondering how to programatically add hashtags to the facebook post. I was thinking including tags from the wordpress post, but how to add the # symbol in front of each tag?

Hi @basslion
Can you show how your tag data looks how it is coming can you attach a picture
Thank you

2 Likes

How it looks in wordpress on the post editor?

Welcome to the Make community!

1. You’ll want to search tags by slug (comma-separated)

2. Then aggregate to text

3. Output

Screenshot_2023-12-23_161259 (2)

2 Likes

Do i place this in between the wordpress and facebook elements? or before the wordpress. Also where do i find 34. Slug?

before wherever you need to use those hashtags.

that the number of your Wordpress “Search Tags” module, whatever the number will be when you add it to your scenario.

2 Likes

This is how it looks for me

How do i tell what number my search tag module is?

See the number 10 after the module name?

2 Likes

Ok this is how i have the search tags section

And this is how i have the Text Aggregator

The Post does have tags applied to it but still not showing on the facebook post with # before them.

Also how do i test this to auto post to facebook without actually posting, is there a way? i keep having to auto post then delete the post and test again.

Screenshot_2023-12-26_161200

This has to be a comma-separated string, like how I did in my screenshot.

To do that, you need to join the Tags variable array to a comma-separated string using the built-in join function:

{{ join(1.tags; ",") }}

If you want to learn more about Make, you can read up in the Help Center. I also recommend doing the tutorials in the Make Academy, and learn advanced skills like how to make custom apps to any API in the Make Partner Training Portal - both have certificates for successful completion.

2 Likes

I now have my Wordpress Search Tags looking like this

But when i check the text aggregator, it doesnt look like yours did

Your thoughts?

Looks like your tags variable isn’t an array.

Please provide the output bundles of the module [1] by running the scenario, then click the white speech bubble on the top-right of each module, save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.
Screenshot_2023-10-06_141025

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

This will allow others to better assist you. Thanks!

2 Likes

For each step, should i download each bundle and have it in its own txt file or should i combine them all in one text file? The first step watch for posts contains my website information, paths etc.

Perhaps just [1] and [10], in each own file/ preformatted code section (if you’re pasting it in here).

2 Likes

and this is from [10]

[
    {
        "__IMTLENGTH__": 0
    }
]

I notice after doing what you told me, it just adds 30165 after the “message” on facebook

1. Iterate the Tags array

2. Get tag by ID

3. Text aggregate

2 Likes

Are we removing the wordpress search tags and replacing with Get a Tag?

So it would be

Wordpress Watch Posts
Iterator
Get a Tag
Text Aggregator
Facebook Pages Create a Post

Yes, please follow the screenshots

2 Likes

Ok so it seems to be working, however it is only showing 1 tag in the Facebook Post whereas the post itself contains 4 tags. In the first step of the scenario, the Wordpress Post, i click the top right circle and it shows under tags, 4 numbers representing the 4 tags the post has, but for some reason in the next step, the iterator is only gathering the first one which is why the end result is 1 hashtag showing in the post.

Your Text Aggregate source module needs to be the iterator

2 Likes