IntegrationsDifyGetting Started

Getting Started

How to Integrate Dify.ai & Deep SerpApi?

By integrating Dify with Deep SerpApi, we can try to build a set of intelligent SEO title generation tools, which can crawl Google search results in real time and use the large language model (LLM) for semantic understanding and content creation, so as to generate more attractive and accurate titles.

Continue reading and follow my steps to complete it!

1. Create an app via “Create from Blank”.

Select workflow and enter the name and description.

2. Add input nodes and fields.

3. Choose the Deep SerpApi node to help access Google.

Set up search input.

4. Adapt data types

Since the output format of Deep SerpApi is JSON, we need to add a Code node to adapt the type:

Fill in the following code to convert the JSON structure into a string type for the parameter input of the next node:

function main({result}) {
    return {
        result: JSON.stringify(result)
    }
}

5. Summarize the results and generate blog titles.

Add an LLM node:

Select the gpt-3.5-turbo model (you can change to other LLM models at will), and fill in the following prompt words. The prompt words will use the search results of Deep SerpApi to generate a more friendly blog title:

SYSTEM:
You are an SEO expert and subject-matter expert. Your task is to generate an SEO article title for the keywords provided by the user based on the context of the Google Search.

USER:
For context about what my article should be about, these are the top ranking results for /keyword: /result
What are the principles that made these rank?

ASSISTANT:
To craft an SEO-friendly article title for the keywords "/keyword" that aligns with the principles observed in the top-ranking results you've shared, it's important to understand what made those titles effective. Here are the principles that likely contributed to their high rankings:

1. **Keywords Placement and Clarity**: Each title directly addresses the query by including the exact keywords or a very close variant. This clarity ensures search engines can easily understand the relevance of the content.
2. **Brevity and Directness**: The titles are concise, making them easy to read and understand quickly. They avoid unnecessary words and get straight to the point.
3. **Inclusion of Definitions or Explanations**: The titles suggest that the article will define or explain the concept, which is precisely what someone searching for "/keyword" would be looking for.

4. **Variety in Presentation**: Despite covering similar content, each title approaches the subject from a slightly different angle. This variety can capture interest from a broader audience.

USER:
Given these principles, please help me generate a title that will rank for the keywords "/keyword" by modeling after the syntax of the top ranking titles. Don't copy but give me something better, and avoid language such as "Master", "Comprehensive" or "Discover" or "Unveil". Do not use gerunds, and write in active, present voice only. Return the title only. Do not include any special symbols such as quotation mark and colons.

6. Add output result node.

Congratulation! The core process is now complete, next let’s test it!

Trial run

Input the keyword “AI content generation” and click “Start Run”.

We can see that a blog title with a high Google ranking has been successfully generated.

Release and use

If the above steps are completed, you can confidently proceed with the release.

Once the release is complete, we can use the application:

At this point, you’ve learned how to build an SEO-friendly blog title generator using Deep SerpApi and Dify!